[android] Can not perform this action after onSaveInstanceState #4549

Closed
opened 2023-02-20 07:36:42 +00:00 by rtsisyk · 0 comments
Owner

A new regression after merging #4174:

java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState

     FATAL EXCEPTION: Thread-2
Process: app.organicmaps.debug, PID: 9950
java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState
	at androidx.fragment.app.FragmentManager.checkStateLoss(FragmentManager.java:1610)
	at androidx.fragment.app.FragmentManager.ensureExecReady(FragmentManager.java:1711)
	at androidx.fragment.app.FragmentManager.execSingleAction(FragmentManager.java:1725)
	at androidx.fragment.app.BackStackRecord.commitNow(BackStackRecord.java:317)
	at app.organicmaps.widget.placepage.PlacePageController.removePlacePageFragments(PlacePageController.java:397)
	at app.organicmaps.widget.placepage.PlacePageController.onHiddenInternal(PlacePageController.java:183)
	at app.organicmaps.widget.placepage.PlacePageController.-$$Nest$monHiddenInternal(Unknown Source:0)
	at app.organicmaps.widget.placepage.PlacePageController$1.onSheetHidden(PlacePageController.java:100)
	at app.organicmaps.widget.placepage.DefaultBottomSheetCallback.onStateChanged(DefaultBottomSheetCallback.java:33)
	at com.google.android.material.bottomsheet.BottomSheetBehavior.setStateInternal(BottomSheetBehavior.java:1388)
	at com.google.android.material.bottomsheet.BottomSheetBehavior$StateSettlingTracker$1.run(BottomSheetBehavior.java:1984)
	at android.view.Choreographer$CallbackRecord.run(Choreographer.java:949)
	at android.view.Choreographer.doCallbacks(Choreographer.java:761)
	at android.view.Choreographer.doFrame(Choreographer.java:693)
	at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:935)
	at android.os.Handler.handleCallback(Handler.java:873)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at androidx.test.espresso.base.Interrogator.loopAndInterrogate(Interrogator.java:10)
	at androidx.test.espresso.base.UiControllerImpl.loopUntil(UiControllerImpl.java:7)
	at androidx.test.espresso.base.UiControllerImpl.loopUntil(UiControllerImpl.java:1)
	at androidx.test.espresso.base.UiControllerImpl.loopMainThreadForAtLeast(UiControllerImpl.java:7)
	at androidx.test.espresso.action.Tap$1.sendTap(Tap.java:4)
	at androidx.test.espresso.action.GeneralClickAction.perform(GeneralClickAction.java:4)
	at androidx.test.espresso.ViewInteraction$SingleExecutionViewAction.perform(ViewInteraction.java:2)
	at androidx.test.espresso.ViewInteraction.doPerform(ViewInteraction.java:23)
	at androidx.test.espresso.ViewInteraction.-$$Nest$mdoPerform(Unknown Source:0)
	at androidx.test.espresso.ViewInteraction$1.call(ViewInteraction.java:6)
	at androidx.test.espresso.ViewInteraction$1.call(ViewInteraction.java:1)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at android.os.Handler.handleCallback(Handler.java:873)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:193)
	at android.app.ActivityThread.main(ActivityThread.java:6669)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

MediumPhone (ARM), Virtual, API level 28

https://console.firebase.google.com/u/0/project/omapsapp/testlab/histories/bh.7a38003b1edbc7b5/matrices/5196180644321985195/executions/bs.dca7c31e2afabb3a/issues

https://user-images.githubusercontent.com/170263/220216433-e9e26d55-3d8b-4f2b-8ef9-87ec2e10037d.mp4

The relevant log just before the crash:

