You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tap on the FAB button to start the composer activity
take a picture, observe the editing mode is shown with the bottom strip with one frame and the + button tto add more
send the app to the background
bring it back again to the foreground
observe the bottom strip doesn't contain any frames at all now (as the Activity has been re-created).
Tap NEXT
💥
2020-03-20 11:41:57.281 23469-23469/com.automattic.portkey D/AndroidRuntime: Shutting down VM
2020-03-20 11:41:57.283 23469-23469/com.automattic.portkey E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.automattic.portkey, PID: 23469
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.get(ArrayList.java:437)
at java.util.Collections$UnmodifiableList.get(Collections.java:1351)
at com.automattic.portkey.compose.story.StoryViewModel.getCurrentStoryFrameAt(StoryViewModel.kt:84)
at com.automattic.portkey.compose.ComposeLoopFrameActivity.addCurrentViewsToFrameAtIndex(ComposeLoopFrameActivity.kt:599)
at com.automattic.portkey.compose.ComposeLoopFrameActivity.access$addCurrentViewsToFrameAtIndex(ComposeLoopFrameActivity.kt:105)
at com.automattic.portkey.compose.ComposeLoopFrameActivity$addClickListeners$9.onClick(ComposeLoopFrameActivity.kt:543)
at android.view.View.performClick(View.java:6256)
at android.view.View$PerformClick.run(View.java:24701)
at android.os.Handler.handleCallback(Handler.java:789)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6541)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
2020-03-20 11:41:57.286 23469-23469/com.automattic.portkey D/io.sentry.android.event.helper.AndroidEventBuilderHelper: Proguard UUIDs file not found.
This one is tricky because we'd need to save the instance state, and for that, we need to be able to serialize the StoryFrameItem which contains both information about each frame's background surface view and the Added views (text, emoji) - such as placement coordinates, rotation, size, and transformation matrix. While I keep plans for this in the long run, this is not a trivial fix and the right way to do that is by implementing some sort of serialization. I could also prevent the actual crash from happening but it wouldn't prevent the situation of "my frames are lost", which is the core thing here. So, opening a new separate issue to tackle once we get back on track with serialization (see previous abandoned effort here).
The text was updated successfully, but these errors were encountered:
First spotted by @jd-alexander in #278 (review)
I was able to reproduce with the following steps:
Don't keep activities
developer setting ON+
button tto add moreThis one is tricky because we'd need to save the instance state, and for that, we need to be able to serialize the
StoryFrameItem
which contains both information about each frame's background surface view and the Added views (text, emoji) - such as placement coordinates, rotation, size, and transformation matrix. While I keep plans for this in the long run, this is not a trivial fix and the right way to do that is by implementing some sort of serialization. I could also prevent the actual crash from happening but it wouldn't prevent the situation of "my frames are lost", which is the core thing here. So, opening a new separate issue to tackle once we get back on track with serialization (see previous abandoned effort here).The text was updated successfully, but these errors were encountered: