SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy. We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!

Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.

0
0

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

Version
v4.0.30319 XAMARIN
Images
  • Yura Khariton
    It looks like that there is some exception during rendering of chart that’s why you get blank chart – do you see some errors in logcat? Also can you provide a code or project which reproduces this issue because it’s really hard to tell why this happens without seeing the code?
  • You must to post comments
0
0

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

  • Yura Khariton
    I’ve tried to fix this exception based on stack trace which you provided but without solution to reproduce I can’t be 100% sure. Anyway fix should be available with our next nightly build ( v2.2.2.2410 ) which should be published abit later today. Can you try it and let me know if the issue is resolved?
  • You must to post comments
0
0

Yes I’ll check it when it will be available. I’ll let you know. Thank you.

  • You must to post comments
0
0

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                                                                                                      
  • Andrew
    Hey Artur, apologies, Android build was published but not Xamarin.Android. Im running it now. ETA 20 minutes.
  • You must to post comments
0
0

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)
  • Yura Khariton
    Hi Artur. I couldn’t reproduce this exception in our examples. Unfortunately without solution which reproduces this exception there is nothing I can do to fix it.
  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.