I/ActivityManager(3304): Displayed app.organicmaps.debug/app.organicmaps.bookmarks.BookmarkCategoriesActivity: +157ms
02-19 21:24:53.739: I/GoogleInputMethod(7441): onFinishInput() : Dummy InputConnection bound
02-19 21:24:53.739: I/GoogleInputMethod(7441): onStartInput() : Dummy InputConnection bound
02-19 21:24:53.740: D/EGL_emulation(9950): eglMakeCurrent: 0x7104e4ca40: ver 3 0 (tinfo 0x7104fd1e60)
02-19 21:24:53.758: D/EGL_emulation(9950): eglMakeCurrent: 0x7104e4ca40: ver 3 0 (tinfo 0x7104fd1e60)
02-19 21:24:53.760: D/MapFragment(9950): MapFragment.java:68 surfaceDestroyed(): surfaceDestroyed
02-19 21:24:53.760: D/Map(9950): Map.java:188 onSurfaceDestroyed(): mSurfaceCreated = true, mSurfaceAttached = true, isAdded = true
02-19 21:24:53.760: I/OMcore(9950): organicmaps/Framework.cpp:285 DetachSurface(): Detach surface started. destroySurface = 1
02-19 21:24:53.760: I/OMcore(9950): organicmaps/Framework.cpp:298 DetachSurface(): Destroy surface.
02-19 21:24:53.784: I/OMcore(9950): drape_frontend/frontend_renderer.cpp:2276 OnContextDestroy(): On context destroy.
02-19 21:24:53.803: I/OMcore(9950): drape_frontend/backend_renderer.cpp:660 OnContextDestroy(): On context destroy.
02-19 21:24:53.826: D/OMcore(9950): drape_frontend/drape_engine.cpp:396 SetRenderingDisabled(): Rendering disabled
02-19 21:24:53.831: I/OMcore(9950): organicmaps/Framework.cpp:320 DetachSurface(): Detach surface finished.
02-19 21:24:53.836: D/EGL_emulation(9950): eglMakeCurrent: 0x7104e4ca40: ver 3 0 (tinfo 0x7104fd1e60)
02-19 21:24:53.840: D/AppBackgroundTracker(9950): AppBackgroundTracker.java:77 onActivityStopped(): onActivityStopped activity = app.organicmaps.MwmActivity@3ffae33
02-19 21:24:53.841: D/MapFragment(9950): MapFragment.java:112 onStop(): onStop
 I/BaseActivityDelegate(9950): BaseActivityDelegate.java:97 logLifecycleMethod(): MwmActivity: onStop() activity: app.organicmaps.MwmActivity@3ffae33
