Skip to content
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

Closed
abdussamad0 opened this issue Apr 3, 2021 · 48 comments
Closed

App crashes on release mode #625

abdussamad0 opened this issue Apr 3, 2021 · 48 comments
Labels
bug Something isn't working Fundamental

Comments

@abdussamad0
Copy link

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 ?

@imaNNeo
Copy link
Owner

imaNNeo commented Apr 3, 2021

No there is no need to add any entry in ProGuard.
can you give us the error code?
Or a reproducible code?

@abdussamad0
Copy link
Author

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?

@Mohdx
Copy link

Mohdx commented Apr 6, 2021

for "release mode" You can see the error by Android Studio LogCat!

@abdussamad0
Copy link
Author

@Mohdx This is a memory violation issue in LogCat!

@mustafabhatkar
Copy link

Hey @abdussamad0
Any solution to this crash? I am using VSCode and am not seeing any log for the crash in the release mode. Even Crashlytics isn't reporting this crash 🤔

@mustafabhatkar
Copy link

mustafabhatkar commented Apr 16, 2021

Ran the app in profile mode and got this in my log after crash

Accessing hidden method Lsun/misc/Unsafe;->compareAndSwapObject(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z (greylist, linking, allowed)
F/libc    (15149): Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x7 in tid 16174 (1.ui), pid 15149 (example.app)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'OnePlus/OnePlus5/OnePlus5:10/:user/release-keys'
Revision: '0'
ABI: 'arm64'
Timestamp: 2021-04-17 00:47:46+0530
pid: 15149, tid: 16174, name: 1.ui  >>> com.example.app <<<
uid: 11236
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x7
Cause: null pointer dereference
    x0  00000073f08dcdc9  x1  00000073ed703dc9  x2  00000073ed7039d9  x3  00000073ed706d09
    x4  00000073ed757479  x5  00000073ed757579  x6  00000073ed7038d9  x7  00000073ed703919
    x8  00000000000012c8  x9  0000000000000000  x10 0000000000000002  x11 0000000000000a00
    x12 00000000075b4900  x13 00000074149c3018  x14 0000000000000030  x15 000000740661cd90
    x16 0000000000330104  x17 00000075037be070  x18 0000007401704000  x19 0000007403499cb4
    x20 0000000000000000  x21 0000007414adb700  x22 00000073f3b08041  x23 0000007406545000
    x24 00000073f3b109a1  x25 0000007406545000  x26 0000007414ec8000  x27 00000073edab47a0
    x28 0000000000000004  x29 000000740661ce78
    sp  0000007406545000  lr  00000074035a27ec  pc  00000074035a28ac
backtrace:
      #00 pc 000000000021a8ac  /data/app/com.example.app-sdjDFzK6bNjhaBGNoakvbQ==/lib/arm64/libapp.so (offset 0x10000) (_kDartIsolateSnapshotInstructions+2140332) (BuildId: 397f0562b359cfae27bb19ee692b81df)

@imaNNeo
Copy link
Owner

imaNNeo commented May 2, 2021

Are you sure it is related to fl_chart?
Can you please try to reproduce it in a clear new project (for sure you need to check it with the latest flutter version)?

@mustafabhatkar
Copy link

I've downgraded my fl_chart to 0.12.3 which is working fine for me. The app is crashing with the recent versions of the plugin. I also tried the latest 0.36.0 today on flutter 2.0.6 with no luck.

@imaNNeo
Copy link
Owner

imaNNeo commented May 2, 2021

I need more details to fix this issue.
Please provide me a reproducible code (a main.dart file)

@Sachinsowri
Copy link

Sachinsowri commented May 4, 2021

@imaNNeoFighT

Flutter version 2.0.6 (Stable)
Fl-Chart version 0.36.0

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..

@Sachinsowri
Copy link

Sachinsowri commented May 5, 2021

Flutter version 2.0.6 (Stable)
Fl-Chart version 0.36.0
in BarChart if i use gridData : FlGridData() and build it
install app-armeabi-v7a-release.apk will crashed

@abdussamad0
Copy link
Author

@Sachinsowri Yes this is the main cause of the crash, you are in the right direction

@abdussamad0
Copy link
Author

@imaNNeoFighT I forked your code and applied exceptional handling on painter class where the grid lines were being drawn and the crash went away

@moyaofen
Copy link

Are you sure it is related to fl_chart?
Can you please try to reproduce it in a clear new project (for sure you need to check it with the latest flutter version)?

I have the same problem, So I try to using the example to find the problem, when I change the dart environment to
sdk: ">=2.12.0 <3.0.0" and build with flutter build apk --release it will crashing, but if I change the dart environment to
sdk: ">=2.6.0 <3.0.0" it will no problem, no crashing

@moyaofen
Copy link

I need more details to fix this issue.
Please provide me a reproducible code (a main.dart file)

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)
F/libc (15149): Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x7 in tid 16174 (1.ui), pid 15149 (example.app)


Build fingerprint: 'OnePlus/OnePlus5/OnePlus5:10/:user/release-keys'
Revision: '0'
ABI: 'arm64'
Timestamp: 2021-04-17 00:47:46+0530
pid: 15149, tid: 16174, name: 1.ui >>> com.example.app <<<
uid: 11236
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x7
Cause: null pointer dereference
x0 00000073f08dcdc9 x1 00000073ed703dc9 x2 00000073ed7039d9 x3 00000073ed706d09
x4 00000073ed757479 x5 00000073ed757579 x6 00000073ed7038d9 x7 00000073ed703919
x8 00000000000012c8 x9 0000000000000000 x10 0000000000000002 x11 0000000000000a00
x12 00000000075b4900 x13 00000074149c3018 x14 0000000000000030 x15 000000740661cd90
x16 0000000000330104 x17 00000075037be070 x18 0000007401704000 x19 0000007403499cb4
x20 0000000000000000 x21 0000007414adb700 x22 00000073f3b08041 x23 0000007406545000
x24 00000073f3b109a1 x25 0000007406545000 x26 0000007414ec8000 x27 00000073edab47a0
x28 0000000000000004 x29 000000740661ce78
sp 0000007406545000 lr 00000074035a27ec pc 00000074035a28ac
backtrace:
#00 pc 000000000021a8ac /data/app/com.example.app-sdjDFzK6bNjhaBGNoakvbQ==/lib/arm64/libapp.so (offset 0x10000) (_kDartIsolateSnapshotInstructions+2140332) (BuildId: 397f0562b359cfae27bb19ee692b81df)

@imaNNeo
Copy link
Owner

imaNNeo commented May 14, 2021

Guys, I ran a sample code in a release mode. and everything works well on my device.

flutter --version

Flutter 2.0.6 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 1d9032c7e1 (2 weeks ago) • 2021-04-29 17:37:58 -0700
Engine • revision 05e680e202
Tools • Dart 2.12.3

fl_chart: ^0.36.1

Please check my sample code and let me know if it crashes in release mode.

@Sachinsowri
Copy link

Guys, I ran a sample code in a release mode. and everything works well on my device.

flutter --version

Flutter 2.0.6 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 1d9032c7e1 (2 weeks ago) • 2021-04-29 17:37:58 -0700
Engine • revision 05e680e202
Tools • Dart 2.12.3

fl_chart: ^0.36.1

Please check my sample code and let me know if it crashes in release mode.

pls Check barchart with FlGridData, line chart not crashed

@moyaofen
Copy link

Guys, I ran a sample code in a release mode. and everything works well on my device.

flutter --version

Flutter 2.0.6 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 1d9032c7e1 (2 weeks ago) • 2021-04-29 17:37:58 -0700
Engine • revision 05e680e202
Tools • Dart 2.12.3

fl_chart: ^0.36.1

Please check my sample code and let me know if it crashes in release mode.

Hi, I fix two problems.

  1. Sometimes viewSize or some double variable will be infinite or NaN, if you use an infinite double to a Rect variable and then use canvas to paint it, it will crash. or use a NaN to an offset, it also will be crash.

  2. About the FlGridData, I found the AxisChartData

double minX, maxX;
double minY, maxY;

AxisChartData({
.....
required double minX,
required double maxX,
required double minY,
required double maxY,
....
}) : gridData = gridData ?? FlGridData(),
axisTitleData = axisTitleData,
rangeAnnotations = rangeAnnotations ?? RangeAnnotations(),
minX = minX,
maxX = maxX,
minY = minY,
maxY = maxY,

I changed it to this way

late double minX, maxX;
late double minY, maxY;

then all crash will be fix

@imaNNeo
Copy link
Owner

imaNNeo commented May 28, 2021

Hi, I ran another sample code (which contains a BarChart) in a release mode (using flutter run --release) and everything works well on my device.

flutter --version

Flutter 2.2.0 • channel stable • https://github.com/flutter/flutter.git
Framework • revision b22742018b (13 days ago) • 2021-05-14 19:12:57 -0700
Engine • revision a9d88a4d18
Tools • Dart 2.13.0

fl_chart: ^0.36.1

@imaNNeo
Copy link
Owner

imaNNeo commented May 28, 2021

Can you run it with flutter 2.2.0 and let me know whether it is fixed or not?

@WxqKb
Copy link

WxqKb commented Jun 11, 2021

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

@WxqKb
Copy link

WxqKb commented Jun 11, 2021

@imaNNeoFighT I forked your code and applied exceptional handling on painter class where the grid lines were being drawn and the crash went away

@abdussamad0 hey man, Can you tell me how it was repaired?

@abdussamad0
Copy link
Author

@WxqKb
This is axis_chart_painter file at /lib/src/chart/base/axis_chart/axis_chart_painter.dart apply try catch at two places in _drawGrid method I am attaching screenshots

image
And
image

@WxqKb
Copy link

WxqKb commented Jun 11, 2021

@WxqKb
This is axis_chart_painter file at /lib/src/chart/base/axis_chart/axis_chart_painter.dart apply try catch at two places in _drawGrid method I am attaching screenshots

image
And
image

thanks,It really worked out!The friendship between China and Pakistan is everlasting

@abdussamad0
Copy link
Author

@WxqKb most welcome!

@imaNNeoFighT please fix this issue

@scarnett
Copy link

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 gridData from BarChartData.

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

@ozzy1873
Copy link

ozzy1873 commented Jun 14, 2021

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.

F/libc    (10623): Fatal signal 11 (SIGSEGV), code 1, fault addr 0x7 in tid 10689 (1.ui), pid 10623 (tech.supercycle)
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'google/angler/angler:8.1.0/OPM7.181205.001/5080180:user/release-keys'
Revision: '0'
ABI: 'arm64'
pid: 10623, tid: 10689, name: 1.ui  >>> com.osborntech.supercycle <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x7
Cause: null pointer dereference
    x0   0000007b90306b79  x1   0000007b936d80c1  x2   0000007b93edecc9  x3   0000007b8a7d7219
    x4   0000007b93f0bac1  x5   0000007b936d8181  x6   0000007b93f0ba81  x7   0000000000001664
    x8   0000007b93f4eaf1  x9   0000000000000000  x10  00000000000001ab  x11  00000000ffffffff
    x12  00000000000005a8  x13  00000000000005a7  x14  0000000000000000  x15  0000007b99d6a1b8
    x16  0000007c36572ca8  x17  0000007c3650f4b8  x18  0000000000000002  x19  0000007b97d1aef4
    x20  0000007b99c8f000  x21  0000007b93ab9400  x22  0000007b96408041  x23  0000007b949ba7d0
    x24  0000007b96412db1  x25  0000007b99c8f000  x26  0000007b945cf800  x27  0000007b92d832e0
    x28  0000000000000004  x29  0000007b99d6a298  x30  0000007b97d0cbd0
    sp   0000007b99c8f000  pc   0000007b97d0cc58  pstate 0000000060000000
backtrace:
    #00 pc 000000000023bc58  /data/app/com.osborntech.supercycle-W8N7Z75URakruroHuCXWPg==/base.apk (offset 0x3d5000)
    #01 pc 000000000023bbcc  /data/app/com.osborntech.supercycle-W8N7Z75URakruroHuCXWPg==/base.apk (offset 0x3d5000)
Lost connection to device.

@imaNNeo
Copy link
Owner

imaNNeo commented Jun 17, 2021

flutter build apk --split-per-abi

I did what you said.
Here is my flutter doctor result:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.2.2, on Linux, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[✓] Android Studio (version 4.1)
[✓] IntelliJ IDEA Community Edition (version 2020.3)
[✓] VS Code (version 1.56.2)
[✓] Connected device (3 available)

• No issues found!

I compiled this code using flutter build apk --split-per-abi. There wasn't any crash on my Redmi Note 8

@ozzy1873
Copy link

Additional info:
The exception handling suggested by abdussamad0 does indeed fix the crash, but maybe not for the reason we think. I added the exception handler with a print statement to print out the x and y values and the exception itself. Nothing is printed, as if the exception is never thrown. Also, as previously noted, this code does not crash when compiled for debug. Could this be because of a compiler optimization? Maybe we need a proguard statement?

I'll see if I can come up with a minimal example that reproduces this crash so you can test.

@ozzy1873
Copy link

ozzy1873 commented Jun 20, 2021

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
flutter run --release => crash
flutter run --profile => crash
comment out either chart => no error
add exception handler per abdussamad0 => no error (Android), crash (iOS)
set show=false for FlGridData for both charts => no error

Here is some reproducible code:
main.zip

@yangxuy
Copy link

yangxuy commented Jun 24, 2021

i have same error when i run in relese mode. and i run your exmple code .it also crashed

A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x7
 A/DEBUG: Cause: null pointer dereference
 A/DEBUG:     x0  000000737faf4071  x1  000000737de87ea9  x2  000000737de84609  x3  000000737deacda9
A/DEBUG:     x4  000000737de89849  x5  000000737fadc831  x6  000000737f1cefa1  x7  000000737de845c9
 A/DEBUG:     x8  000000737f107661  x9  0000000000000cb4  x10 0000000000000000  x11 000000737faf3f41
 A/DEBUG:     x12 000000737fc88001  x13 000000737fc88061  x14 000000737fc88071  x15 0000007380d8e710
A/DEBUG:     x16 000000741ba31be0  x17 000000741b9c456c  x18 0000000000000000  x19 000000737fa94f31
 A/DEBUG:     x20 0000000000000000  x21 0000007393177680  x22 000000737fc88041  x23 0000007380cb5000
A/DEBUG:     x24 000000737fc8fda1  x25 0000007380cb5000  x26 000000739308e800  x27 000000737ebcf5c0
A/DEBUG:     x28 0000000000000006  x29 0000007380d8e810
 A/DEBUG:     sp  0000007380cb5000  lr  0000007380470ba0  pc  0000007380470c90
 A/DEBUG: backtrace:
 A/DEBUG:     #00 pc 0000000000148c90  /data/app/com.example.chart-ijq1nLdouzBezBJX7Mu99A==/lib/arm64/libapp.so (offset 0x10000) (_kDartIsolateSnapshotInstructions+1281168)
 E/crash_dump64: cannot open libmiuindbg.so: No such file or directory

@flocbit
Copy link

flocbit commented Jul 4, 2021

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:

Crashed: io.flutter.1.ui
0   App                            0x1147cd550 Precompiled_AxisChartPainter__drawRangeAnnotation_254010849_9649 + 312
1   App                            0x1147cd4c4 Precompiled_AxisChartPainter__drawRangeAnnotation_254010849_9649 + 172
2   App                            0x1147cc554 Precompiled_AxisChartPainter_paint_9647 + 100
3   App                            0x1147c7558 Precompiled_LineChartPainter_paint_9638 + 360
4   App                            0x1147e75a8 Precompiled_RenderLineChart_paint_9886 + 312
5   App                            0x11468d650 Precompiled_RenderObject__paintWithContext_576266271_4298 + 96
6   App                            0x11468d5d4 Precompiled_PaintingContext_paintChild_4297 + 128
7   App                            0x11468d538 Precompiled__RenderAnimatedOpacity_RenderProxyBox_RenderProxyBoxMixin_580160605_paint_4296 + 56
8   App                            0x11468d650 Precompiled_RenderObject__paintWithContext_576266271_4298 + 96
9   App                            0x11468d5d4 Precompiled_PaintingContext_paintChild_4297 + 128
10  App                            0x11468d538 Precompiled__RenderAnimatedOpacity_RenderProxyBox_RenderProxyBoxMixin_580160605_paint_4296 + 56
11  App                            0x11468d650 Precompiled_RenderObject__paintWithContext_576266271_4298 + 96
12  App                            0x1146d33e8 Precompiled__RenderStack_RenderBox_ContainerRenderObjectMixin_RenderBoxContainerDefaultsMixin_592419958_defaultPaint_5574 + 316
13  App                            0x1146d5ee4 Precompiled_RenderStack_paintStack_5614 + 44
14  App                            0x1147ecda8 Precompiled_RenderStack_paint_9957 + 272
15  App                            0x11468d650 Precompiled_RenderObject__paintWithContext_576266271_4298 + 96
16  App                            0x1146ba640 Precompiled__RenderFlex_RenderBox_ContainerRenderObjectMixin_RenderBoxContainerDefaultsMixin_568478290_defaultPaint_5057 + 316
17  App                            0x1147ec49c Precompiled_RenderFlex_paint_9953 + 88
18  App                            0x11468d650 Precompiled_RenderObject__paintWithContext_576266271_4298 + 96
19  App                            0x11468d5d4 Precompiled_PaintingContext_paintChild_4297 + 128
20  App                            0x11468d538 Precompiled__RenderAnimatedOpacity_RenderProxyBox_RenderProxyBoxMixin_580160605_paint_4296 + 56
21  App                            0x1147e8d5c Precompiled_RenderDecoratedBox_paint_9903 + 520
22  App                            0x11468d650 Precompiled_RenderObject__paintWithContext_576266271_4298 + 96
23  App                            0x11468d5d4 Precompiled_PaintingContext_paintChild_4297 + 128
24  App                            0x11468d538 Precompiled__RenderAnimatedOpacity_RenderProxyBox_RenderProxyBoxMixin_580160605_paint_4296 + 56
25  App                            0x11468d650 Precompiled_RenderObject__paintWithContext_576266271_4298 + 96
26  App                            0x1146ba640 Precompiled__RenderFlex_RenderBox_ContainerRenderObjectMixin_RenderBoxContainerDefaultsMixin_568478290_defaultPaint_5057 + 316
27  App                            0x1147ec49c Precompiled_RenderFlex_paint_9953 + 88
28  App                            0x11468d650 Precompiled_RenderObject__paintWithContext_576266271_4298 + 96
29  App                            0x11468d5d4 Precompiled_PaintingContext_paintChild_4297 + 128
30  App                            0x1147e7a90 Precompiled_RenderShiftedBox_paint_9892 + 152
31  App                            0x11468d650 Precompiled_RenderObject__paintWithContext_576266271_4298 + 96
32  App                            0x11468d5d4 Precompiled_PaintingContext_paintChild_4297 + 128
33  App                            0x1147e7a90 Precompiled_RenderShiftedBox_paint_9892 + 152
34  App                            0x11468d650 Precompiled_RenderObject__paintWithContext_576266271_4298 + 96
35  App                            0x11468d5d4 Precompiled_PaintingContext_paintChild_4297 + 128
36  App                            0x11468d538 Precompiled__RenderAnimatedOpacity_RenderProxyBox_RenderProxyBoxMixin_580160605_paint_4296 + 56
37  App                            0x11468d650 Precompiled_RenderObject__paintWithContext_576266271_4298 + 96
38  App                            0x11468d5d4 Precompiled_PaintingContext_paintChild_4297 + 128
39  App                            0x11468d538 Precompiled__RenderAnimatedOpacity_RenderProxyBox_RenderProxyBoxMixin_580160605_paint_4296 + 56
40  App                            0x11468d650 Precompiled_RenderObject__paintWithContext_576266271_4298 + 96
41  App                            0x11468d5d4 Precompiled_PaintingContext_paintChild_4297 + 128
42  App                            0x11468d538 Precompiled__RenderAnimatedOpacity_RenderProxyBox_RenderProxyBoxMixin_580160605_paint_4296 + 56
43  App                            0x11468d650 Precompiled_RenderObject__paintWithContext_576266271_4298 + 96
44  App                            0x11468d5d4 Precompiled_PaintingContext_paintChild_4297 + 128
45  App                            0x11468d538 Precompiled__RenderAnimatedOpacity_RenderProxyBox_RenderProxyBoxMixin_580160605_paint_4296 + 56
46  App                            0x11468d650 Precompiled_RenderObject__paintWithContext_576266271_4298 + 96
47  App                            0x11468d5d4 Precompiled_PaintingContext_paintChild_4297 + 128
48  App                            0x11468d538 Precompiled__RenderAnimatedOpacity_RenderProxyBox_RenderProxyBoxMixin_580160605_paint_4296 + 56
49  App                            0x1147e7ce0 Precompiled__RenderInkFeatures_447372823_paint_9893 + 560
50  App                            0x11468d650 Precompiled_RenderObject__paintWithContext_576266271_4298 + 96
51  App                            0x11468d5d4 Precompiled_PaintingContext_paintChild_4297 + 128
52  App                            0x11468d538 Precompiled__RenderAnimatedOpacity_RenderProxyBox_RenderProxyBoxMixin_580160605_paint_4296 + 56
53  App                            0x1147e7e90 Precompiled_RenderCustomPaint_paint_9895 + 116
54  App                            0x11468d650 Precompiled_RenderObject__paintWithContext_576266271_4298 + 96
55  App                            0x11468d5d4 Precompiled_PaintingContext_paintChild_4297 + 128
56  App                            0x11468d538 Precompiled__RenderAnimatedOpacity_RenderProxyBox_RenderProxyBoxMixin_580160605_paint_4296 + 56
57  App                            0x11477a5f8 Precompiled__RenderProxyBox_RenderBox_RenderObjectWithChildMixin_RenderProxyBoxMixin_580160605_paint_paint_8608 + 52
58  App                            0x11476629c Precompiled_PaintingContext_pushLayer_8193 + 304
59  App                            0x1147e8b20 Precompiled_RenderPhysicalShape_paint_9902 + 520
60  App                            0x11468d650 Precompiled_RenderObject__paintWithContext_576266271_4298 + 96
61  App                            0x11468d5d4 Precompiled_PaintingContext_paintChild_4297 + 128
62  App                            0x11468d538 Precompiled__RenderAnimatedOpacity_RenderProxyBox_RenderProxyBoxMixin_580160605_paint_4296 + 56
63  App                            0x11468d650 Precompiled_RenderObject__paintWithContext_576266271_4298 + 96
64  App                            0x11468d5d4 Precompiled_PaintingContext_paintChild_4297 + 128
65  App                            0x1147e7a90 Precompiled_RenderShiftedBox_paint_9892 + 152
66  App                            0x11468d650 Precompiled_RenderObject__paintWithContext_576266271_4298 + 96
67  App                            0x11468d5d4 Precompiled_PaintingContext_paintChild_4297 + 128
68  App                            0x11468d538 Precompiled__RenderAnimatedOpacity_RenderProxyBox_RenderProxyBoxMixin_580160605_paint_4296 + 56
69  App                            0x11468d650 Precompiled_RenderObject__paintWithContext_576266271_4298 + 96
70  App                            0x11468d5d4 Precompiled_PaintingContext_paintChild_4297 + 128
71  App                            0x11468d538 Precompiled__RenderAnimatedOpacity_RenderProxyBox_RenderProxyBoxMixin_580160605_paint_4296 + 56
72  App                            0x11468d650 Precompiled_RenderObject__paintWithContext_576266271_4298 + 96
73  App                            0x1146ba640 Precompiled__RenderFlex_RenderBox_ContainerRenderObjectMixin_RenderBoxContainerDefaultsMixin_568478290_defaultPaint_5057 + 316
74  App                            0x1147ec49c Precompiled_RenderFlex_paint_9953 + 88
75  App                            0x11468d650 Precompiled_RenderObject__paintWithContext_576266271_4298 + 96
76  App                            0x11468d5d4 Precompiled_PaintingContext_paintChild_4297 + 128
77  App                            0x1147e7a90 Precompiled_RenderShiftedBox_paint_9892 + 152
78  App                            0x11468d650 Precompiled_RenderObject__paintWithContext_576266271_4298 + 96
79  App                            0x1146ba640 Precompiled__RenderFlex_RenderBox_ContainerRenderObjectMixin_RenderBoxContainerDefaultsMixin_568478290_defaultPaint_5057 + 316
80  App                            0x1147ec49c Precompiled_RenderFlex_paint_9953 + 88
81  App                            0x11468d650 Precompiled_RenderObject__paintWithContext_576266271_4298 + 96
82  App                            0x11468d5d4 Precompiled_PaintingContext_paintChild_4297 + 128
83  App                            0x11468d538 Precompiled__RenderAnimatedOpacity_RenderProxyBox_RenderProxyBoxMixin_580160605_paint_4296 + 56
84  App                            0x11468d650 Precompiled_RenderObject__paintWithContext_576266271_4298 + 96
85  App                            0x11468fcc4 Precompiled_PaintingContext__repaintCompositedChild_576266271_4358 + 292
86  App                            0x1146a47a0 Precompiled_PipelineOwner_flushPaint_4728 + 468
87  App                            0x1146a44f8 Precompiled__WidgetsFlutterBinding_BindingBase_GestureBinding_SchedulerBinding_ServicesBinding_PaintingBinding_SemanticsBinding_RendererBinding_660399801_drawFrame_4726 + 100
88  App                            0x1146a3ed4 Precompiled__WidgetsFlutterBinding_BindingBase_GestureBinding_SchedulerBinding_ServicesBinding_PaintingBinding_SemanticsBinding_RendererBinding_WidgetsBinding_660399801_drawFrame_4716 + 184
89  App                            0x1146a2bf8 Precompiled__WidgetsFlutterBinding_BindingBase_GestureBinding_SchedulerBinding_ServicesBinding_PaintingBinding_SemanticsBinding_RendererBinding_660399801__handlePersistentFrameCallback_561452173_4691 + 32
90  App                            0x1146a65bc Precompiled__WidgetsFlutterBinding_BindingBase_GestureBinding_SchedulerBinding_ServicesBinding_PaintingBinding_SemanticsBinding_RendererBinding_660399801__handlePersistentFrameCallback_561452173__handlePersistentFrameCallback_561452173_4752 + 44
91  App                            0x1146a7634 Precompiled__WidgetsFlutterBinding_BindingBase_GestureBinding_SchedulerBinding_660399801__invokeFrameCallback_602222615_4770 + 104
92  App                            0x1146a753c Precompiled__WidgetsFlutterBinding_BindingBase_GestureBinding_SchedulerBinding_660399801_handleDrawFrame_4769 + 648
93  App                            0x114778558 Precompiled__WidgetsFlutterBinding_BindingBase_GestureBinding_SchedulerBinding_660399801__handleDrawFrame_602222615_8547 + 292
94  App                            0x11477841c Precompiled__WidgetsFlutterBinding_BindingBase_GestureBinding_SchedulerBinding_660399801__handleDrawFrame_602222615__handleDrawFrame_602222615_8546 + 40
95  App                            0x114596f38 Precompiled_____rootRun_4048458_329 + 192
96  App                            0x114597024 Precompiled_____rootRun_4048458__rootRun_4048458_330 + 124
97  App                            0x11491c030 Precompiled__CustomZone_4048458_run_15075 + 176
98  App                            0x11491c7f8 Precompiled__CustomZone_4048458_runGuarded_15089 + 52
99  App                            0x11465bd44 Precompiled_____invoke_15065589_3356 + 156
100 App                            0x114660374 Precompiled_PlatformDispatcher__drawFrame_15065589_3430 + 40
101 App                            0x114667634 Precompiled_____drawFrame_15065589_3612 + 32
102 App                            0x114667668 Precompiled_____drawFrame_15065589__drawFrame_15065589_3613 + 24
103 App                            0x114586284 Precompiled_Stub_InvokeDartCode + 268
104 Flutter                        0x1051e4f24 (Missing)
105 Flutter                        0x1051e5a34 (Missing)
106 Flutter                        0x1052c5b3c (Missing)
107 Flutter                        0x1050e12f4 (Missing)
108 Flutter                        0x104ffe11c (Missing)
109 Flutter                        0x104cfef34 (Missing)
110 Flutter                        0x104fa5f78 (Missing)
111 Flutter                        0x104fa7df8 (Missing)
112 CoreFoundation                 0x19f22522c __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 32
113 CoreFoundation                 0x19f224e28 __CFRunLoopDoTimer + 1076
114 CoreFoundation                 0x19f224278 __CFRunLoopDoTimers + 328
115 CoreFoundation                 0x19f21e02c __CFRunLoopRun + 1944
116 CoreFoundation                 0x19f21d360 CFRunLoopRunSpecific + 600
117 Flutter                        0x104fa7cd4 (Missing)
118 Flutter                        0x104fa76d8 (Missing)
119 libsystem_pthread.dylib        0x1eaf24bfc _pthread_start + 320
120 libsystem_pthread.dylib        0x1eaf2d758 thread_start + 8

@imaNNeo
Copy link
Owner

imaNNeo commented Jul 12, 2021

Now I can reproduce the crash (Thanks @ozzy1873 for the reproducible code)
BTW I don't understand what is happening.
I tried comment lines one by one to realize which line is leading the app to crash, but I got random results.
There was nothing consistent

@flocbit Where did you find this output? I couldn't find any stack trace.

@danielmahon
Copy link

@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 rangeAnnotations. Comment that line out and it runs fine.

@ozzy1873
Copy link

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.

@ozzy1873
Copy link

Yes, that is true about rangeAnnotations.

@imaNNeo imaNNeo added bug Something isn't working Fundamental and removed Needs Reproducible Code labels Jul 17, 2021
uenx pushed a commit to uenstudio/fl_chart that referenced this issue Jul 23, 2021
@flocbit
Copy link

flocbit commented Jul 25, 2021

Now I can reproduce the crash (Thanks @ozzy1873 for the reproducible code)
BTW I don't understand what is happening.
I tried comment lines one by one to realize which line is leading the app to crash, but I got random results.
There was nothing consistent

@flocbit Where did you find this output? I couldn't find any stack trace.

The stack trace was recorded by Firebase Crashlytics.

@tristanjclarke
Copy link

tristanjclarke commented Sep 3, 2021

