-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
App crashes on release mode #625
Comments
No there is no need to add any entry in ProGuard. |
I found the reason I am loading two charts on the same screen scatter chart and bar chart it is crashing on release mode do you have any how to resolve this? |
for "release mode" You can see the error by Android Studio LogCat! |
@Mohdx This is a memory violation issue in LogCat! |
Hey @abdussamad0 |
Ran the app in profile mode and got this in my log after crash
|
Are you sure it is related to |
I've downgraded my |
I need more details to fix this issue. |
Flutter version 2.0.6 (Stable) in my App i use grouped bar chart , line chart, line area chart build apk then if i install app-arm64-v8a-release.apk in my device(oneplus 7t(arm64-v8)) and i open dashboard app worked fine without crashed but if install app-armeabi-v7a-release.apk in my device(oneplus 7t(arm64-v8)) then i open dashboard app crashed other pages worked . can you pls use multiple (bar chart, line chart) chart in same page and check.. |
Flutter version 2.0.6 (Stable) |
@Sachinsowri Yes this is the main cause of the crash, you are in the right direction |
@imaNNeoFighT I forked your code and applied exceptional handling on painter class where the grid lines were being drawn and the crash went away |
I have the same problem, So I try to using the example to find the problem, when I change the dart environment to |
My log is the same as this, and I download the latest source code directly Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z (greylist, linking, allowed) Build fingerprint: 'OnePlus/OnePlus5/OnePlus5:10/:user/release-keys' |
Guys, I ran a sample code in a release mode. and everything works well on my device.
Please check my sample code and let me know if it crashes in release mode. |
pls Check barchart with FlGridData, line chart not crashed |
Hi, I fix two problems.
double minX, maxX; AxisChartData({ I changed it to this way late double minX, maxX; then all crash will be fix |
Hi, I ran another sample code (which contains a BarChart) in a release mode (using
|
Can you run it with flutter 2.2.0 and let me know whether it is fixed or not? |
@imaNNeoFighT you should build apk with this command:flutter build apk --split-per-abi;And install apk-armeabi-v7a,then apk is crashed |
@abdussamad0 hey man, Can you tell me how it was repaired? |
@WxqKb |
thanks,It really worked out!The friendship between China and Pakistan is everlasting |
@WxqKb most welcome! @imaNNeoFighT please fix this issue |
I have an app that crashes in release mode when a line and bar chart are used inside of a pageview. If I remove the line chart then the bar chart will work fine. The only way I can get them both to work is if I remove 06-11 14:46:47.481 4938 4983 F libc : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x402e0007 in tid 4983 (1.ui), pid 4938 (com.example.app)
06-11 14:46:47.579 5107 5107 I crash_dump32: obtaining output fd from tombstoned, type: kDebuggerdTombstone
06-11 14:46:47.581 1246 1246 I /system/bin/tombstoned: received crash request for pid 4983
06-11 14:46:47.582 5107 5107 I crash_dump32: performing dump of process 4938 (target tid = 4983)
06-11 14:46:47.630 5107 5107 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
06-11 14:46:47.630 5107 5107 F DEBUG : Build fingerprint: 'motorola/jeter/jeter:9/PPPS29.118-68-9/329ef:user/release-keys'
06-11 14:46:47.630 5107 5107 F DEBUG : Revision: 'P4'
06-11 14:46:47.631 5107 5107 F DEBUG : ABI: 'arm'
06-11 14:46:47.631 5107 5107 F DEBUG : pid: 4938, tid: 4983, name: 1.ui >>> com.example.app <<<
06-11 14:46:47.631 5107 5107 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x402e0007
06-11 14:46:47.631 5107 5107 F DEBUG : r0 00000007 r1 00000000 r2 8c57089d r3 8c565bd5
06-11 14:46:47.631 5107 5107 F DEBUG : r4 8f68642d r5 8f9ca661 r6 00000013 r7 9044563c
06-11 14:46:47.631 5107 5107 F DEBUG : r8 402e0000 r9 00000004 r10 904f8600 r11 920448e8
06-11 14:46:47.631 5107 5107 F DEBUG : ip 8c567a28 sp 92044820 lr 910e7780 pc 90f39064
06-11 14:46:47.633 5107 5107 F DEBUG :
06-11 14:46:47.633 5107 5107 F DEBUG : backtrace:
06-11 14:46:47.633 5107 5107 F DEBUG : #00 pc 00325064 /data/app/com.example.app-rCmFUMxES9NcNQuOzZ7ZSA==/lib/arm/libapp.so (offset 0xc000) (_kDartIsolateSnapshotInstructions+3248228)
06-11 14:46:48.813 1842 5110 W ActivityManager: Force finishing activity com.example.app/com.example.app.MainActivity $ flutter --version
Flutter 2.2.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 02c026b03c (2 weeks ago) • 2021-05-27 12:24:44 -0700
Engine • revision 0fdb562ac8
Tools • Dart 2.13.1 |
I am having the same issue. I have 1 line chart, 3 bar charts and 2 scatter charts on the same page. The scatter charts crash the app in release mode. If I comment out the scatter charts, the crash goes away. If I run in debug mode, the crash goes away also. There is no stack trace when running in release mode. Below is the stack trace when running in profile mode. It looks like you are dereferencing a null variable, possibly adding a ! to the end of a variable that has a null value.
|
I did what you said.
I compiled this code using |
Additional info: I'll see if I can come up with a minimal example that reproduces this crash so you can test. |
I created a new flutter project with the attached main.dart file. It contains 2 charts, a bar chart and a scatter chart, taken from your samples. flutter run => no error Here is some reproducible code: |
i have same error when i run in relese mode. and i run your exmple code .it also crashed
|
EDIT: As the stack trace already indicated, it seems to be related to range annotations. Once I disable range annotations for both charts, everything works as expected. I'm also experiencing this issue when using BarChart and LineChart together in release mode... If I un-comment one of charts everything works as expected. The stack trace looks as follows:
|
Now I can reproduce the crash (Thanks @ozzy1873 for the reproducible code) @flocbit Where did you find this output? I couldn't find any stack trace. |
@imaNNeoFighT I don't know if it helps but I've been getting a crash in release (fine in debug) using the latest flutter stable whenever I use |
I am thinking it is a compiler bug because the code appears to be missing when compiled for release. You can add print statements that never get printed. Maybe a ProGuard statement would fix it? You may have to report it to Google. |
Yes, that is true about rangeAnnotations. |
The stack trace was recorded by Firebase Crashlytics. |
I have found that the app crashes when using both gridData: FlGridData(
getDrawingHorizontalLine: (value) => FlLine(
strokeWidth: 2,
dashArray: [8, 8],
color: Colors.black,
),
checkToShowHorizontalLine: (_) => true,
), If you use the following the app will not crash: gridData: FlGridData(show: false), The last version of // @dart=2.9 This is not an ideal solution and means virtually all of the charts are redundant when using a null safe version. Please look further into this issue 👍 |
My app was crashing for releases on ARMv7 devices only and I couldn't figure out why. After debugging the native apk here, it appeared that the fatal crash was caused by this package and in particular this file: fl_chart/src/chart/base/axis_chart/axis_chart_painter.dart |
This is a compiler bug. Follow flutter/flutter#91370 for updates. |
Crashed mine too in release mode only. App works fine until chart is loaded. When chart is being loaded app crashes. |
This should be fixed on Flutter master channel now. |
Thanks, @mraleph, |
Still having this issue
Flutter 2.8.1 • channel stable • https://github.com/flutter/flutter.git F/libc ( 1891): Fatal signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x704030000f in tid 1967 (1.ui), pid 1891 (com.ex.app) Build fingerprint: 'Nokia/TA-1052_00WW/NB1:9/PPR1.180610.011/00WW_5_15K:user/release-keys' |
@yura2000 Please read the two comments above your reaction. It's an issue in Dart/Flutter. A temporary fix is mentioned here: #625 (comment) |
Can you please check it with the latest version of flutter and fl_chart? |
@imaNNeoFighT Flutter 2.10.1 fixed the issue for me! |
Good. I will close this issue. |
The app continuously crashing whenever I load any chart only in release mode do add an entry in the ProGuard file? if yes what should be ?
The text was updated successfully, but these errors were encountered: