Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash opening "Conflict Resolver" #199

Closed
scienmind opened this issue Jan 12, 2016 · 19 comments
Closed

Crash opening "Conflict Resolver" #199

scienmind opened this issue Jan 12, 2016 · 19 comments

Comments

@scienmind
Copy link
Contributor

Steps done:
1 - conflicts present, open resolver via yellow bar, resolve all.
2 - close conflict resolver
3 - let it be for a while
4 - open Conflict Resolver via menu (there are not supposed to be any conflicts atm)
5 - instant crash:

Version: 1.1.1.231; Variant: Installed; Arch: Amd64
Path: C:\Program Files\SyncTrayzor\SyncTrayzor.exe
System.NullReferenceException: Object reference not set to an instance of an object.
   at SyncTrayzor.Xaml.GridViewSortByBehaviour.ApplyColumnSort(GridViewColumnHeader header, GridViewColumn column, ListSortDirection direction) in C:\projects\synctrayzor\src\SyncTrayzor\Xaml\GridViewSortByBehaviour.cs:line 146
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at MS.Internal.FrameworkObject.OnLoaded(RoutedEventArgs args)
   at System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)
   at System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root)
   at System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()
   at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
   at System.Windows.Interop.HwndTarget.OnResize()
   at System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(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 MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)

After that, SyncTrayzor can be started again successfully.

I'm not sure if the crash is easily reproducible though, haven't tested it precisely (need to create conflicts, etc...), but it seem to differ from the previous crashes reported...

@canton7
Copy link
Owner

canton7 commented Jan 12, 2016

Looks like an evil little race: it's up to whether the visual tree gets fully constructed first, or I try and sort out the column headers. It looks like both might be happening at around about the same time...

@scienmind
Copy link
Contributor Author

BTW, seems that "evil little race" isn't as rare, it happened few times more while opening the "Conflict Resolver" from the menu. (same GridViewSortByBehaviour.cs:line 146 crash)

@canton7
Copy link
Owner

canton7 commented Jan 12, 2016

Weird, I wonder why I can't reproduce then.

How many conflicts are shown in the conflict resolver when you open it?

@scienmind
Copy link
Contributor Author

None conflicts, all in sync (supposedly).
I just opened conflict resolver for the sake of it - and it crashed immediately.
(so I can't tell whether the resolver itself wanted to show anything)

canton7 added a commit that referenced this issue Jan 12, 2016
@canton7
Copy link
Owner

canton7 commented Jan 12, 2016

I wonder if it's a .net version difference...

Mind trying this build https://ci.appveyor.com/project/canton7/synctrayzor/build/1.1.1.236/artifacts ?

It won't crash, and it will log the .NET version on startup (SyncTrazor version XXXX (XXX) started at XXX (.NET version: XXX)). Could you tell me what .NET version it logs?

@scienmind
Copy link
Contributor Author

Unfortunately I can't test it atm (maybe in 10+ h later...).
For what it worth though, the .NET Framework version is probably "4.5.2" (according to this).

@canton7
Copy link
Owner

canton7 commented Jan 12, 2016

Right, that is a difference then: I'm on 4.6.

I wonder whether there was a change in behaviour between 4.5.2 and 4.6, where having the table of conflicts hidden would trigger one bit of behaviour when trying to draw on those up/down sort arrows in one version, and a different behaviour in another... That's my best bet right now.

If that is the case, the build I linked to above contains the right fix for this.

@scienmind
Copy link
Contributor Author

Personally I can just update to 4.6.1, but not everyone has it, 4.5 is still widespread.
(I'll try the build later today with 4.5.2)

@canton7
Copy link
Owner

canton7 commented Jan 12, 2016

Yeah - 1.1.2 will go out pretty soon with the fix I linked to above, in case anyone else is affected.

@scienmind
Copy link
Contributor Author

I've installed the 1.1.1.236, seem to be stable so far

@canton7
Copy link
Owner

canton7 commented Jan 13, 2016

Cool, thanks. Just to confirm: does it report it's using 4.5.2 on startup?

The other thing to try is to create a file conflict (copying a file and renaming it from e.g. foo.txt to foo.sync-conflict-20100101-010101.txt is an easy way to do this), then open the Conflict Resolver. Does the 'File Name' column have a little arrow on it?

@scienmind
Copy link
Contributor Author

Yea, seems like 4.5.2:

[Debug] SyncTrayzor.Bootstrapper: SyncTrazor version 1.1.1.236 (Amd64) started at C:\Program Files\SyncTrayzor\SyncTrayzor.exe (.NET version: 4.5.2 or later) 

And if you mean the "sort by" arrow, it's there:
image

@canton7
Copy link
Owner

canton7 commented Jan 13, 2016

Cool, that's what I was hoping for thanks!

@scienmind
Copy link
Contributor Author

No problem :)

I feel like "Conflict Resolver" makes me greedy, wishing for a .stversions's contents manager now...
;-)

@canton7
Copy link
Owner

canton7 commented Jan 13, 2016

All in good time! Or contributions welcome 😉

@Kugeleis
Copy link

Running 1.1.5 64bit on windows 10 and this issue persists.
and https://ci.appveyor.com/project/canton7/synctrayzor/build/1.1.1.236/artifacts crashes, too.

@canton7
Copy link
Owner

canton7 commented Jan 30, 2016

@Kungeleis it won't be exactly the same issue. Please open a new github issue, and include the crash message.

@Kugeleis
Copy link

What is the "crash message"? The program stops responding. No message is shown.
SyncTrayzor.txt

@canton7
Copy link
Owner

canton7 commented Jan 30, 2016

That log gives the error message, thanks. This is a different issue to the one @scienmind reported: please open a new github issue and we'll discuss it there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants