Uploaded image for project: 'Sourcetree for Windows'
  1. Sourcetree for Windows
  2. SRCTREEWIN-14587

Create pull request in submodule crashes SourceTree

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: High High
    • None
    • 3.4.24
    • General
    • None
    • Severity 2 - Major

      SourceTree crashes when attempting to create a pull request from a submodule.

      Our main repository uses submodules nested 3 levels deep:

      Repo A:  Main repository
          Repo B: Submodule of Repo A
              Repo C:  Submodule of Repo B
                  Repo D:  Submodule of Repo C

      Right-click a branch in Repo A, select "Create pull request...".  Works as expected - opens browser to start a pull request in our Bitbucket Data Center server.

      In the Workspace panel of Repo A, double-click Submodule Repo B.  In Workspace panel of Repo B, right-click a branch in Repo B, select "Create pull request...".  SourceTree terminates.  This happens at any submodule repository level.

      SourceTree version 3.4.24
      System Git version 2.50.1

      Sourcetree.log entries:

      ERROR [2025-08-08 17:02:58,312] [1] [SourceTree.App] [Log] - Invalid URI: The format of the URI could not be determined.
      System.UriFormatException: Invalid URI: The format of the URI could not be determined.
         at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
         at SourceTree.Host.Bitbucket.Server.BitbucketServerHost.GetPullRequestUri(String baseUrl, String repoSlug, String ownerOrProject, String remoteBranch, String commitSha)
         at SourceTree.Host.Bitbucket.Server.BitbucketServerHost.GetPullRequestUri(String baseUrl, String remoteUrl, String remoteBranch, String commitSha)
         at SourceTree.Model.Repository.CreatePullRequest(String remote, String remoteBranch, String commitSHA)
         at SourceTree.ViewModel.RepoTabViewModel.CreatePullRequestNoPrompt(String remote, String remoteBranch)
         at SourceTree.ViewModel.RepoTabViewModel.CreatePullRequestNoPromptIfNotAhead(String localBranch, String remote, String remoteBranch)
         at SourceTree.ViewModel.SidebarViewModel.CreatePullRequestFromLocalBranch()
         at SourceTree.ViewModel.SidebarViewModel.<get_SidebarCreatePullRequestFromLocalBranchCommand>b__126_0(Object p)
         at SourceTree.View.Utils.RelayCommand.Execute(Object parameter)
         at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)
         at System.Windows.Controls.MenuItem.InvokeClickAfterRender(Object arg)
         at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
         at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
      ERROR [2025-08-08 17:02:58,315] [1] [SourceTree.App] [Log] - Invalid URI: The format of the URI could not be determined.
      System.UriFormatException: Invalid URI: The format of the URI could not be determined.
         at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
         at SourceTree.Host.Bitbucket.Server.BitbucketServerHost.GetPullRequestUri(String baseUrl, String repoSlug, String ownerOrProject, String remoteBranch, String commitSha)
         at SourceTree.Host.Bitbucket.Server.BitbucketServerHost.GetPullRequestUri(String baseUrl, String remoteUrl, String remoteBranch, String commitSha)
         at SourceTree.Model.Repository.CreatePullRequest(String remote, String remoteBranch, String commitSHA)
         at SourceTree.ViewModel.RepoTabViewModel.CreatePullRequestNoPrompt(String remote, String remoteBranch)
         at SourceTree.ViewModel.RepoTabViewModel.CreatePullRequestNoPromptIfNotAhead(String localBranch, String remote, String remoteBranch)
         at SourceTree.ViewModel.SidebarViewModel.CreatePullRequestFromLocalBranch()
         at SourceTree.ViewModel.SidebarViewModel.<get_SidebarCreatePullRequestFromLocalBranchCommand>b__126_0(Object p)
         at SourceTree.View.Utils.RelayCommand.Execute(Object parameter)
         at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)
         at System.Windows.Controls.MenuItem.InvokeClickAfterRender(Object arg)
         at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
         at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
      ERROR [2025-08-08 17:02:58,316] [1] [SourceTree.App] [Log] - Invalid URI: The format of the URI could not be determined. The application is terminating.
      System.UriFormatException: Invalid URI: The format of the URI could not be determined.
         at System.Uri.CreateThis(String uri, Boolean dontEscape, UriKind uriKind)
         at SourceTree.Host.Bitbucket.Server.BitbucketServerHost.GetPullRequestUri(String baseUrl, String repoSlug, String ownerOrProject, String remoteBranch, String commitSha)
         at SourceTree.Host.Bitbucket.Server.BitbucketServerHost.GetPullRequestUri(String baseUrl, String remoteUrl, String remoteBranch, String commitSha)
         at SourceTree.Model.Repository.CreatePullRequest(String remote, String remoteBranch, String commitSHA)
         at SourceTree.ViewModel.RepoTabViewModel.CreatePullRequestNoPrompt(String remote, String remoteBranch)
         at SourceTree.ViewModel.RepoTabViewModel.CreatePullRequestNoPromptIfNotAhead(String localBranch, String remote, String remoteBranch)
         at SourceTree.ViewModel.SidebarViewModel.CreatePullRequestFromLocalBranch()
         at SourceTree.ViewModel.SidebarViewModel.<get_SidebarCreatePullRequestFromLocalBranchCommand>b__126_0(Object p)
         at SourceTree.View.Utils.RelayCommand.Execute(Object parameter)
         at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(ICommandSource commandSource, Boolean userInitiated)
         at System.Windows.Controls.MenuItem.InvokeClickAfterRender(Object arg)
         at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
         at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
         at System.Windows.Threading.DispatcherOperation.InvokeImpl()
         at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
         at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
         at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
         at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
         at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
         at System.Windows.Threading.DispatcherOperation.Invoke()
         at System.Windows.Threading.Dispatcher.ProcessQueue()
         at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
         at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
         at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
         at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
         at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
         at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
         at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
         at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
         at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
         at System.Windows.Application.RunDispatcher(Object ignore)
         at System.Windows.Application.RunInternal(Window window)
         at SourceTree.App.Main()
      

      Windows Application event log entries:

      Log Name:      Application
      Source:        .NET Runtime
      Date:          8/8/2025 4:11:51 PM
      Event ID:      1026
      Task Category: None
      Level:         Error
      Keywords:      Classic
      User:          N/A
      Computer:      johnsonc-m1.uic.com
      Description:
      Application: SourceTree.exe
      Framework Version: v4.0.30319
      Description: The process was terminated due to an unhandled exception.
      Exception Info: System.UriFormatException
         at System.Uri.CreateThis(System.String, Boolean, System.UriKind)
         at SourceTree.Host.Bitbucket.Server.BitbucketServerHost.GetPullRequestUri(System.String, System.String, System.String, System.String, System.String)
         at SourceTree.Host.Bitbucket.Server.BitbucketServerHost.GetPullRequestUri(System.String, System.String, System.String, System.String)
         at SourceTree.Model.Repository.CreatePullRequest(System.String, System.String, System.String)
         at SourceTree.ViewModel.RepoTabViewModel.CreatePullRequestNoPrompt(System.String, System.String)
         at SourceTree.ViewModel.RepoTabViewModel.CreatePullRequestNoPromptIfNotAhead(System.String, System.String, System.String)
         at SourceTree.ViewModel.SidebarViewModel.CreatePullRequestFromLocalBranch()
         at SourceTree.ViewModel.SidebarViewModel.<get_SidebarCreatePullRequestFromLocalBranchCommand>b__126_0(System.Object)
         at SourceTree.View.Utils.RelayCommand.Execute(System.Object)
         at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(System.Windows.Input.ICommandSource, Boolean)
         at System.Windows.Controls.MenuItem.InvokeClickAfterRender(System.Object)
         at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
         at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
         at System.Windows.Threading.DispatcherOperation.InvokeImpl()
         at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(System.Object)
         at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
         at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
         at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
         at MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)
         at System.Windows.Threading.DispatcherOperation.Invoke()
         at System.Windows.Threading.Dispatcher.ProcessQueue()
         at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
         at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
         at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
         at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
         at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
         at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
         at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
         at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
         at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
         at System.Windows.Application.RunDispatcher(System.Object)
         at System.Windows.Application.RunInternal(System.Windows.Window)
         at SourceTree.App.Main()
      Event Xml:
      <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
        <System>
          <Provider Name=".NET Runtime" />
          <EventID Qualifiers="0">1026</EventID>
          <Version>0</Version>
          <Level>2</Level>
          <Task>0</Task>
          <Opcode>0</Opcode>
          <Keywords>0x80000000000000</Keywords>
          <TimeCreated SystemTime="2025-08-08T20:11:51.8909346Z" />
          <EventRecordID>324471</EventRecordID>
          <Correlation />
          <Execution ProcessID="0" ThreadID="0" />
          <Channel>Application</Channel>
          <Computer>johnsonc-m1.uic.com</Computer>
          <Security />
        </System>
        <EventData>
          <Data>Application: SourceTree.exe
      Framework Version: v4.0.30319
      Description: The process was terminated due to an unhandled exception.
      Exception Info: System.UriFormatException
         at System.Uri.CreateThis(System.String, Boolean, System.UriKind)
         at SourceTree.Host.Bitbucket.Server.BitbucketServerHost.GetPullRequestUri(System.String, System.String, System.String, System.String, System.String)
         at SourceTree.Host.Bitbucket.Server.BitbucketServerHost.GetPullRequestUri(System.String, System.String, System.String, System.String)
         at SourceTree.Model.Repository.CreatePullRequest(System.String, System.String, System.String)
         at SourceTree.ViewModel.RepoTabViewModel.CreatePullRequestNoPrompt(System.String, System.String)
         at SourceTree.ViewModel.RepoTabViewModel.CreatePullRequestNoPromptIfNotAhead(System.String, System.String, System.String)
         at SourceTree.ViewModel.SidebarViewModel.CreatePullRequestFromLocalBranch()
         at SourceTree.ViewModel.SidebarViewModel.&lt;get_SidebarCreatePullRequestFromLocalBranchCommand&gt;b__126_0(System.Object)
         at SourceTree.View.Utils.RelayCommand.Execute(System.Object)
         at MS.Internal.Commands.CommandHelpers.CriticalExecuteCommandSource(System.Windows.Input.ICommandSource, Boolean)
         at System.Windows.Controls.MenuItem.InvokeClickAfterRender(System.Object)
         at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
         at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
         at System.Windows.Threading.DispatcherOperation.InvokeImpl()
         at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(System.Object)
         at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
         at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
         at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
         at MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object)
         at System.Windows.Threading.DispatcherOperation.Invoke()
         at System.Windows.Threading.Dispatcher.ProcessQueue()
         at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
         at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef)
         at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object)
         at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32)
         at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate)
         at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32)
         at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr)
         at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef)
         at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame)
         at System.Windows.Application.RunDispatcher(System.Object)
         at System.Windows.Application.RunInternal(System.Windows.Window)
         at SourceTree.App.Main()</Data>
        </EventData>
      </Event>
      Log Name:      Application Source:        Application Error Date:          8/8/2025 4:11:52 PM Event ID:      1000 Task Category: (100) Level:         Error Keywords:      Classic User:          N/A Computer:      johnsonc-m1.uic.com Description: Faulting application name: SourceTree.exe, version: 3.4.24.0, time stamp: 0x6870b796 Faulting module name: KERNELBASE.dll, version: 10.0.19041.5678, time stamp: 0x024a42e4 Exception code: 0xe0434352 Fault offset: 0x000000000003b699 Faulting process id: 0x42e8 Faulting application start time: 0x01dc08a08a135ca5 Faulting application path: C:\Users\demuth\AppData\Local\SourceTree\app-3.4.24\SourceTree.exe Faulting module path: C:\WINDOWS\System32\KERNELBASE.dll Report Id: 729f71c8-20d1-4b10-a056-10de37dd68b7 Faulting package full name:  Faulting package-relative application ID:  Event Xml: <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">   <System>     <Provider Name="Application Error" />     <EventID Qualifiers="0">1000</EventID>     <Version>0</Version>     <Level>2</Level>     <Task>100</Task>     <Opcode>0</Opcode>     <Keywords>0x80000000000000</Keywords>     <TimeCreated SystemTime="2025-08-08T20:11:52.6147478Z" />     <EventRecordID>324472</EventRecordID>     <Correlation />     <Execution ProcessID="0" ThreadID="0" />     <Channel>Application</Channel>     <Computer>johnsonc-m1.uic.com</Computer>     <Security />   </System>   <EventData>     <Data>SourceTree.exe</Data>     <Data>3.4.24.0</Data>     <Data>6870b796</Data>     <Data>KERNELBASE.dll</Data>     <Data>10.0.19041.5678</Data>     <Data>024a42e4</Data>     <Data>e0434352</Data>     <Data>000000000003b699</Data>     <Data>42e8</Data>     <Data>01dc08a08a135ca5</Data>     <Data>C:\Users\demuth\AppData\Local\SourceTree\app-3.4.24\SourceTree.exe</Data>     <Data>C:\WINDOWS\System32\KERNELBASE.dll</Data>     <Data>729f71c8-20d1-4b10-a056-10de37dd68b7</Data>     <Data>     </Data>     <Data>     </Data>   </EventData> </Event>
      

       

              Unassigned Unassigned
              60d319eb02fd Kris DeMuth
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: