Bug 57743 - SIGSEGV crash with renderers
Summary: SIGSEGV crash with renderers
Status: RESOLVED NOT_REPRODUCIBLE
Alias: None
Product: Forms
Classification: Xamarin
Component: iOS ()
Version: 2.3.4
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-06-24 16:50 UTC by Philipp Sumi
Modified: 2017-08-04 13:25 UTC (History)
3 users (show)

Tags: ios, animation, renderer
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NOT_REPRODUCIBLE

Description Philipp Sumi 2017-06-24 16:50:57 UTC
I have no idea what happened there - I had some weird state in my app (only the data), which might have caused an exception, even I wouldn't know how or why. Especially since the debugger never hit the initialization routine of my view model.

Anyway, my iOS port started crashing really hard on me without HockeyApp noticing on restart, or any of my break points being hit. I gave up trying to diagnose this - once I uninstalled / reinstalled the app, the issue was gone.

While searching for the issue, I noticed that a few posts about VisualElementTracker there on line 178 popped up, so I thought I'd let you know.

Among others this potentially related one, where the comment also indicates that they have no idea what is going on:
https://github.com/renfred/Rg.Plugins.Popup/commit/22e69aa26d5b13fa4da3172b2110388884a03c33


Here's all I got:



The thread 'Unknown' (0x18) has exited with code 0 (0x0).
2017-06-24 18:25:30.374 Ridr.Client.iOS[322:115410] critical: Stacktrace:
2017-06-24 18:25:30.374 Ridr.Client.iOS[322:115410] critical:   at <unknown> <0xffffffff>
2017-06-24 18:25:30.374 Ridr.Client.iOS[322:115410] critical:   at (wrapper managed-to-native) ObjCRuntime.Messaging.void_objc_msgSend_float (intptr,intptr,single) <0x00007>
2017-06-24 18:25:30.374 Ridr.Client.iOS[322:115410] critical:   at CoreAnimation.CALayer.set_Opacity (single) [0x00003] in /Users/builder/data/lanes/4691/d2270eec/source/xamarin-macios/src/build/ios/native/CoreAnimation/CALayer.g.cs:1714
2017-06-24 18:25:30.374 Ridr.Client.iOS[322:115410] critical:   at Xamarin.Forms.Platform.iOS.VisualElementTracker/<>c__DisplayClass23_0.<OnUpdateNativeControl>b__0 () [0x0015a] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\VisualElementTracker.cs:178
2017-06-24 18:25:30.375 Ridr.Client.iOS[322:115410] critical:   at Xamarin.Forms.Platform.iOS.CADisplayLinkTicker.StartThread () [0x0001d] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.iOS\CADisplayLinkTicker.cs:57
2017-06-24 18:25:
30.375 Ridr.Client.iOS[322:115410] critical:   at System.Threading.ThreadHelper.ThreadStart_Context (object) [0x00014] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.10.0.36/src/mono/mcs/class/referencesource/mscorlib/system/threading/thread.cs:68
2017-06-24 18:25:30.375 Ridr.Client.iOS[322:115410] critical:   at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) [0x00071] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.10.0.36/src/mono/mcs/class/referencesource/mscorlib/system/threading/executioncontext.cs:957
2017-06-24 18:25:30.375 Ridr.Client.iOS[322:115410] critical:   at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.10.0.36/src/mono/mcs/class/referencesource/mscorlib/system/threading/executioncontext.cs:904
2017-06-24 18:25:30.375 Ridr.Client.iOS[322:115410] critical:   at
 System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object) [0x0002b] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.10.0.36/src/mono/mcs/class/referencesource/mscorlib/system/threading/executioncontext.cs:893
2017-06-24 18:25:30.375 Ridr.Client.iOS[322:115410] critical:   at System.Threading.ThreadHelper.ThreadStart () [0x00008] in /Library/Frameworks/Xamarin.iOS.framework/Versions/10.10.0.36/src/mono/mcs/class/referencesource/mscorlib/system/threading/thread.cs:105
2017-06-24 18:25:30.376 Ridr.Client.iOS[322:115410] critical:   at (wrapper runtime-invoke) object.runtime_invoke_dynamic (intptr,intptr,intptr,intptr) [0x0001e] in <2f4074c3120b4d80802e10af84b67d41#AA057EEB-36CA-8F21-EC08-4BDF0AD33A12>:0
2017-06-24 18:25:30.376 Ridr.Client.iOS[322:115410] critical: 
Native stacktrace:
2017-06-24 18:25:30.447 Ridr.Client.iOS[322:115410] critical: 	0   Ridr.Client.iOS                     0x0000000102441ed4 mono_handle_native_crash + 260
2017-06-24 18:25:30.447 Ridr.Client.iOS[322:115410] critical: 	1   Ridr.Client.iOS                     0x000000010244c394 mono_sigsegv_signal_handler + 316
2017-06-24 18:25:30.448 Ridr.Client.iOS[322:115410] critical: 	2   libsystem_platform.dylib            0x00000001847c531c _sigtramp + 52
2017-06-24 18:25:30.448 Ridr.Client.iOS[322:115410] critical: 	3   QuartzCore                          0x0000000188a69d34 <redacted> + 444
2017-06-24 18:25:30.448 Ridr.Client.iOS[322:115410] critical: 	4   QuartzCore                          0x0000000188a4ffc8 <redacted> + 188
2017-06-24 18:25:30.448 Ridr.Client.iOS[322:115410] critical: 	5   QuartzCore                          0x0000000188a49880 <redacted> + 32
2017-06-24 18:25:30.448 Ridr.Client.iOS[322:115410] critical: 	6   UIKit                               0x000000018b86e2d0 <redacted> + 916
2017-06-24 18:25:30.448 Ridr.Client.iOS[322:115410] critical: 	7   UIKit                               0x000000018bb16fc4 <redacted> + 1156
2017-06-24 18:25:30.448 Ridr.Client.iOS[322:115410] critical: 	8   UIKit                               0x000000018b86dd5c <redacted> + 120
2017-06-24 18:25:30.448 Ridr.Client.iOS[322:115410] c
ritical: 	9   UIKit                               0x000000018b831df4 <redacted> + 120
2017-06-24 18:25:30.449 Ridr.Client.iOS[322:115410] critical: 	10  UIKit                               0x000000018c0ae098 <redacted> + 116
2017-06-24 18:25:30.449 Ridr.Client.iOS[322:115410] critical: 	11  QuartzCore                          0x0000000188a1fdfc <redacted> + 100
2017-06-24 18:25:30.449 Ridr.Client.iOS[322:115410] critical: 	12  QuartzCore                          0x0000000188a1b484 <redacted> + 88
2017-06-24 18:25:30.449 Ridr.Client.iOS[322:115410] critical: 	13  QuartzCore                          0x0000000188a1b3fc <redacted> + 172
2017-06-24 18:25:30.449 Ridr.Client.iOS[322:115410] critical: 	14  QuartzCore                          0x0000000188a1b7ec <redacted> + 156
2017-06-24 18:25:30.449 Ridr.Client.iOS[322:115410] critical: 	15  QuartzCore                          0x0000000188a25dc4 <redacted> + 48
2017-06-24 18:25:30.449 Ridr.Client.iOS[322:115410] critical: 	16  Ridr.Client.iOS                     0x0
000000101284a48 wrapper_managed_to_native_ObjCRuntime_Messaging_void_objc_msgSend_float_intptr_intptr_single + 120
2017-06-24 18:25:30.450 Ridr.Client.iOS[322:115410] critical: 	17  Ridr.Client.iOS                     0x0000000101206374 CoreAnimation_CALayer_set_Opacity_single + 52
2017-06-24 18:25:30.450 Ridr.Client.iOS[322:115410] critical: 	18  Ridr.Client.iOS                     0x0000000101114a3c Xamarin_Forms_Platform_iOS_VisualElementTracker__c__DisplayClass23_0__OnUpdateNativeControlb__0 + 2252
2017-06-24 18:25:30.450 Ridr.Client.iOS[322:115410] critical: 	19  Ridr.Client.iOS                     0x0000000101106ae0 Xamarin_Forms_Platform_iOS_CADisplayLinkTicker_StartThread + 272
2017-06-24 18:25:30.450 Ridr.Client.iOS[322:115410] critical: 	20  Ridr.Client.iOS                     0x00000001002103cc System_Threading_ThreadHelper_ThreadStart_Context_object + 188
2017-06-24 18:25:30.450 Ridr.Client.iOS[322:115410] critical: 	21  Ridr.Client.iOS                     0x000000010020e45c System_Threading_Execu
tionContext_RunInternal_System_Threading_ExecutionContext_System_Threading_ContextCallback_object_bool + 380
2017-06-24 18:25:30.450 Ridr.Client.iOS[322:115410] critical: 	22  Ridr.Client.iOS                     0x000000010020e2cc System_Threading_ExecutionContext_Run_System_Threading_ExecutionContext_System_Threading_ContextCallback_object_bool + 44
2017-06-24 18:25:30.450 Ridr.Client.iOS[322:115410] critical: 	23  Ridr.Client.iOS                     0x000000010020e24c System_Threading_ExecutionContext_Run_System_Threading_ExecutionContext_System_Threading_ContextCallback_object + 76
2017-06-24 18:25:30.450 Ridr.Client.iOS[322:115410] critical: 	24  Ridr.Client.iOS                     0x0000000100210514 System_Threading_ThreadHelper_ThreadStart + 52
2017-06-24 18:25:30.450 Ridr.Client.iOS[322:115410] critical: 	25  Ridr.Client.iOS                     0x0000000100333574 wrapper_runtime_invoke_object_runtime_invoke_dynamic_intptr_intptr_intptr_intptr + 244
2017-06-24 18:25:30.451 Ridr.Client.iOS[322:115410] cr
itical: 	26  Ridr.Client.iOS                     0x000000010244f3fc mono_jit_runtime_invoke + 836
2017-06-24 18:25:30.451 Ridr.Client.iOS[322:115410] critical: 	27  Ridr.Client.iOS                     0x00000001024b4a64 do_runtime_invoke + 112
2017-06-24 18:25:30.451 Ridr.Client.iOS[322:115410] critical: 	28  Ridr.Client.iOS                     0x00000001024d9430 start_wrapper + 504
2017-06-24 18:25:30.451 Ridr.Client.iOS[322:115410] critical: 	29  Ridr.Client.iOS                     0x0000000102535734 inner_start_thread + 268
2017-06-24 18:25:30.451 Ridr.Client.iOS[322:115410] critical: 	30  libsystem_pthread.dylib             0x00000001847c968c <redacted> + 240
2017-06-24 18:25:30.451 Ridr.Client.iOS[322:115410] critical: 	31  libsystem_pthread.dylib             0x00000001847c959c <redacted> + 0
2017-06-24 18:25:30.451 Ridr.Client.iOS[322:115410] critical: 	32  libsystem_pthread.dylib             0x00000001847c6cb4 thread_start + 4
2017-06-24 18:25:30.451 Ridr.Client.iOS[322:115410] critical: 
=============
====================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================
Failed to Stop app:  An error occured on client IDB450476 while executing a reply for topic xvs/idb/4.5.0.476/stop-app
The app has been terminated.
The app has been terminated.
Comment 1 Philipp Sumi 2017-06-24 16:52:35 UTC
Regarding that post here:

https://github.com/rotorgames/Rg.Plugins.Popup/issues/93

The page that was crashing on me also would have contained an entry (chat view).
Comment 2 Philipp Sumi 2017-06-24 20:18:57 UTC
Just had an occurrence with completely valid data - I guess the invalid data just caused different rendering which made it easier to reproduce. Anyway, had a single crash, can't reproduce anymore after a restart.

I'm guessing it's related to this code here (Xamanimation, using it to fade in the UI). I guess I'll take that out before going live :/

(this code has been in for months btw)



                //on iOS, this seems to sometimes cause 
                StoryBoard sb = new StoryBoard {Target = LayoutRoot};
                sb.Animations.Add(new FadeInAnimation {Direction = FadeInAnimation.FadeDirection.Down});
                sb.Animations.Add(new FadeToAnimation {Opacity = 1});
                var task = sb.Begin();
Comment 3 David Ortinau [MSFT] 2017-06-28 19:40:19 UTC
Hi Philipp,

I discussed this with the team and we really need a repro project. 

Please post one so we can investigate this. We're totally guessing in the dark at what might be going on here.
Comment 4 Philipp Sumi 2017-06-28 19:50:54 UTC
Hi David

As mentioned, I couldn't repro this myself, and I removed the animation as a further precaution to not risk screwing up the upcoming release. If you don't have similar issues (or want to follow up on the link I posted, feel free to close this).

Thanks,
Philipp
Comment 5 David Ortinau [MSFT] 2017-06-28 20:09:12 UTC
Thanks Philipp, if it does happen again and you can repro, please attach a project and we'll investigate.

Dave
Comment 6 Namyslaw Szymaniuk 2017-08-04 13:25:41 UTC
I think something really similar (if it's not the same) happened to me.
Issue occurs, when using *Rg.Plugins.Popup* as a page-to-page loading indicator.
Something like:
await ShowPopup();
await NavigateToPageUsingXFNavigation();
await ClosePopup();

There is no one simple reproducable way. Sometimes it's possible to "make a crash" within a few minutes on opening/closing popups, somethimes it's just not crashing almost at all.

What's more strange - disabling animation on *Rg.Plugins.Popup* showing and closing causing less crashes.

Below stacktrace:
https://pastebin.com/2JbdJZPs