Skip to content
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

Fix crash on plugin reload #895

Merged
merged 2 commits into from
Jan 18, 2024
Merged

Conversation

CranberrySoup
Copy link
Contributor

The patch fixes this error:

Process: com.lagradost.cloudstream3.prerelease.debug, PID: 13521
java.util.ConcurrentModificationException
at java.util.LinkedHashMap$LinkedHashIterator.nextNode(LinkedHashMap.java:760)
at java.util.LinkedHashMap$LinkedKeyIterator.next(LinkedHashMap.java:782)
at com.lagradost.cloudstream3.utils.Event.invoke(Event.kt:25)
at com.lagradost.cloudstream3.plugins.PluginManager.loadAllLocalPlugins(PluginManager.kt:452)
at com.lagradost.cloudstream3.plugins.PluginManager.hotReloadAllLocalPlugins(PluginManager.kt:423)
at com.lagradost.cloudstream3.MainActivity$Companion.handleAppIntentUrl(MainActivity.kt:377)
at com.lagradost.cloudstream3.MainActivity.handleAppIntent(MainActivity.kt:696)
at com.lagradost.cloudstream3.MainActivity.onNewIntent(MainActivity.kt:688)
at android.app.Activity.performNewIntent(Activity.java:8321)
at android.app.Instrumentation.callActivityOnNewIntent(Instrumentation.java:1517)
at android.app.Instrumentation.callActivityOnNewIntent(Instrumentation.java:1530)
at android.app.ActivityThread.deliverNewIntents(ActivityThread.java:3822)
at android.app.ActivityThread.handleNewIntent(ActivityThread.java:3829)
at android.app.servertransaction.NewIntentItem.execute(NewIntentItem.java:56)
at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2307)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7872)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)

Caused by modifying observers when iterating over them. This happens often when using deployWithAdb, which reloads all plugins.

@fire-light42 fire-light42 merged commit 5af1b80 into recloudstream:master Jan 18, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants