Closed ellik159 closed 1 month ago
Hi! Thanks for opening your first issue here! :smile:
Edit: This was working fine until I updated to flutter_rust_bridge version 2.5.0. After the update, the crash began happening. I didn't make any other changes, and the crash occurred immediately following the version upgrade.
Firstly, it would be great if the stack trace is symbolicated, thus we can know which line of code causes the crash.
Secondly, could you please bisect to see which commit introduces the error? (e.g. does 2.4.0 work; or even better - which commit on master branch makes it fail)
I'm seeing something very similar to this running on a simulator in debug mode but so far not in release mode on device. I'll try with 2.4.0 and see if it happens there.
The Flutter DevTools debugger and profiler on sdk gphone64 arm64 is available at:
http://127.0.0.1:9101?uri=http://127.0.0.1:53025/3bRGJsxCGPc=/
F/libc ( 4681): Fatal signal 6 (SIGABRT), code -1 (SI_QUEUE) in tid 4744 (DartWorker), pid 4681 (com.plastaq.m)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'google/sdk_gphone64_arm64/emu64a:15/AE3A.240806.005/12228598:userdebug/dev-keys'
Revision: '0'
ABI: 'arm64'
Timestamp: 2024-10-22 10:49:52.305822269+0700
Process uptime: 10s
Cmdline: com.plastaq.m
pid: 4681, tid: 4744, name: DartWorker >>> com.plastaq.m <<<
uid: 10206
tagged_addr_ctrl: 0000000000000001 (PR_TAGGED_ADDR_ENABLE)
pac_enabled_keys: 000000000000000f (PR_PAC_APIAKEY, PR_PAC_APIBKEY, PR_PAC_APDAKEY, PR_PAC_APDBKEY)
signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
x0 0000000000000000 x1 0000000000001288 x2 0000000000000006 x3 000000759ba77f00
x4 0000000000020380 x5 0000000000020380 x6 0000000000020380 x7 000000758b9b455c
x8 00000000000000f0 x9 00000078d7927468 x10 ffffff80fffffb9f x11 0000000000000000
x12 0000000000000003 x13 0000000000000012 x14 0000000000000000 x15 000000000000000c
x16 00000078d79d6ff8 x17 00000078d79c11c0 x18 000000759a4a0000 x19 0000000000001249
x20 0000000000001288 x21 00000000ffffffff x22 000000758bd9c888 x23 000000758bb6e178
x24 00000075a5112b38 x25 b4000077ee2c5080 x26 b4000077ee2c50a8 x27 00000000004c4b40
x28 00000075a5191000 x29 000000759ba77f80
lr 00000078d795f6a4 sp 000000759ba77ee0 pc 00000078d795f6d4 pst 0000000000001000
27 total frames
backtrace:
#00 pc 000000000005b6d4 /apex/com.android.runtime/lib64/bionic/libc.so (abort+168) (BuildId: 1b9fecf834d610f77e641f026ca7269b)
#01 pc 000000000043e4fc /data/app/~~mxKRFHEgqQKmErgcksCuvA==/com.plastaq.m-mS9EjAjh-R0YcHI8V32-1g==/base.apk (offset 0x3aa0000)
#02 pc 000000000043b96c /data/app/~~mxKRFHEgqQKmErgcksCuvA==/com.plastaq.m-mS9EjAjh-R0YcHI8V32-1g==/base.apk (offset 0x3aa0000)
#03 pc 000000000043b678 /data/app/~~mxKRFHEgqQKmErgcksCuvA==/com.plastaq.m-mS9EjAjh-R0YcHI8V32-1g==/base.apk (offset 0x3aa0000)
#04 pc 0000000000439a08 /data/app/~~mxKRFHEgqQKmErgcksCuvA==/com.plastaq.m-mS9EjAjh-R0YcHI8V32-1g==/base.apk (offset 0x3aa0000)
#05 pc 000000000043b370 /data/app/~~mxKRFHEgqQKmErgcksCuvA==/com.plastaq.m-mS9EjAjh-R0YcHI8V32-1g==/base.apk (offset 0x3aa0000)
#06 pc 000000000045438c /data/app/~~mxKRFHEgqQKmErgcksCuvA==/com.plastaq.m-mS9EjAjh-R0YcHI8V32-1g==/base.apk (offset 0x3aa0000)
#07 pc 0000000000454404 /data/app/~~mxKRFHEgqQKmErgcksCuvA==/com.plastaq.m-mS9EjAjh-R0YcHI8V32-1g==/base.apk (offset 0x3aa0000)
#08 pc 00000000002546ac /data/app/~~mxKRFHEgqQKmErgcksCuvA==/com.plastaq.m-mS9EjAjh-R0YcHI8V32-1g==/base.apk (offset 0x3aa0000)
#09 pc 0000000000254cd0 /data/app/~~mxKRFHEgqQKmErgcksCuvA==/com.plastaq.m-mS9EjAjh-R0YcHI8V32-1g==/base.apk (offset 0x3aa0000)
#10 pc 0000000000254b70 /data/app/~~mxKRFHEgqQKmErgcksCuvA==/com.plastaq.m-mS9EjAjh-R0YcHI8V32-1g==/base.apk (offset 0x3aa0000)
#11 pc 00000000002551f8 /data/app/~~mxKRFHEgqQKmErgcksCuvA==/com.plastaq.m-mS9EjAjh-R0YcHI8V32-1g==/base.apk (offset 0x3aa0000)
#12 pc 00000000002545f4 /data/app/~~mxKRFHEgqQKmErgcksCuvA==/com.plastaq.m-mS9EjAjh-R0YcHI8V32-1g==/base.apk (offset 0x3aa0000)
#13 pc 00000000002545c8 /data/app/~~mxKRFHEgqQKmErgcksCuvA==/com.plastaq.m-mS9EjAjh-R0YcHI8V32-1g==/base.apk (offset 0x3aa0000)
#14 pc 000000000024f5e8 /data/app/~~mxKRFHEgqQKmErgcksCuvA==/com.plastaq.m-mS9EjAjh-R0YcHI8V32-1g==/base.apk (offset 0x3aa0000)
#15 pc 00000000002511b8 /data/app/~~mxKRFHEgqQKmErgcksCuvA==/com.plastaq.m-mS9EjAjh-R0YcHI8V32-1g==/base.apk (offset 0x3aa0000) (free_zero_copy_buffer_u8+64)
#16 pc 0000000002517a58 /data/app/~~mxKRFHEgqQKmErgcksCuvA==/com.plastaq.m-mS9EjAjh-R0YcHI8V32-1g==/base.apk!libflutter.so (offset 0x14b5000) (BuildId: 401fddf00828b4e4366640aa543d24715c00b6bd)
#17 pc 00000000022200a0 /data/app/~~mxKRFHEgqQKmErgcksCuvA==/com.plastaq.m-mS9EjAjh-R0YcHI8V32-1g==/base.apk!libflutter.so (offset 0x14b5000) (BuildId: 401fddf00828b4e4366640aa543d24715c00b6bd)
#18 pc 000000000236973c /data/app/~~mxKRFHEgqQKmErgcksCuvA==/com.plastaq.m-mS9EjAjh-R0YcHI8V32-1g==/base.apk!libflutter.so (offset 0x14b5000) (BuildId: 401fddf00828b4e4366640aa543d24715c00b6bd)
#19 pc 000000000236b49c /data/app/~~mxKRFHEgqQKmErgcksCuvA==/com.plastaq.m-mS9EjAjh-R0YcHI8V32-1g==/base.apk!libflutter.so (offset 0x14b5000) (BuildId: 401fddf00828b4e4366640aa543d24715c00b6bd)
#20 pc 000000000236bae0 /data/app/~~mxKRFHEgqQKmErgcksCuvA==/com.plastaq.m-mS9EjAjh-R0YcHI8V32-1g==/base.apk!libflutter.so (offset 0x14b5000) (BuildId: 401fddf00828b4e4366640aa543d24715c00b6bd)
#21 pc 000000000236c600 /data/app/~~mxKRFHEgqQKmErgcksCuvA==/com.plastaq.m-mS9EjAjh-R0YcHI8V32-1g==/base.apk!libflutter.so (offset 0x14b5000) (BuildId: 401fddf00828b4e4366640aa543d24715c00b6bd)
#22 pc 000000000233781c /data/app/~~mxKRFHEgqQKmErgcksCuvA==/com.plastaq.m-mS9EjAjh-R0YcHI8V32-1g==/base.apk!libflutter.so (offset 0x14b5000) (BuildId: 401fddf00828b4e4366640aa543d24715c00b6bd)
#23 pc 0000000002337a6c /data/app/~~mxKRFHEgqQKmErgcksCuvA==/com.plastaq.m-mS9EjAjh-R0YcHI8V32-1g==/base.apk!libflutter.so (offset 0x14b5000) (BuildId: 401fddf00828b4e4366640aa543d24715c00b6bd)
#24 pc 00000000022ca1fc /data/app/~~mxKRFHEgqQKmErgcksCuvA==/com.plastaq.m-mS9EjAjh-R0YcHI8V32-1g==/base.apk!libflutter.so (offset 0x14b5000) (BuildId: 401fddf00828b4e4366640aa543d24715c00b6bd)
#25 pc 000000000006c354 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+196) (BuildId: 1b9fecf834d610f77e641f026ca7269b)
#26 pc 000000000005efc4 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 1b9fecf834d610f77e641f026ca7269b)
I tried 2.4.0 and also see the crash there and tried both Android 14 and 15 and see the crash there in both cases. I do not however see the crash running in release mode on an actual device.
Looks like same crash in free_zero_copy_buffer_u8
?
Hmm, could you please try https://github.com/shekohex/allo-isolate/issues/61 to see whether the PR there fixes? (That one is about a bug in free_zero_copy_buffer_u8 in allo-isolate, a lib that flutter_rust_bridge uses)
@fzyzcjy That patch seems to fix the issue for me here. Thanks!
@fzyzcjy Thanks!
Happy to see it works!
This issue is now fixed in v0.1.26 of allo-isolate btw
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new issue.
Describe the bug
I am encountering a crash immediately upon launching my Flutter app that uses flutter_rust_bridge. The issue occurs consistently on Android when I open the app right after integrating the Rust library using flutter_rust_bridge. I am using the default generated code from flutter_rust_bridge.
Steps to reproduce
Logs
Expected behavior
No response
Generated binding code
No response
OS
No response
Version of
flutter_rust_bridge_codegen
flutter_rust_bridge_codegen 2.5.0
Flutter info
Version of
clang++
No response
Additional context
No response