I have found that the app crashes when using both ScatterChart and BarChart with gridData in --release mode, for example:

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 fl_chart gridData worked in was 0.12.3 however, ion order to run an unsound null safe package with your app in null safe you need to add the line below to the top of your main.dart file:

// @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 👍

@louisdeveseleer
Copy link

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
Could that be the same issue?

@mraleph
Copy link

mraleph commented Oct 13, 2021

This is a compiler bug. Follow flutter/flutter#91370 for updates.

@2shrestha22
Copy link

Crashed mine too in release mode only. App works fine until chart is loaded. When chart is being loaded app crashes.
fl_chart: 0.40.5
flutter: 2.8.1

@mraleph
Copy link

mraleph commented Jan 3, 2022

This should be fixed on Flutter master channel now.

@imaNNeo
Copy link
Owner

imaNNeo commented Jan 6, 2022

Thanks, @mraleph,
Can you guys check it in the FLutter master branch, please?

@yura2000
Copy link

Still having this issue

fl_chart: ^0.41.0

Flutter 2.8.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 77d935af4d (5 weeks ago) • 2021-12-16 08:37:33 -0800
Engine • revision 890a5fca2e
Tools • Dart 2.15.1

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'
Revision: '0'
ABI: 'arm64'
pid: 1891, tid: 1967, name: 1.ui >>> com.ex.app <<<
signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x704030000f
x0 0000007040300000 x1 00000070023f7cb9 x2 0000007002441f59 x3 00000070023f7709
x4 00000070022c85d9 x5 0000007001393521 x6 0000007001393581 x7 0000000000002102
x8 00000070023f73c9 x9 0000007000008061 x10 0000000000000000 x11 0000000000000300
x12 3131313131313131 x13 3131313131313131 x14 0000007002441fc0 x15 00000071edc70720
x16 0000000000000000 x17 0000000000002425 x18 0000000000000010 x19 000000000000001a
x20 00000071edb98000 x21 00000071e9c80e00 x22 0000007000008041 x23 0000007000746b71
x24 0000007000015511 x25 0000007001c0aa8c x26 000000720586e800 x27 0000007001600040
x28 0000000400000070 x29 00000071edc707d0
sp 00000071edb98000 lr 00000071ed4d5d10 pc 00000071ed4d5dc0
backtrace:
#00 pc 0000000000bd5dc0 /data/app/com.ex.app-xbU_T3Nki9LO0pnpExh4IA==/lib/arm64/libapp.so (offset 0x9bc000)

@cirediew
Copy link

@yura2000 Please read the two comments above your reaction. It's an issue in Dart/Flutter. A temporary fix is mentioned here: #625 (comment)

@imaNNeo
Copy link
Owner

imaNNeo commented Feb 11, 2022

Can you please check it with the latest version of flutter and fl_chart?

@cirediew
Copy link

@imaNNeoFighT Flutter 2.10.1 fixed the issue for me!

@imaNNeo
Copy link
Owner

imaNNeo commented Mar 4, 2022

Good. I will close this issue.

@imaNNeo imaNNeo closed this as completed Mar 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Fundamental
Projects
None yet
Development

No branches or pull requests