Skip to content

Apps crash/restart when linking is enabled #2

Description

@LordZoltan

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions