Can't shutdown and restart GeckoRuntime in the same app
Categories
(GeckoView :: General, defect)
Tracking
(Not tracked)
People
(Reporter: iansphilips, Unassigned)
Details
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:65.0) Gecko/20100101 Firefox/65.0
Steps to reproduce:
I call mRuntime.shutdown() on my GeckoRuntime instance and wait for the onShutdown() callback as well as the GeckoThread to shutdown. I know the GeckoThread has exited by checking the following messages:
GeckoThread: State changed to EXITING
GeckoThread: State changed to EXITED
When I try to re-create a runtime via GeckoRuntime.create(view.getContext());
I get the following error : GeckoRuntime: init failed (could not initiate GeckoThread)
Which (from examining the GeckoThread's initInternal(final InitInfo info) method) is called because the GeckoThread's mInitialized variable is true, and is not set to false even after exiting.
Expected results:
Is there a different way to restart a GeckoRuntime or is it a bug that GeckoThread, once initialized, never sets mInitialized to false even after exiting?
Comment 1•6 years ago
|
||
Hi Ian, thanks for reporting this issue. GeckoRuntime is currently designed to be initialized once in a process. Can you clean up by closing your GeckoSession objects instead of starting and restarting the GeckoRuntime? Alternatively, you could isolate GeckoRuntime in a separate process so you can clean up and restart that whole process.
@ snorp, I was told to ask you about a "Remote runtime process bug" that might be related to GeckoRuntime initialization?
I'm not sure if we have a remote GeckoRuntime bug yet, but it is something we plan to work on at some point.
| Reporter | ||
Comment 3•6 years ago
|
||
Indeed I can clean up by closing my sessions. I'm not exactly sure why it was crashing but occasionally the GeckoRuntime would crash if I was watching 360 videos with low memory, so I was looking for a way to restart the runtime. It seems that by freeing up extra memory I've been able to prevent GeckoRuntime from crashing.
I'm new to Android development so I'll have to investigate the separate process idea, thanks for the suggestion!
Comment 4•6 years ago
|
||
(In reply to iansphilips from comment #3)
Indeed I can clean up by closing my sessions. I'm not exactly sure why it was crashing but occasionally the GeckoRuntime would crash if I was watching 360 videos with low memory, so I was looking for a way to restart the runtime. It seems that by freeing up extra memory I've been able to prevent GeckoRuntime from crashing.
I'm glad that worked! Android video crashes are often related to low memory, so trying to clean up other memory before and/or after playing a video might help.
Description
•