-
Notifications
You must be signed in to change notification settings - Fork 8
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
Apps crash/restart when linking is enabled #2
Comments
I've found this issue too. Easy way to reproduce is turn on the Android developer option of "Kill Activities" and then navigate to another activity from the one containing the TabStrip and then come back to it. |
My exception I get is: java.lang.RuntimeException: Parcel android.os.Parcel@4245faa8: Unmarshalling unknown type code 7209057 at offset 376 Is this related? |
Yeah, that and the one I mention in the OP is the kind of thing that happens. Not linking the library should fix it. It's really hard to diagnose the exact problem in this case without instructing Xamarin not to strip any of the library, and then selectively start to remove those restrictions until you can repro it again. Equally, there was another bug earlier in the codebase where you'd see this even if you weren't linking - basically caused by a bug in the state save & restore code - that should be fixed now... Hopefully! Certainly my first app, the JobServe app, no longer gets this problem. |
@LordZoltan thanks for the quick reply. Updated my library to the latest codebase and it fixed it for me. Thanks for the help and library! |
I'm glad an update solved the problem :) You're very welcome - I'm very pleased to have been able to bring this excellent library to the army of Xamarin .Net devs out there :) |
I have observed a crash when linking is enabled and when Android starts a new process but restores an application back to a previous activity on which PagerSlidingTabStrip is hosted.
Looking through the log you will see a Java IllegalStateException being raised with the text something like - 'super.OnRestoreInstanceState was not called'
One way I found to repro this (might not work in all cases, however) is to start your app, and press Home when you have a tabbed activity showing. Then go to Android settings and terminate the process from the Apps sub-settings screen.
Now go back to your app (either from recent or by re-launching) and it should restart after loading.
The problem is caused by the linker stripping something (but I don't know what) out of the library when you enable linking. The easiest way around it is simply to exclude PagerSlidingTabStrip.dll from being linked.
A more thorough investigation could be conducted to find out exactly which methods need to be retained at all costs, however.
The text was updated successfully, but these errors were encountered: