SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components
Dear Support, I have SciChartSurface in fragment (Xamarin Android). I added Xaxis (DateAxis), Yaxis (NumericAxis), standard modifiers and few XyDataSeries as FastLineRenderableSeries. Everything is working fine (screenshot 1). But something strange is happen when fragment with chart is Paused -> Stopped and then Started -> Resumed. Xaxis and Yaxis are not visible. All dataseries are not visible. But I debugged and all data is there. Even rolloverModifier is still working and correct data values are displayed in labels (screenshot 2). It does not happen every time – it depends on what external intent stopped fragment.
I’ve tried reinitialize chart (clear Xaxis, Yaxis, remove modifiers, remove renderableSeries are reinit all with new variables) and it does not help. Only fragment dettach -> attach helps or screen orientantion change (it reinitializes fragment)
Could you tell me any suggestion what can I check or how to force to redraw whole SciChartSurface? (hiding it and showing it does not help – effect is the same. Only fragment dettach and attach helps (this is my workaround at the moment).
Thanks for reply. It is NullPointerException in scichart.drawing.opengl lib (log below). It will be a lot of effort to prepare working example without sharing code which I can’t share, so if I do not find solution then I’ll probably stay with my workaround…
11-07 20:09:35.194 D/SurfaceView(18712): Relayout returned: oldFrame=[0,232][2048,1101] newFrame=[0,232][2048,1101] result=0x7 surface={Surface(name=null)/@0xbc90af1 isValid=true 547096834560}
11-07 20:09:35.246 E/Exception(18712): null
11-07 20:09:35.246 E/Exception(18712): java.lang.NullPointerException: Attempt to read from field ‘int com.scichart.drawing.opengl.ac.a’ on a null object reference
11-07 20:09:35.246 E/Exception(18712): at com.scichart.drawing.opengl.MyGLRenderer.g(SourceFile:575)
11-07 20:09:35.246 E/Exception(18712): at com.scichart.drawing.opengl.MyGLRenderer.b(SourceFile:371)
11-07 20:09:35.246 E/Exception(18712): at com.scichart.drawing.opengl.aw.drawLinesStrip(SourceFile:167)
11-07 20:09:35.246 E/Exception(18712): at com.scichart.drawing.common.RegionRenderContextWrapper.drawLinesStrip(SourceFile:201)
11-07 20:09:35.246 E/Exception(18712): at com.scichart.drawing.common.RegionRenderContextWrapper.drawLinesStrip(SourceFile:201)
11-07 20:09:35.246 E/Exception(18712): at com.scichart.drawing.common.d.draw(SourceFile:36)
11-07 20:09:35.246 E/Exception(18712): at com.scichart.charting.visuals.renderableSeries.SeriesDrawingManager.a(SourceFile:125)
11-07 20:09:35.246 E/Exception(18712): at com.scichart.charting.visuals.renderableSeries.SeriesDrawingManager.iterateLines(SourceFile:107)
11-07 20:09:35.246 E/Exception(18712): at com.scichart.charting.visuals.renderableSeries.FastLineRenderableSeries.internalDraw(SourceFile:140)
11-07 20:09:35.246 E/Exception(18712): at com.scichart.charting.visuals.renderableSeries.BaseRenderableSeries.onDraw(SourceFile:701)
11-07 20:09:35.246 E/Exception(18712): at com.scichart.charting.visuals.rendering.RenderSurfaceRenderer.f(SourceFile:469)
11-07 20:09:35.246 E/Exception(18712): at com.scichart.charting.visuals.rendering.RenderSurfaceRenderer.d(SourceFile:394)
11-07 20:09:35.246 E/Exception(18712): at com.scichart.charting.visuals.rendering.RenderSurfaceRenderer.c(SourceFile:374)
11-07 20:09:35.246 E/Exception(18712): at com.scichart.charting.visuals.rendering.RenderSurfaceRenderer.a(SourceFile:358)
11-07 20:09:35.246 E/Exception(18712): at com.scichart.charting.visuals.rendering.RenderSurfaceRenderer.a(SourceFile:134)
11-07 20:09:35.246 E/Exception(18712): at com.scichart.charting.visuals.rendering.RenderSurfaceRenderer.onDraw(SourceFile:123)
11-07 20:09:35.246 E/Exception(18712): at com.scichart.drawing.opengl.RenderSurfaceGL$a.onDraw(SourceFile:243)
11-07 20:09:35.246 E/Exception(18712): at com.scichart.drawing.opengl.MyGLRenderer.b(SourceFile:262)
11-07 20:09:35.246 E/Exception(18712): at com.scichart.drawing.opengl.MyGLRenderer.onDrawFrame(SourceFile:246)
11-07 20:09:35.246 E/Exception(18712): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1562)
11-07 20:09:35.246 E/Exception(18712): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1262)
11-07 20:09:35.261 E/Exception(18712): null
11-07 20:09:35.261 E/Exception(18712): java.lang.NullPointerException: Attempt to read from field ‘int com.scichart.drawing.opengl.ac.a’ on a null object reference
11-07 20:09:35.261 E/Exception(18712): at com.scichart.drawing.opengl.MyGLRenderer.g(SourceFile:575)
11-07 20:09:35.261 E/Exception(18712): at com.scichart.drawing.opengl.MyGLRenderer.b(SourceFile:371)
11-07 20:09:35.261 E/Exception(18712): at com.scichart.drawing.opengl.aw.drawLinesStrip(SourceFile:167)
11-07 20:09:35.261 E/Exception(18712): at com.scichart.drawing.common.RegionRenderContextWrapper.drawLinesStrip(SourceFile:201)
11-07 20:09:35.261 E/Exception(18712): at com.scichart.drawing.common.RegionRenderContextWrapper.drawLinesStrip(SourceFile:201)
11-07 20:09:35.261 E/Exception(18712): at com.scichart.drawing.common.d.draw(SourceFile:36)
11-07 20:09:35.261 E/Exception(18712): at com.scichart.charting.visuals.renderableSeries.SeriesDrawingManager.a(SourceFile:125)
11-07 20:09:35.261 E/Exception(18712): at com.scichart.charting.visuals.renderableSeries.SeriesDrawingManager.iterateLines(SourceFile:107)
11-07 20:09:35.261 E/Exception(18712): at com.scichart.charting.visuals.renderableSeries.FastLineRenderableSeries.internalDraw(SourceFile:140)
11-07 20:09:35.261 E/Exception(18712): at com.scichart.charting.visuals.renderableSeries.BaseRenderableSeries.onDraw(SourceFile:701)
11-07 20:09:35.261 E/Exception(18712): at com.scichart.charting.visuals.rendering.RenderSurfaceRenderer.f(SourceFile:469)
11-07 20:09:35.261 E/Exception(18712): at com.scichart.charting.visuals.rendering.RenderSurfaceRenderer.d(SourceFile:394)
11-07 20:09:35.261 E/Exception(18712): at com.scichart.charting.visuals.rendering.RenderSurfaceRenderer.c(SourceFile:374)
11-07 20:09:35.261 E/Exception(18712): at com.scichart.charting.visuals.rendering.RenderSurfaceRenderer.a(SourceFile:358)
11-07 20:09:35.261 E/Exception(18712): at com.scichart.charting.visuals.rendering.RenderSurfaceRenderer.a(SourceFile:134)
11-07 20:09:35.261 E/Exception(18712): at com.scichart.charting.visuals.rendering.RenderSurfaceRenderer.onDraw(SourceFile:123)
11-07 20:09:35.261 E/Exception(18712): at com.scichart.drawing.opengl.RenderSurfaceGL$a.onDraw(SourceFile:243)
11-07 20:09:35.261 E/Exception(18712): at com.scichart.drawing.opengl.MyGLRenderer.b(SourceFile:262)
11-07 20:09:35.261 E/Exception(18712): at com.scichart.drawing.opengl.MyGLRenderer.onDrawFrame(SourceFile:246)
11-07 20:09:35.261 E/Exception(18712): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1562)
11-07 20:09:35.261 E/Exception(18712): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1262)
11-07 20:09:35.266 D/SurfaceView(18712): Relayout returned: oldFrame=[0,1101][2048,1535] newFrame=[0,1101][2048,1535] result=0x7 surface={Surface(name=null)/@0x8688d57 isValid=true 547152424448}
11-07 20:09:35.289 E/Exception(18712): null
11-07 20:09:35.289 E/Exception(18712): java.lang.NullPointerException: Attempt to read from field ‘int com.scichart.drawing.opengl.ac.a’ on a null object reference
11-07 20:09:35.289 E/Exception(18712): at com.scichart.drawing.opengl.MyGLRenderer.g(SourceFile:575)
11-07 20:09:35.289 E/Exception(18712): at com.scichart.drawing.opengl.MyGLRenderer.b(SourceFile:371)
11-07 20:09:35.289 E/Exception(18712): at com.scichart.drawing.opengl.aw.drawLinesStrip(SourceFile:167)
11-07 20:09:35.289 E/Exception(18712): at com.scichart.drawing.common.RegionRenderContextWrapper.drawLinesStrip(SourceFile:201)
11-07 20:09:35.289 E/Exception(18712): at com.scichart.drawing.common.RegionRenderContextWrapper.drawLinesStrip(SourceFile:201)
11-07 20:09:35.289 E/Exception(18712): at com.scichart.drawing.common.d.draw(SourceFile:36)
11-07 20:09:35.289 E/Exception(18712): at com.scichart.charting.visuals.renderableSeries.SeriesDrawingManager.a(SourceFile:125)
11-07 20:09:35.289 E/Exception(18712): at com.scichart.charting.visuals.renderableSeries.SeriesDrawingManager.iterateLines(SourceFile:107)
11-07 20:09:35.289 E/Exception(18712): at com.scichart.charting.visuals.renderableSeries.FastLineRenderableSeries.internalDraw(SourceFile:140)
11-07 20:09:35.289 E/Exception(18712): at com.scichart.charting.visuals.renderableSeries.BaseRenderableSeries.onDraw(SourceFile:701)
11-07 20:09:35.289 E/Exception(18712): at com.scichart.charting.visuals.rendering.RenderSurfaceRenderer.f(SourceFile:469)
11-07 20:09:35.289 E/Exception(18712): at com.scichart.charting.visuals.rendering.RenderSurfaceRenderer.d(SourceFile:394)
11-07 20:09:35.289 E/Exception(18712): at com.scichart.charting.visuals.rendering.RenderSurfaceRenderer.c(SourceFile:374)
11-07 20:09:35.289 E/Exception(18712): at com.scichart.charting.visuals.rendering.RenderSurfaceRenderer.a(SourceFile:358)
11-07 20:09:35.289 E/Exception(18712): at com.scichart.charting.visuals.rendering.RenderSurfaceRenderer.a(SourceFile:134)
11-07 20:09:35.289 E/Exception(18712): at com.scichart.charting.visuals.rendering.RenderSurfaceRenderer.onDraw(SourceFile:123)
11-07 20:09:35.289 E/Exception(18712): at com.scichart.drawing.opengl.RenderSurfaceGL$a.onDraw(SourceFile:243)
11-07 20:09:35.289 E/Exception(18712): at com.scichart.drawing.opengl.MyGLRenderer.b(SourceFile:262)
11-07 20:09:35.289 E/Exception(18712): at com.scichart.drawing.opengl.MyGLRenderer.onDrawFrame(SourceFile:246)
11-07 20:09:35.289 E/Exception(18712): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1562)
11-07 20:09:35.289 E/Exception(18712): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1262)
11-07 20:09:35.296 E/Exception(18712): null
11-07 20:09:35.296 E/Exception(18712): java.lang.NullPointerException: Attempt to read from field ‘int com.scichart.drawing.opengl.ac.a’ on a null object reference
11-07 20:09:35.296 E/Exception(18712): at com.scichart.drawing.opengl.MyGLRenderer.g(SourceFile:575)
11-07 20:09:35.296 E/Exception(18712): at com.scichart.drawing.opengl.MyGLRenderer.b(SourceFile:371)
11-07 20:09:35.296 E/Exception(18712): at com.scichart.drawing.opengl.aw.drawLinesStrip(SourceFile:167)
11-07 20:09:35.296 E/Exception(18712): at com.scichart.drawing.common.RegionRenderContextWrapper.drawLinesStrip(SourceFile:201)
11-07 20:09:35.296 E/Exception(18712): at com.scichart.drawing.common.RegionRenderContextWrapper.drawLinesStrip(SourceFile:201)
11-07 20:09:35.296 E/Exception(18712): at com.scichart.drawing.common.d.draw(SourceFile:36)
11-07 20:09:35.296 E/Exception(18712): at com.scichart.charting.visuals.renderableSeries.SeriesDrawingManager.a(SourceFile:125)
11-07 20:09:35.296 E/Exception(18712): at com.scichart.charting.visuals.renderableSeries.SeriesDrawingManager.iterateLines(SourceFile:107)
11-07 20:09:35.296 E/Exception(18712): at com.scichart.charting.visuals.renderableSeries.FastLineRenderableSeries.internalDraw(SourceFile:140)
11-07 20:09:35.296 E/Exception(18712): at com.scichart.charting.visuals.renderableSeries.BaseRenderableSeries.onDraw(SourceFile:701)
11-07 20:09:35.296 E/Exception(18712): at com.scichart.charting.visuals.rendering.RenderSurfaceRenderer.f(SourceFile:469)
11-07 20:09:35.296 E/Exception(18712): at com.scichart.charting.visuals.rendering.RenderSurfaceRenderer.d(SourceFile:394)
11-07 20:09:35.296 E/Exception(18712): at com.scichart.charting.visuals.rendering.RenderSurfaceRenderer.c(SourceFile:374)
11-07 20:09:35.296 E/Exception(18712): at com.scichart.charting.visuals.rendering.RenderSurfaceRenderer.a(SourceFile:358)
11-07 20:09:35.296 E/Exception(18712): at com.scichart.charting.visuals.rendering.RenderSurfaceRenderer.a(SourceFile:134)
11-07 20:09:35.296 E/Exception(18712): at com.scichart.charting.visuals.rendering.RenderSurfaceRenderer.onDraw(SourceFile:123)
11-07 20:09:35.296 E/Exception(18712): at com.scichart.drawing.opengl.RenderSurfaceGL$a.onDraw(SourceFile:243)
11-07 20:09:35.296 E/Exception(18712): at com.scichart.drawing.opengl.MyGLRenderer.b(SourceFile:262)
11-07 20:09:35.296 E/Exception(18712): at com.scichart.drawing.opengl.MyGLRenderer.onDrawFrame(SourceFile:246)
11-07 20:09:35.296 E/Exception(18712): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1562)
11-07 20:09:35.296 E/Exception(18712): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1262)
11-07 20:09:35.309 D/ViewRootImpl@8f1a1d4MainActivity: Relayout returned: oldFrame=[0,0][2048,1536] newFrame=[0,0][2048,1536] result=0x7 surface={isValid=true 547152428032} surfaceGenerationChanged=true
11-07 20:09:35.309 D/ViewRootImpl@8f1a1d4MainActivity: mHardwareRenderer.initialize() mSurface={isValid=true 547152428032} hwInitialized=true
Yes I’ll check it when it will be available. I’ll let you know. Thank you.
Please let me know when you upload nightly build, because in nightly nuget package source there is still 2.2.1.839 for SciChart.Android
PM> get-package -ListAvailable -AllVersions -filter SciChart -source https://www.myget.org/F/abtsoftware-bleeding-edge/api/v3/index.json
This Command/Parameter combination has been deprecated and will be removed in the next release. Please consider using the new command that replaces it: 'Find-Package [-Id] -AllVersions'.
Id Versions Description
-- -------- -----------
SciChart.Android {2.2.1.839, 2.2.1.838, 2.2.1.836, 2.2... SciChart - High Performance WPF,iOS and Android Charts for Scientific and Trading applications. Includes the 2D Charting libraries for Xamarin.Android
Dear Andrew. Thank you. Just tested 2.2.2.850 and unfortunatelly it is the same. When fragment is restarted, then reinitialization routine work well until adding RenderableSeries to SciChart. After it exception occurs and X/Y axes disappear and data is “hidden” – only grid is visible as on screen above. This does not happen every time – it depends what is user intercation sequence and what intent stopped fragment. I can reproduce error every time doing the same test sequence in app*. GC is also not running in this moment. When I reinitialize with re-attach fragment then everything is working well. At the moment I’ll stay with my workaround, but later I’ll try to prepare example with this issue because re-attaching fragment is not elegant (and not efficient).
*For example:
1. not working sequence: I open app -> open fragment -> load data from internal csv file (stored in assets) -> initialize chart (x/y axes, modifiers, dataseries etc.) then data displays correctly. Next I try to open file (FilePicker plugin) and fragment is stopped. After backing to fragment (fragment is started and chart is reinitialized) all data disappear.
2. working sequence: I open app -> open fragment -> load data from external csv file (FilePicker plugin) -> initialize chart (x/y axes, modifiers, dataseries etc.) then data displays correctly. Next I repeat above sequence with opening file from internal csv file (stored in assets) and… it is working. Next I try to open another file (FilePicker plugin) and it is still working. Nothing can corrupt chart at the moment. Strange.
11-08 21:00:29.014 E/Exception(10384): null
11-08 21:00:29.014 E/Exception(10384): java.lang.NullPointerException: Attempt to read from field 'int com.scichart.drawing.opengl.ac.a' on a null object reference
11-08 21:00:29.014 E/Exception(10384): at com.scichart.drawing.opengl.MyGLRenderer.g(SourceFile:575)
11-08 21:00:29.014 E/Exception(10384): at com.scichart.drawing.opengl.MyGLRenderer.b(SourceFile:371)
11-08 21:00:29.014 E/Exception(10384): at com.scichart.drawing.opengl.aw.drawLinesStrip(SourceFile:167)
11-08 21:00:29.014 E/Exception(10384): at com.scichart.drawing.common.RegionRenderContextWrapper.drawLinesStrip(SourceFile:201)
11-08 21:00:29.014 E/Exception(10384): at com.scichart.drawing.common.RegionRenderContextWrapper.drawLinesStrip(SourceFile:201)
11-08 21:00:29.014 E/Exception(10384): at com.scichart.drawing.common.d.draw(SourceFile:36)
11-08 21:00:29.014 E/Exception(10384): at com.scichart.charting.visuals.renderableSeries.SeriesDrawingManager.a(SourceFile:125)
11-08 21:00:29.014 E/Exception(10384): at com.scichart.charting.visuals.renderableSeries.SeriesDrawingManager.iterateLines(SourceFile:107)
11-08 21:00:29.014 E/Exception(10384): at com.scichart.charting.visuals.renderableSeries.FastLineRenderableSeries.internalDraw(SourceFile:140)
11-08 21:00:29.014 E/Exception(10384): at com.scichart.charting.visuals.renderableSeries.BaseRenderableSeries.onDraw(SourceFile:701)
11-08 21:00:29.014 E/Exception(10384): at com.scichart.charting.visuals.rendering.RenderSurfaceRenderer.f(SourceFile:469)
11-08 21:00:29.014 E/Exception(10384): at com.scichart.charting.visuals.rendering.RenderSurfaceRenderer.d(SourceFile:394)
11-08 21:00:29.014 E/Exception(10384): at com.scichart.charting.visuals.rendering.RenderSurfaceRenderer.c(SourceFile:374)
11-08 21:00:29.014 E/Exception(10384): at com.scichart.charting.visuals.rendering.RenderSurfaceRenderer.a(SourceFile:358)
11-08 21:00:29.014 E/Exception(10384): at com.scichart.charting.visuals.rendering.RenderSurfaceRenderer.a(SourceFile:134)
11-08 21:00:29.014 E/Exception(10384): at com.scichart.charting.visuals.rendering.RenderSurfaceRenderer.onDraw(SourceFile:123)
11-08 21:00:29.014 E/Exception(10384): at com.scichart.drawing.opengl.RenderSurfaceGL$a.onDraw(SourceFile:243)
11-08 21:00:29.014 E/Exception(10384): at com.scichart.drawing.opengl.MyGLRenderer.b(SourceFile:262)
11-08 21:00:29.014 E/Exception(10384): at com.scichart.drawing.opengl.MyGLRenderer.onDrawFrame(SourceFile:246)
11-08 21:00:29.014 E/Exception(10384): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1562)
11-08 21:00:29.014 E/Exception(10384): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1262)
Hi, I am a trail user with remaining 5 days with me to validate this tool. I am getting the same error while trying to render the screen back for line series from Activity to fragment, which result in ,
//———-Log—————
2018-12-18 14:03:05.142 17126-17126/com.company.xyz.app D/AccurynMonitorFragment: onResume
2018-12-18 14:03:05.215 17126-17126/com.company.xyz.app V/Surface: sf_framedrop debug : 0x4f4c, game : false, logging : 0
2018-12-18 14:03:05.232 17126-17126/com.company.xyz.app D/SurfaceView: Relayout returned: oldFrame=[0,33][1080,212] newFrame=[0,33][1080,212] result=0x7 surface={Surface(name=null)/@0x277e60e isValid=true -835749888}
2018-12-18 14:03:05.235 17126-17196/com.company.xyz.app D/mali_winsys: EGLint new_window_surface(egl_winsys_display*, void*, EGLSurface, EGLConfig, egl_winsys_surface**, egl_color_buffer_format*, EGLBoolean) returns 0x3000, [1080×179]-format:1
2018-12-18 14:03:05.371 17126-17196/com.company.xyz.app E/Exception: null
java.lang.NullPointerException: Attempt to read from field ‘int com.scichart.drawing.opengl.ac.a’ on a null object reference
at com.scichart.drawing.opengl.MyGLRenderer.g(SourceFile:575)
at com.scichart.drawing.opengl.MyGLRenderer.b(SourceFile:371)
at com.scichart.drawing.opengl.aw.drawLinesStrip(SourceFile:167)
at com.scichart.drawing.common.RegionRenderContextWrapper.drawLinesStrip(SourceFile:201)
at com.scichart.drawing.common.RegionRenderContextWrapper.drawLinesStrip(SourceFile:201)
at com.scichart.drawing.common.d.draw(SourceFile:36)
at com.scichart.charting.visuals.renderableSeries.SeriesDrawingManager.a(SourceFile:125)
at com.scichart.charting.visuals.renderableSeries.SeriesDrawingManager.iterateLines(SourceFile:107)
at com.scichart.charting.visuals.renderableSeries.FastLineRenderableSeries.internalDraw(SourceFile:140)
at com.scichart.charting.visuals.renderableSeries.BaseRenderableSeries.onDraw(SourceFile:701)
at com.scichart.charting.visuals.rendering.RenderSurfaceRenderer.f(SourceFile:469)
at com.scichart.charting.visuals.rendering.RenderSurfaceRenderer.d(SourceFile:394)
at com.scichart.charting.visuals.rendering.RenderSurfaceRenderer.c(SourceFile:374)
at com.scichart.charting.visuals.rendering.RenderSurfaceRenderer.a(SourceFile:358)
at com.scichart.charting.visuals.rendering.RenderSurfaceRenderer.a(SourceFile:134)
at com.scichart.charting.visuals.rendering.RenderSurfaceRenderer.onDraw(SourceFile:123)
at com.scichart.drawing.opengl.RenderSurfaceGL$a.onDraw(SourceFile:243)
at com.scichart.drawing.opengl.MyGLRenderer.b(SourceFile:262)
at com.scichart.drawing.opengl.MyGLRenderer.onDrawFrame(SourceFile:246)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1557)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1268)
Please login first to submit.