-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
[React] ConcurrentModificationError #149
Comments
|
No, bootstrap has nothing about this. It has to be something else. |
What’s the stack trace? |
Sorry, I removed it accidentally when editing the message.
|
Video demo: 1.mp42.mp4 |
A dispose function is being registered on the capsule (or maybe a listener/onNextUpdate) while the capsule is being disposed. Can perhaps look into it more later, but if this exact same scenario works as expected over in the flutter package, I’d take a look at your usages of any container listeners or onNextUpdate calls that may add in a dispose listener to a capsule that may be getting disposed |
Btw I just made private a bunch of Consumer stuff (which I don't know why they are public on the Flutter implementation if they can be private):
|
id have the check the code to be sure, but I believe that’s because they’re defined on a package or library-private class, I.e. they aren’t apart of the public API anyways |
The issue is a call to registerDispose somewhere I believe, being called on a capsule’s (whether user-defined or temporary) disposal |
I detected something weird caused on the |
You are right. On the flutter implementation they are on a private class. On the react one, on a public class. |
I simplified the example to this case test: just one component, one capsule, a button and a Timer. I'm not sure whether this issue (Workiva/react-dart#393) can be the cause of this unexpected behaviour. I compared the flutter and react implementations and they are pretty the same. Image description: Two bootstrappers created, and two apps created (on one render call). For now I cannot just create one component only (always a minimum of two) |
I'm thinking of doing a UPDATE |
I tested again with my But the error isn't there. Every // Clears the old dependencies (which will be repopulated via WidgetHandle)
_clearDependencies();
When triggered by the button click, the execution flow seems the same, but not failing... : |
Solved. Solution: Also, this issue helped to detect a non-fatal issue on |
I'm getting an error with this code inside a
RearchConsumer.build
method on the new React port. It works well in the Flutter counterpartIt fails after 10 seconds on the
Timer
callback execution.Have you any idea on why it's happening?
It fails too with
callonce
+ (Timer or Future.delayed). It's weird because it works well when triggered by a button click, which should produce an identical outcome as they are equally async...The text was updated successfully, but these errors were encountered: