WorldMap icon indicating copy to clipboard operation
WorldMap copied to clipboard

Why are you forced to have an inputstream set?

Open ghost opened this issue 11 years ago • 6 comments

What if I don't have an image to render right away? Currently, it crashes if you do not suppl an input stream

ghost avatar Apr 05 '13 03:04 ghost

I'm not really sure what you're asking. Can you reference some specific code?

johnnylambada avatar Apr 05 '13 03:04 johnnylambada

04-04 23:41:28.150: E/AndroidRuntime(5288): FATAL EXCEPTION: drawThread 04-04 23:41:28.150: E/AndroidRuntime(5288): java.lang.NullPointerException 04-04 23:41:28.150: E/AndroidRuntime(5288): at com.sigseg.android.map.ImageSurfaceView$DrawThread.run(ImageSurfaceView.java:213)

ghost avatar Apr 05 '13 03:04 ghost

Might not be the best stack trace. One sec

ghost avatar Apr 05 '13 03:04 ghost

Well, I can't seem to get much more information. I know at one point I was crashing in ImageSurfaceView surfaceCreated scene.start

If I provide a stream in my oncreate for the layout where I use the imagesurfaceview, it doesn't crash. If I don't set the inpurt stream, it crashes

ghost avatar Apr 05 '13 03:04 ghost

Hi Johnny

Please let me know what else I can do to help you diagnose this problem!

MIke

ghost avatar Apr 05 '13 13:04 ghost

@dirtmike is right. When the onCreateView is finished the app crashes if one hasn't supplied an inputstream to the ImageSurfaceView. I have a complete stacktrace here:

05-20 22:38:14.395  10103-10856/? E/AndroidRuntime﹕ FATAL EXCEPTION: drawThread
    Process: be.p.package, PID: 10103
    java.lang.NullPointerException: Attempt to invoke virtual method 'void com.sigseg.android.view.InputStreamScene.draw(android.graphics.Canvas)' on a null object reference
            at com.sigseg.android.map.ImageSurfaceView$DrawThread.run(ImageSurfaceView.java:223)

It crashes on line: scene.start(); in ImageSurfaceView's surfaceCreated() method

The reason why it crashes is because the scene is null, because no InputStreamScene was provided.

SolveSoul avatar May 20 '15 20:05 SolveSoul