App closing on startup on or before splash screen. App works fine in prior version. No changes made.
----------What I did.
Updated xamarin forms to 4.4.0.991265. App compiled and ran fine. After entering the app several times, the app closed on splash screen startup and then after that app message app keeps closing. Its closing on splash screen. It worked a few times when first deployed. Then I seen where It dropped to the background process, The app closes on the splash screen and disappears. I found it using the show apps there and clicked on it. Then I keep getting message app keeps closing without launching. There has been no changes to app, I just always compile in the latest when available. Rolled back to last working project running 4.3.0.991211 and issue is gone app functions as expected.
-------looked through forum for similar
Looked at closed #7301 user stated similar issue with older version, Said fixed it by changing my splashactivity from FormsAppCompatActivity to AppCompatActivity. I tried changing the
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
to
public class MainActivity : global::Xamarin.Forms.Platform.Android.AppCompatActivity
There is no way to change it, the class doesn't exist in namespace.
Application to start
Fails after opening several times.
I am seeing something similar, our app works fine on v4.1.0778454, but when I upgrade Xamarin.Forms to 4.4.0.991265, the android app gets stuck on app launch after displaying the splashscreen with the logcat showing android.os.DeadObjectException.
error. On iOS, it fails to even start the app with the following exception shown in the debug output:
Foundation.MonoTouchException: 'Objective-C exception thrown. Name: NSInternalInconsistencyException Reason: Application windows are expected to have a root view controller at the end of application launch
Note: for the Android app, if I run it in the Visual Studio debugger, it seems to launch okay and I am also using a splash activity that already derives from AppCompatActivity.
If I revert Xamarin.Forms version back to 4.1.0778454, it then all works as normal.
Yes going back to 4.1xxx fixed the problem for me.
@Swdvader @SandipAhluwalia Can you please attach a small project that demonstrates this issue? Thanks!
I will try. Let me see if i can strip down the project to the start screen.
I tried stripping everything down, but I cant replicate the problem. It may be because I removed everything and its not going out to web for data. I try again tomorrow night to see if I can narrow it down.
Hopefully this helps
So I went to re deployed the full app using 4.4.0.991265, to my phone and the good news it I got it to crash when in debug mode during deployment. I m getting the follow error when the app crashes :
Exception Unhandled
System.NotSupportedException: 'Unable to activate instance of type Xamarin.Forms.Platform.Android.FastRenderers.LabelRenderer from native handle 0x7fcb38ec44(key_handle 0x5c2c1af).
Again, This doesn't happen when using v4.1.0778454. (no changes made to application)
Same error here.
Same error here. I've to go back to XF 4.3.*
@bares43 @transis2 Can you please attach a small project that demonstrates this issue? Thanks!
I am trying to make something small that causes the issue.
Ok. I have a stripped down project that demonstrates the issue but Its too large to send. I have to get it under 10 MB. Will have to get back. Just to confirm you need the project, not an apk?
I stripped down a project. I removed all the api calls, the IOS part and defaulted the local phone database values to null. I left a lot of the empty pages, models. There is really only 2 pages and master detail to look at as the issue happens on or between those pages. Login page calls master detail and load page J. The login page is the starting screen. I reset the local db values because there is no api call and then call the master detail page. When you run the project in debug You will see a mock splash screen. Sometime it shows the exception on first run, Sometimes the app will work and you will get to the next screen or login screen.
(the desired result). If this happens just refresh the project you should eventually see this error. I am thinking this is the issue. Exception Unhandled
System.NotSupportedException: 'Unable to activate instance of type Xamarin.Forms.Platform.Android.FastRenderers.LabelRenderer from native handle.
When I deploy it to my phone and run it from the phone only. Same thing. App works a few times and then starts crashing.
I ran this on my galaxy s9+ (android)
The solution in zip needs to be rebuilt in VS.
I get a different exception when I run the project using either 4.3.0.991211 or 4.4.0.991265.: No embeddedresource found for JZRP.App
. I have yet to see the NotSupportedException
.
I just ran the project now. Using VS 16.4.2 , net framework 4.8.03752 . Xamarin.Forms 4.4.0.991265 is the one causing the issue, prior version have no issue. See screen shot attached error, I just tested it. When I deploy it to my phone or tablet I can get the error. I just hit refresh until it happens.
Dont know why you getting no embedded resource. Check under CrossImage all should have a property of embedded resource. There should be 3 blank images I used for placeholders. I am not getting that error.
JZRP-IssueTest - Copy.zip
I placed another copy of the one I just ran, just in case. I also unzipped the file and ran that file to see if I get the same issue. The first run gave me an error I never seen. I recompiled it and it worked. After a few refreshes same issue happens. Please note this is only an issue with Xamarin.Forms 4.4.0.991265, all other versions prior do not cause any errors.
This happened after I unzipped the file and ran.
recompiled and ran. App loaded a few times and then same issue.
We got the same issue when upgrading to 4.4.0.991265
.
It's reproducible in the follow state of our repository:
https://github.com/DIPSAS/DIPS.Xamarin.UI/tree/4fc1b46c03425e415060b87311f1a6350d77e71d
DIPS.Xamarin.UI.Samples.Android
Controls
RadioButtonGroup
The problem is with our RadioButtonGroup
, which is a ContentView
, with a ScrollView
around a StackLayout
that adds a RadioButton
to the StackLayout
:
<ContentView>
<ScrollView>
<StackLayout>
<RadioButton>
<Label>
<RadioButton>
<Label>
....
Label
from RadioButton
or
ScrollView
from RadioButtonGroup
Duplicate of #9136
Most helpful comment
Same error here.