-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
"Encountered context mismatch" trying to debug RegExp-using application #26941
Comments
Also @turnidge FYI |
Not knowing the proper git incantation to fetch your branch, I just downloaded the zip file and expanded it on top of my flutter engine. When running the command dart --checked --observe lib/main.dart ../.. The dart executable comes from here: Am I supposed to point the packages root to somewhere? |
Oh, sorry, missed a step. Run |
Thanks! That helped. I can see the progress count, so I need to be patient now. |
Might be related: #26948 |
Thanks! Indeed, it could be related. I am adding the full stack trace which may be helpful in debugging: Debugger stack trace... #0000 [ Frame pc(0x7fb15374d203) fp(0x7fb153ffd920) sp(0x7fb153ffd900) context level = 0 ] |
@Hixie Can you confirm that you also saw an issue where regular expressions stopped making progress? We might need to block Dart 1.18 release on this issue. |
I thought I did, but further study suggested I just had pathological expressions and they were just taking forever to complete. (That's why I was trying to connect the debugger, to find out what expression was the problem.) |
Unfortunately, the fix for #26948 does not fix this issue. In debug mode, the debugger crashes with an assert fault before reporting the context mismatch: runtime/vm/object.cc: 237: error: expected: strlen(cname) == static_cast<size_t>(name.Length()) It looks like the debugger is having trouble scrubbing a name containing a regexp. At least, the length is not consistent (e.g. 6478 vs 6482). The same inconsistency exists in release mode, before the context mismatch is reported. But I verified that the mismatch is not a consequence of scrubbing the name. Let me dig deeper... |
…ext call of for-in loops (second attempt at fixing #26941). R=hausner@google.com Review URL: https://codereview.chromium.org/2193113002 .
…ext call of for-in loops (second attempt at fixing #26941). R=hausner@google.com Review URL: https://codereview.chromium.org/2193113002 .
I don't have a minimised test case for this but I can reproduce it reliably:
Run through these steps to get yourself a Flutter engine repo:
https://github.com/flutter/engine/blob/master/CONTRIBUTING.md
You shouldn't need to actually build an engine but you may need to at least get the dependencies.
Fetch this branch: https://github.com/Hixie/sky_engine/tree/debugger-crash
Open a terminal in the
tools/licenses
directory of that repo.run
dart --checked --observe lib/main.dart ../..
It will say "Preparing data structures..." for a while, then "Collecting licenses...", then it will show a progress count. As soon as it shows a progress count (no need to rush, that count will take hours to complete), load up http://localhost:8181/ and click "debug".
The VM crashes with:
I can provide a full crash log on request.
The text was updated successfully, but these errors were encountered: