-
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
object.cc: 16408: error: unreachable code when calling _typeOf<Provider<S>>() #32942
Comments
Tentatively targeting beta4 |
I am not able to reproduce this right away - hot reload seems to be working fine as I am making changes to 'Flutter Redux Demo' and 'Flutter Demo Home Page' string literals in the code sample above.
@affinnen can you share more details what you change when the hot reload fails for you? |
Try changing the theme color.
|
Hot reloading while changing |
@aam, here are the exact repro steps.
Visual Studio Code: Version 1.22.2
|
/cc @crelier |
Can't repro this on iOS simulator on mac neither. |
@affinnen wrote:
Can you please clarify whether it crashes for you only when you replace complete hello_world app with your sample and do hot reload, while hot reload works fine if you start from your sample and hot reload incremental change(like changing |
Here is the stacktrace with line numbers
|
Since we are having trouble reproducing this, I could add some defensive code to prevent this from happening. Hot reload is brittle anyway, so more robust coding cannot hurt. I cannot guarantee it would not crash later, though. From the stack trace above, I see that a type argument vector is being canonicalized, and a type argument in the vector is null. This can happen for recursive types, when they are not yet finalized. But this should not happen at runtime. This is probably an issue with hot reload, but until we can reproduce it, I do not know why this is happening. The fix would be to guard these lines in object.cc against a null type argument:
What do you think? |
Starting from the app below, then changing three lines marked with
|
Changing the super type of class |
Current theory is that hot-reload request should have been rejected because _MyHomePageState class got different number of type parameters(used to be 1, now it is 2). Since it was not rejected, that leads to the crash further down the pipeline. |
… change. Bug: #32942 Change-Id: I7f10a327a82ddf23a946b1ba98c63c2e7947d99f Reviewed-on: https://dart-review.googlesource.com/54313 Commit-Queue: Alexander Aprelev <aam@google.com> Reviewed-by: Régis Crelier <regis@google.com>
There might be better fix with using canonical types for comparison, we just need to make sure we canonicalize class's type when finalizing it. Bug:#32942 Change-Id: I2301a7cb91146d587893f91f2d6ee7b731ea3c62 Reviewed-on: https://dart-review.googlesource.com/54314 Commit-Queue: Alexander Aprelev <aam@google.com> Reviewed-by: Régis Crelier <regis@google.com>
Fixed via 2ad715e |
This code does not fail on startup, but during hot reload.
Flutter version
Flutter 0.3.0 • channel dev • https://github.com/flutter/flutter.git
Framework • revision c73b8a7cf6 (7 days ago) • 2018-04-12 16:17:26 -0700
Engine • revision 8a6e64a8ef
Tools • Dart 2.0.0-dev.47.0.flutter-4126459025
Repro code
Log Failure:
Initializing hot reload...
E/DartVM ( 3758): ../../third_party/dart/runtime/vm/object.cc: 16408: error: unreachable code
E/DartVM ( 3758): Dumping native stack trace for thread ec6
E/DartVM ( 3758): [0x0000736d9c49df67] Unknown symbol
E/DartVM ( 3758): [0x0000736d9c49df67] Unknown symbol
E/DartVM ( 3758): [0x0000736d9c739786] Unknown symbol
E/DartVM ( 3758): -- End of DumpStackTrace
F/libc ( 3758): Fatal signal 6 (SIGABRT), code -6 in tid 3782 (Thread-2)
Build fingerprint: 'Android/sdk_google_phone_x86_64/generic_x86_64:7.0/NYC/4662066:userdebug/dev-keys'
Revision: '0'
ABI: 'x86_64'
pid: 3758, tid: 3782, name: Thread-2 >>> com.example.helloworld <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
rax 0000000000000000 rbx 0000736d9b5654f8 rcx ffffffffffffffff rdx 0000000000000006
rsi 0000000000000ec6 rdi 0000000000000eae
r8 0000000000000000 r9 000000000000001f r10 0000000000000008 r11 0000000000000202
r12 0000000000000ec6 r13 0000000000000006 r14 0000736d9c7a2837 r15 0000736d9b55dbd0
cs 0000000000000033 ss 000000000000002b
rip 0000736db7c93b67 rbp 0000000000000000 rsp 0000736d9b55da38 eflags 0000000000000202
backtrace:
#00 pc 000000000008db67 /system/lib64/libc.so (tgkill+7)
#1 pc 000000000008a601 /system/lib64/libc.so (pthread_kill+65)
#2 pc 0000000000030241 /system/lib64/libc.so (raise+17)
#3 pc 000000000002877d /system/lib64/libc.so (abort+77)
#4 pc 000000000078c695 /data/app/com.example.helloworld-1/lib/x86_64/libflutter.so
#5 pc 0000000000a8078a /data/app/com.example.helloworld-1/lib/x86_64/libflutter.so
#6 pc 0000000000750ed2 /data/app/com.example.helloworld-1/lib/x86_64/libflutter.so
#7 pc 0000000000704cf6 /data/app/com.example.helloworld-1/lib/x86_64/libflutter.so
#8 pc 000000000071e48f /data/app/com.example.helloworld-1/lib/x86_64/libflutter.so
#9 pc 000000000082ea2c /data/app/com.example.helloworld-1/lib/x86_64/libflutter.so
#10 pc 000000000000063a anonymous:0000736d98940000
#11 pc 0000000000020fa0 anonymous:0000736d8f580000
#12 pc 0000000000020840 anonymous:0000736d8f580000
#13 pc 0000000000002233 anonymous:0000736d8de00000
#14 pc 0000000000008523 anonymous:0000736d8e100000
#15 pc 000000000000768c anonymous:0000736d8e100000
#16 pc 0000000000006f98 anonymous:0000736d8e100000
#17 pc 000000000003f2c6 anonymous:0000736d8e100000
#18 pc 000000000000687f anonymous:0000736d8e100000
#19 pc 00000000000054b2 anonymous:0000736d8e100000
#20 pc 00000000000046af anonymous:0000736d8e100000
#21 pc 000000000000887b anonymous:0000736d8e100000
#22 pc 000000000000768c anonymous:0000736d8e100000
#23 pc 0000000000006f98 anonymous:0000736d8e100000
#24 pc 000000000000687f anonymous:0000736d8e100000
#25 pc 00000000000054b2 anonymous:0000736d8e100000
#26 pc 00000000000046af anonymous:0000736d8e100000
#27 pc 0000000000031077 anonymous:0000736d8db80000
#28 pc 00000000000054b2 anonymous:0000736d8e100000
#29 pc 00000000000046af anonymous:0000736d8e100000
#30 pc 0000000000031077 anonymous:0000736d8db80000
#31 pc 00000000000054b2 anonymous:0000736d8e100000
#32 pc 00000000000046af anonymous:0000736d8e100000
#33 pc 0000000000031077 anonymous:0000736d8db80000
#34 pc 00000000000054b2 anonymous:0000736d8e100000
#35 pc 00000000000046af anonymous:0000736d8e100000
#36 pc 0000000000031077 anonymous:0000736d8db80000
#37 pc 00000000000054b2 anonymous:0000736d8e100000
#38 pc 00000000000046af anonymous:0000736d8e100000
#39 pc 000000000000887b anonymous:0000736d8e100000
#40 pc 000000000000768c anonymous:0000736d8e100000
#41 pc 0000000000006f98 anonymous:0000736d8e100000
#42 pc 000000000003f2c6 anonymous:0000736d8e100000
#43 pc 000000000000687f anonymous:0000736d8e100000
#44 pc 00000000000054b2 anonymous:0000736d8e100000
#45 pc 00000000000046af anonymous:0000736d8e100000
#46 pc 000000000000887b anonymous:0000736d8e100000
#47 pc 000000000000768c anonymous:0000736d8e100000
#48 pc 0000000000006f98 anonymous:0000736d8e100000
#49 pc 000000000000687f anonymous:0000736d8e100000
#50 pc 00000000000054b2 anonymous:0000736d8e100000
#51 pc 00000000000046af anonymous:0000736d8e100000
#52 pc 000000000000887b anonymous:0000736d8e100000
#53 pc 000000000000768c anonymous:0000736d8e100000
#54 pc 0000000000006f98 anonymous:0000736d8e100000
#55 pc 000000000003f2c6 anonymous:0000736d8e100000
#56 pc 000000000000687f anonymous:0000736d8e100000
#57 pc 00000000000054b2 anonymous:0000736d8e100000
#58 pc 00000000000046af anonymous:0000736d8e100000
#59 pc 0000000000031077 anonymous:0000736d8db80000
#60 pc 00000000000054b2 anonymous:0000736d8e100000
#61 pc 00000000000046af anonymous:0000736d8e100000
#62 pc 000000000000887b anonymous:0000736d8e100000
#63 pc 000000000000768c anonymous:0000736d8e100000
Lost connection to device.
The text was updated successfully, but these errors were encountered: