c# – Xamarin ios app bizarre challenge: simply began crashing at begin when working debugger, however not simply working debug model


My app is pretty massive, and is now getting used efficiently by 100s of customers. I began a few years in the past, and I’m caught at XF 4.8. I exploit the “SHARED CODE” paradigm. I’ve many pages derived from a category BasePage which is derived from ContentPage. I’ve .xaml and .xaml.cs recordsdata properly nested. I’ve a variety of logging to each the Console and a file.

I simply did a significant merge of some code that diverged. One of many pages known as “InfPumpPage”. Like most of my pages, I do a brand new on it at startup.

HERE’S THE WEIRD: I log after I name do the brand new(), and I log within the first line of the constructor (earlier than InitializeComponents). When it crashes, I do not see the log msg within the ctor. I say “when it crashes” as a result of if I take away basically all of the code, it “works”. (Observe, I didn’t change the XAML code.) However nonetheless bizarre — there is a delay between the brand new() and the ctor log msg that doesn’t exist for different pages. Even with no code, it is about 1/2 sec, in comparison with 4 msec worst case on the others, a few of that are extra advanced.

EVEN MORE WEIRD — after I begin including code again in, it nonetheless works, to some extent, however it looks like each bit I add makes that delay longer. When it will get to about 12 seconds, the debugger simply stories “App Terminated”. Working the app not below the debugger it runs properly — new to ctor log msg 1 msec.

WEIRDEST YET — in desperation, I deleted the .xaml & .xaml.cs file, and re-created with Add Merchandise. I hacked on it to get publics glad for the remainder of the code. Basically no XAML. IT STILL HAS THE DELAY, and I believe if I add sufficient code I can get it crashing once more. BUT — no proof that ANY OF THE CODE HAS BEEN RUNNING!

I’ve modified linker conduct for Debug from Do not Hyperlink to Hyperlink Framework. I’ve tried with and with out “Allow the Mono Interpretter” checked. I’ve additionally radically modified the order the pages are constructed in — doesn’t have an effect on. I’ve puzzled if there was a Rubbish assortment, however now the thing is tiny in comparison with others (change in whole reminiscence 13K vs 1.4MB for the extra advanced one). Simply up to date Win VS 17.3.6 right this moment, no change. Newest Xamarin.iOS (


Leave a Reply