02-19 21:24:53.841: I/OMcore(9950): organicmaps/Framework.cpp:903 Java_app_organicmaps_Framework_nativeRemovePlacePageActivationListener(): Remove global map object listener
02-19 21:24:53.841: D/LocationHelper(9950): LocationHelper.java:420 removeListener(): listener: app.organicmaps.MwmActivity@3ffae33 count was: 2
02-19 21:24:53.841: D/LocationHelper(9950): LocationHelper.java:594 detach(): activity = app.organicmaps.MwmActivity@3ffae33
02-19 21:24:53.841: D/LifecycleMonitor(9950): Lifecycle status change: app.organicmaps.MwmActivity@3ffae33 in: STOPPED
02-19 21:24:53.842: D/AppBackgroundTracker(9950): AppBackgroundTracker.java:109 onActivitySaveInstanceState(): onActivitySaveInstanceState activity = app.organicmaps.MwmActivity@3ffae33
02-19 21:24:53.842: D/DefaultBottomSheetCallback(9950): DefaultBottomSheetCallback.java:25 onStateChanged(): State change, new = HIDDEN
A new regression after merging #4174: ``` java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState FATAL EXCEPTION: Thread-2 Process: app.organicmaps.debug, PID: 9950 java.lang.IllegalStateException: Can not perform this action after onSaveInstanceState at androidx.fragment.app.FragmentManager.checkStateLoss(FragmentManager.java:1610) at androidx.fragment.app.FragmentManager.ensureExecReady(FragmentManager.java:1711) at androidx.fragment.app.FragmentManager.execSingleAction(FragmentManager.java:1725) at androidx.fragment.app.BackStackRecord.commitNow(BackStackRecord.java:317) at app.organicmaps.widget.placepage.PlacePageController.removePlacePageFragments(PlacePageController.java:397) at app.organicmaps.widget.placepage.PlacePageController.onHiddenInternal(PlacePageController.java:183) at app.organicmaps.widget.placepage.PlacePageController.-$$Nest$monHiddenInternal(Unknown Source:0) at app.organicmaps.widget.placepage.PlacePageController$1.onSheetHidden(PlacePageController.java:100) at app.organicmaps.widget.placepage.DefaultBottomSheetCallback.onStateChanged(DefaultBottomSheetCallback.java:33) at com.google.android.material.bottomsheet.BottomSheetBehavior.setStateInternal(BottomSheetBehavior.java:1388) at com.google.android.material.bottomsheet.BottomSheetBehavior$StateSettlingTracker$1.run(BottomSheetBehavior.java:1984) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:949) at android.view.Choreographer.doCallbacks(Choreographer.java:761) at android.view.Choreographer.doFrame(Choreographer.java:693) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:935) at android.os.Handler.handleCallback(Handler.java:873) at android.os.Handler.dispatchMessage(Handler.java:99) at androidx.test.espresso.base.Interrogator.loopAndInterrogate(Interrogator.java:10) at androidx.test.espresso.base.UiControllerImpl.loopUntil(UiControllerImpl.java:7) at androidx.test.espresso.base.UiControllerImpl.loopUntil(UiControllerImpl.java:1) at androidx.test.espresso.base.UiControllerImpl.loopMainThreadForAtLeast(UiControllerImpl.java:7) at androidx.test.espresso.action.Tap$1.sendTap(Tap.java:4) at androidx.test.espresso.action.GeneralClickAction.perform(GeneralClickAction.java:4) at androidx.test.espresso.ViewInteraction$SingleExecutionViewAction.perform(ViewInteraction.java:2) at androidx.test.espresso.ViewInteraction.doPerform(ViewInteraction.java:23) at androidx.test.espresso.ViewInteraction.-$$Nest$mdoPerform(Unknown Source:0) at androidx.test.espresso.ViewInteraction$1.call(ViewInteraction.java:6) at androidx.test.espresso.ViewInteraction$1.call(ViewInteraction.java:1) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at android.os.Handler.handleCallback(Handler.java:873) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:193) at android.app.ActivityThread.main(ActivityThread.java:6669) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) ``` MediumPhone (ARM), Virtual, API level 28 https://console.firebase.google.com/u/0/project/omapsapp/testlab/histories/bh.7a38003b1edbc7b5/matrices/5196180644321985195/executions/bs.dca7c31e2afabb3a/issues https://user-images.githubusercontent.com/170263/220216433-e9e26d55-3d8b-4f2b-8ef9-87ec2e10037d.mp4 The relevant log just before the crash: ``` I/ActivityManager(3304): Displayed app.organicmaps.debug/app.organicmaps.bookmarks.BookmarkCategoriesActivity: +157ms 02-19 21:24:53.739: I/GoogleInputMethod(7441): onFinishInput() : Dummy InputConnection bound 02-19 21:24:53.739: I/GoogleInputMethod(7441): onStartInput() : Dummy InputConnection bound 02-19 21:24:53.740: D/EGL_emulation(9950): eglMakeCurrent: 0x7104e4ca40: ver 3 0 (tinfo 0x7104fd1e60) 02-19 21:24:53.758: D/EGL_emulation(9950): eglMakeCurrent: 0x7104e4ca40: ver 3 0 (tinfo 0x7104fd1e60) 02-19 21:24:53.760: D/MapFragment(9950): MapFragment.java:68 surfaceDestroyed(): surfaceDestroyed 02-19 21:24:53.760: D/Map(9950): Map.java:188 onSurfaceDestroyed(): mSurfaceCreated = true, mSurfaceAttached = true, isAdded = true 02-19 21:24:53.760: I/OMcore(9950): organicmaps/Framework.cpp:285 DetachSurface(): Detach surface started. destroySurface = 1 02-19 21:24:53.760: I/OMcore(9950): organicmaps/Framework.cpp:298 DetachSurface(): Destroy surface. 02-19 21:24:53.784: I/OMcore(9950): drape_frontend/frontend_renderer.cpp:2276 OnContextDestroy(): On context destroy. 02-19 21:24:53.803: I/OMcore(9950): drape_frontend/backend_renderer.cpp:660 OnContextDestroy(): On context destroy. 02-19 21:24:53.826: D/OMcore(9950): drape_frontend/drape_engine.cpp:396 SetRenderingDisabled(): Rendering disabled 02-19 21:24:53.831: I/OMcore(9950): organicmaps/Framework.cpp:320 DetachSurface(): Detach surface finished. 02-19 21:24:53.836: D/EGL_emulation(9950): eglMakeCurrent: 0x7104e4ca40: ver 3 0 (tinfo 0x7104fd1e60) 02-19 21:24:53.840: D/AppBackgroundTracker(9950): AppBackgroundTracker.java:77 onActivityStopped(): onActivityStopped activity = app.organicmaps.MwmActivity@3ffae33 02-19 21:24:53.841: D/MapFragment(9950): MapFragment.java:112 onStop(): onStop I/BaseActivityDelegate(9950): BaseActivityDelegate.java:97 logLifecycleMethod(): MwmActivity: onStop() activity: app.organicmaps.MwmActivity@3ffae33 02-19 21:24:53.841: I/OMcore(9950): organicmaps/Framework.cpp:903 Java_app_organicmaps_Framework_nativeRemovePlacePageActivationListener(): Remove global map object listener 02-19 21:24:53.841: D/LocationHelper(9950): LocationHelper.java:420 removeListener(): listener: app.organicmaps.MwmActivity@3ffae33 count was: 2 02-19 21:24:53.841: D/LocationHelper(9950): LocationHelper.java:594 detach(): activity = app.organicmaps.MwmActivity@3ffae33 02-19 21:24:53.841: D/LifecycleMonitor(9950): Lifecycle status change: app.organicmaps.MwmActivity@3ffae33 in: STOPPED 02-19 21:24:53.842: D/AppBackgroundTracker(9950): AppBackgroundTracker.java:109 onActivitySaveInstanceState(): onActivitySaveInstanceState activity = app.organicmaps.MwmActivity@3ffae33 02-19 21:24:53.842: D/DefaultBottomSheetCallback(9950): DefaultBottomSheetCallback.java:25 onStateChanged(): State change, new = HIDDEN ```
This repo is archived. You cannot comment on issues.
No labels
Accessibility
Accessibility
Address
Address
Android
Android
Android Auto
Android Auto
Android Automotive (AAOS)
Android Automotive (AAOS)
API
API
AppGallery
AppGallery
AppStore
AppStore
Battery and Performance
Battery and Performance
Blocker
Blocker
Bookmarks and Tracks
Bookmarks and Tracks
Borders
Borders
Bug
Bug
Build
Build
CarPlay
CarPlay
Classificator
Classificator
Community
Community
Core
Core
CrashReports
CrashReports
Cycling
Cycling
Desktop
Desktop
DevEx
DevEx
DevOps
DevOps
dev_sandbox
dev_sandbox
Directions
Directions
Documentation
Documentation
Downloader
Downloader
Drape
Drape
Driving
Driving
Duplicate
Duplicate
Editor
Editor
Elevation
Elevation
Enhancement
Enhancement
Epic
Epic
External Map Datasets
External Map Datasets
F-Droid
F-Droid
Fonts
Fonts
Frequently User Reported
Frequently User Reported
Fund
Fund
Generator
Generator
Good first issue
Good first issue
Google Play
Google Play
GPS
GPS
GSoC
GSoC
iCloud
iCloud
Icons
Icons
iOS
iOS
Legal
Legal
Linux Desktop
Linux Desktop
Linux packaging
Linux packaging
Linux Phone
Linux Phone
Mac OS
Mac OS
Map Data
Map Data
Metro
Metro
Navigation
Navigation
Need Feedback
Need Feedback
Night Mode
Night Mode
NLnet 2024-06-281
NLnet 2024-06-281
No Feature Parity
No Feature Parity
Opening Hours
Opening Hours
Outdoors
Outdoors
POI Info
POI Info
Privacy
Privacy
Public Transport
Public Transport
Raw Idea
Raw Idea
Refactoring
Refactoring
Regional
Regional
Regression
Regression
Releases
Releases
RoboTest
RoboTest
Route Planning
Route Planning
Routing
Routing
Ruler
Ruler
Search
Search
Security
Security
Styles
Styles
Tests
Tests
Track Recording
Track Recording
Translations
Translations
TTS
TTS
UI
UI
UX
UX
Walk Navigation
Walk Navigation
Watches
Watches
Web
Web
Wikipedia
Wikipedia
Windows
Windows
Won't fix
Won't fix
World Map
World Map
No project
No assignees
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: organicmaps/organicmaps-tmp#4549
No description provided.