EGL_NOT_INITIALIZED when Activity goes in onPause and the video source isn't valid
Nico C
n.corso at robovision.it
Wed Dec 23 07:52:22 PST 2015
Hi all, first of all thank to all for this great framework.
I have a problem in an Android application that use the same code of the
tutorial3 Android sample. My purpose is to display a http\mjpg stream from
an IP camera into a SurfaceView.
So I modified the pipeline creation in this way:
data->pipeline = gst_parse_launch("souphttpsrc location=
http://192.168.1.201/video.mjpg <http://192.168.1.201:10554/ipdoor.mjpg> !
jpegdec ! autovideosink", &error);
and the code works well.
I have the same identical code of the tutorial, unless for the fact that I
moved the SurfaceView creation: I attach and detach a Surface in a
FrameLayout when I press a button.
However I get a problem when I create the pipeline with a location that
doesn't exist or that isn't reachable. The application runs well until I
stay in the same activity: I can attach and detach the surface correctly
all times I want, but after that, if I send the Activity in the onPause
status, I have a crash.
I think the problem concerns the fact that the source isn't valid.
This is part of the log:
12-23 16:45:59.062: I/GStreamer+GST_STATES(11852): 0:30:25.688397787
0x5a4658a0 gstelement.c:2328:gst_element_continue_state:<autovideosink0>
completed state change to NULL
12-23 16:45:59.062: I/GStreamer+GST_STATES(11852): 0:30:25.688922287
0x5a4658a0 gstbin.c:2673:gst_bin_change_state_func:<pipeline0> child
'autovideosink0' changed state to 1(NULL) successfully
12-23 16:45:59.062: I/GStreamer+GST_STATES(11852): 0:30:25.689236078
0x5a4658a0 gstbin.c:2230:gst_bin_element_set_state:<jpegdec0> current NULL
pending VOID_PENDING, desired next NULL
12-23 16:45:59.062: I/GStreamer+GST_STATES(11852): 0:30:25.691109703
0x5a4658a0 gstbin.c:2347:gst_bin_element_set_state:<jpegdec0> skipping
transition from NULL to NULL
12-23 16:45:59.062: I/GStreamer+GST_STATES(11852): 0:30:25.691845412
0x5a4658a0 gstbin.c:2673:gst_bin_change_state_func:<pipeline0> child
'jpegdec0' changed state to 1(NULL) successfully
12-23 16:45:59.062: I/GStreamer+GST_STATES(11852): 0:30:25.694157912
0x5a4658a0 gstbin.c:2230:gst_bin_element_set_state:<souphttpsrc0> current
NULL pending VOID_PENDING, desired next NULL
12-23 16:45:59.062: I/GStreamer+GST_STATES(11852): 0:30:25.694850495
0x5a4658a0 gstbin.c:2347:gst_bin_element_set_state:<souphttpsrc0> skipping
transition from NULL to NULL
12-23 16:45:59.062: I/GStreamer+GST_STATES(11852): 0:30:25.695312328
0x5a4658a0 gstbin.c:2673:gst_bin_change_state_func:<pipeline0> child
'souphttpsrc0' changed state to 1(NULL) successfully
12-23 16:45:59.062: I/GStreamer+GST_STATES(11852): 0:30:25.696039537
0x5a4658a0 gstelement.c:2328:gst_element_continue_state:<pipeline0>
completed state change to NULL
12-23 16:45:59.072: I/GStreamer+GST_REFCOUNTING(11852): 0:30:25.697070287
0x5a4658a0
gstelement.c:2873:gst_element_dispose:<autovideosink0-actual-sink-glimage>
dispose
12-23 16:45:59.072: I/GStreamer+GST_ELEMENT_PADS(11852): 0:30:25.698643953
0x5a4658a0
gstelement.c:763:gst_element_remove_pad:<autovideosink0-actual-sink-glimage>
removing pad 'sink'
12-23 16:45:59.072: I/GStreamer+GST_REFCOUNTING(11852): 0:30:25.699341995
0x5a4658a0
gstelement.c:2917:gst_element_dispose:<autovideosink0-actual-sink-glimage>
parent class dispose
12-23 16:45:59.072: I/GStreamer+GST_REFCOUNTING(11852): 0:30:25.700534578
0x5a4658a0
gstelement.c:2948:gst_element_finalize:<autovideosink0-actual-sink-glimage>
finalize
12-23 16:45:59.072: I/GStreamer+GST_REFCOUNTING(11852): 0:30:25.700749162
0x5a4658a0
gstelement.c:2953:gst_element_finalize:<autovideosink0-actual-sink-glimage>
finalize parent
12-23 16:45:59.072: I/GStreamer+GST_ELEMENT_PADS(11852): 0:30:25.701035120
0x5a4658a0 gstpad.c:1943:gst_pad_unlink unlinking jpegdec0:src(0x5e8fee98)
and autovideosink0:sink(0x5a036060)
12-23 16:45:59.072: I/GStreamer+GST_ELEMENT_PADS(11852): 0:30:25.701243037
0x5a4658a0 gstpad.c:1997:gst_pad_unlink unlinked jpegdec0:src and
autovideosink0:sink
12-23 16:45:59.072: D/GStreamer+StreamingServer(11852): 0:30:25.701485412
0x5d79a920 jni/streamingserver.c:979:gst_native_stop_video Waiting for
player thread to finish...
12-23 16:45:59.072: I/GStreamer+GST_PARENTAGE(11852): 0:30:25.701653412
0x5a4658a0 gstbin.c:1554:gst_bin_remove_func:<pipeline0> removed child
"autovideosink0"
12-23 16:45:59.072: I/GStreamer+GST_STATES(11852): 0:30:25.701842787
0x5a4658a0 gstelement.c:2328:gst_element_continue_state:<fake-video-sink>
completed state change to NULL
12-23 16:45:59.072: I/GStreamer+GST_ELEMENT_PADS(11852): 0:30:25.702016412
0x5a4658a0 gstpad.c:1943:gst_pad_unlink unlinking
sink:proxypad32(0x5e8b9c40) and fake-video-sink:sink(0x5a461ab8)
12-23 16:45:59.072: I/GStreamer+GST_ELEMENT_PADS(11852): 0:30:25.702355495
0x5a4658a0 gstpad.c:1997:gst_pad_unlink unlinked sink:proxypad32 and
fake-video-sink:sink
12-23 16:45:59.072: I/GStreamer+GST_PARENTAGE(11852): 0:30:25.702498245
0x5a4658a0 gstbin.c:1554:gst_bin_remove_func:<autovideosink0> removed child
"fake-video-sink"
12-23 16:45:59.072: I/GStreamer+GST_REFCOUNTING(11852): 0:30:25.702657037
0x5a4658a0 gstelement.c:2873:gst_element_dispose:<fake-video-sink> dispose
12-23 16:45:59.072: I/GStreamer+GST_ELEMENT_PADS(11852): 0:30:25.702871370
0x5a4658a0 gstelement.c:763:gst_element_remove_pad:<fake-video-sink>
removing pad 'sink'
12-23 16:45:59.072: I/GStreamer+GST_REFCOUNTING(11852): 0:30:25.703050745
0x5a4658a0 gstelement.c:2917:gst_element_dispose:<fake-video-sink> parent
class dispose
12-23 16:45:59.072: I/GStreamer+GST_REFCOUNTING(11852): 0:30:25.703181953
0x5a4658a0 gstelement.c:2948:gst_element_finalize:<fake-video-sink> finalize
12-23 16:45:59.072: I/GStreamer+GST_REFCOUNTING(11852): 0:30:25.703305162
0x5a4658a0 gstelement.c:2953:gst_element_finalize:<fake-video-sink>
finalize parent
12-23 16:45:59.072: I/GStreamer+GST_REFCOUNTING(11852): 0:30:25.703464245
0x5a4658a0 gstelement.c:2873:gst_element_dispose:<autovideosink0> dispose
12-23 16:45:59.072: I/GStreamer+GST_ELEMENT_PADS(11852): 0:30:25.703597120
0x5a4658a0 gstelement.c:763:gst_element_remove_pad:<autovideosink0>
removing pad 'sink'
12-23 16:45:59.072: I/GStreamer+GST_REFCOUNTING(11852): 0:30:25.703948953
0x5a4658a0 gstelement.c:2917:gst_element_dispose:<autovideosink0> parent
class dispose
12-23 16:45:59.072: I/GStreamer+GST_REFCOUNTING(11852): 0:30:25.704092287
0x5a4658a0 gstelement.c:2948:gst_element_finalize:<autovideosink0> finalize
12-23 16:45:59.072: I/GStreamer+GST_REFCOUNTING(11852): 0:30:25.704533578
0x5a4658a0 gstelement.c:2953:gst_element_finalize:<autovideosink0> finalize
parent
12-23 16:45:59.072: I/GStreamer+GST_ELEMENT_PADS(11852): 0:30:25.704729995
0x5a4658a0 gstpad.c:1943:gst_pad_unlink unlinking
souphttpsrc0:src(0x5e892990) and jpegdec0:sink(0x5e99c038)
12-23 16:45:59.072: I/GStreamer+GST_ELEMENT_PADS(11852): 0:30:25.705724870
0x5a4658a0 gstpad.c:1997:gst_pad_unlink unlinked souphttpsrc0:src and
jpegdec0:sink
12-23 16:45:59.082: I/GStreamer+GST_PARENTAGE(11852): 0:30:25.706469537
0x5a4658a0 gstbin.c:1554:gst_bin_remove_func:<pipeline0> removed child
"jpegdec0"
12-23 16:45:59.082: I/GStreamer+GST_REFCOUNTING(11852): 0:30:25.706997412
0x5a4658a0 gstelement.c:2873:gst_element_dispose:<jpegdec0> dispose
12-23 16:45:59.082: I/GStreamer+GST_ELEMENT_PADS(11852): 0:30:25.707467828
0x5a4658a0 gstelement.c:763:gst_element_remove_pad:<jpegdec0> removing pad
'sink'
12-23 16:45:59.082: I/GStreamer+GST_ELEMENT_PADS(11852): 0:30:25.708077287
0x5a4658a0 gstelement.c:763:gst_element_remove_pad:<jpegdec0> removing pad
'src'
12-23 16:45:59.082: I/GStreamer+GST_REFCOUNTING(11852): 0:30:25.708292203
0x5a4658a0 gstelement.c:2917:gst_element_dispose:<jpegdec0> parent class
dispose
12-23 16:45:59.082: I/GStreamer+GST_REFCOUNTING(11852): 0:30:25.711403787
0x5a4658a0 gstelement.c:2948:gst_element_finalize:<jpegdec0> finalize
12-23 16:45:59.082: I/GStreamer+GST_REFCOUNTING(11852): 0:30:25.711648578
0x5a4658a0 gstelement.c:2953:gst_element_finalize:<jpegdec0> finalize parent
12-23 16:45:59.082: I/GStreamer+GST_PARENTAGE(11852): 0:30:25.711952787
0x5a4658a0 gstbin.c:1554:gst_bin_remove_func:<pipeline0> removed child
"souphttpsrc0"
12-23 16:45:59.082: I/GStreamer+GST_REFCOUNTING(11852): 0:30:25.712404495
0x5a4658a0 gstelement.c:2873:gst_element_dispose:<souphttpsrc0> dispose
12-23 16:45:59.082: I/GStreamer+GST_ELEMENT_PADS(11852): 0:30:25.712880745
0x5a4658a0 gstelement.c:763:gst_element_remove_pad:<souphttpsrc0> removing
pad 'src'
12-23 16:45:59.082: I/GStreamer+GST_REFCOUNTING(11852): 0:30:25.713077745
0x5a4658a0 gstelement.c:2917:gst_element_dispose:<souphttpsrc0> parent
class dispose
12-23 16:45:59.082: I/GStreamer+GST_REFCOUNTING(11852): 0:30:25.713469745
0x5a4658a0 gstelement.c:2948:gst_element_finalize:<souphttpsrc0> finalize
12-23 16:45:59.082: I/GStreamer+GST_REFCOUNTING(11852): 0:30:25.713816745
0x5a4658a0 gstelement.c:2953:gst_element_finalize:<souphttpsrc0> finalize
parent
12-23 16:45:59.082: I/GStreamer+GST_REFCOUNTING(11852): 0:30:25.714339370
0x5a4658a0 gstelement.c:2873:gst_element_dispose:<pipeline0> dispose
12-23 16:45:59.082: I/GStreamer+GST_REFCOUNTING(11852): 0:30:25.714809745
0x5a4658a0 gstelement.c:2917:gst_element_dispose:<pipeline0> parent class
dispose
12-23 16:45:59.082: I/GStreamer+GST_REFCOUNTING(11852): 0:30:25.715151912
0x5a4658a0 gstelement.c:2948:gst_element_finalize:<pipeline0> finalize
12-23 16:45:59.082: I/GStreamer+GST_REFCOUNTING(11852): 0:30:25.715516412
0x5a4658a0 gstelement.c:2953:gst_element_finalize:<pipeline0> finalize
parent
12-23 16:45:59.082: D/dalvikvm(11852): threadid=43: thread exiting, not yet
detached (count=0)
12-23 16:45:59.082: D/GStreamer+StreamingServer(11852): 0:30:25.716175745
0x5a4658a0 jni/streamingserver.c:219:detach_current_thread Detaching thread
0x5a4658a0
12-23 16:45:59.092: D/GStreamer+StreamingServer(11852): 0:30:25.717576078
0x5d79a920 jni/streamingserver.c:1207:gst_native_surface_finalize Releasing
Native Window 0x5f3be410
12-23 16:46:00.052: W/libEGL(11852): eglTerminate() called w/ 3 objects
remaining
12-23 16:46:00.442: D/GStreamer+StreamingServer(11852): 0:30:27.072687330
0x5d79a920 jni/streamingserver.c:1124:gst_native_stop Quitting streaming
main loop...
12-23 16:46:00.442: D/GStreamer+StreamingServer(11852): 0:30:27.072808955
0x5d79a920 jni/streamingserver.c:1130:gst_native_stop Waiting for thread to
finish...
12-23 16:46:00.442: D/GStreamer+StreamingServer(11852): 0:30:27.072974955
0x5d79a920 jni/streamingserver.c:1139:gst_native_stop Stop done!
12-23 16:46:00.482: E/libEGL(11852): validate_display:256 error 3001
(EGL_NOT_INITIALIZED)
12-23 16:46:00.482: E/libEGL(11852): validate_display:256 error 3001
(EGL_NOT_INITIALIZED)
12-23 16:46:00.482: E/libEGL(11852): validate_display:256 error 3001
(EGL_NOT_INITIALIZED)
12-23 16:46:00.482: D/OpenGLRenderer(11852): GL error from OpenGLRenderer:
0x501
12-23 16:46:00.482: E/OpenGLRenderer(11852): GL_INVALID_VALUE
12-23 16:46:00.572: D/dalvikvm(11852): GC_FOR_ALLOC freed 4939K, 42% free
8295K/14164K, paused 23ms, total 24ms
12-23 16:46:00.672: D/dalvikvm(11852): GC_FOR_ALLOC freed 831K, 35% free
9253K/14164K, paused 18ms, total 18ms
12-23 16:46:00.732: E/libEGL(11852): validate_display:256 error 3001
(EGL_NOT_INITIALIZED)
12-23 16:46:00.732: E/libEGL(11852): validate_display:256 error 3001
(EGL_NOT_INITIALIZED)
12-23 16:46:00.732: E/libEGL(11852): validate_display:256 error 3001
(EGL_NOT_INITIALIZED)
12-23 16:46:00.732: E/libEGL(11852): validate_display:256 error 3001
(EGL_NOT_INITIALIZED)
12-23 16:46:00.732: W/HardwareRenderer(11852): EGL error:
EGL_NOT_INITIALIZED
12-23 16:46:00.732: E/libEGL(11852): validate_display:256 error 3001
(EGL_NOT_INITIALIZED)
12-23 16:46:00.732: E/libEGL(11852): eglMakeCurrent:688 error 3008
(EGL_BAD_DISPLAY)
12-23 16:46:00.732: E/libEGL(11852): validate_display:256 error 3001
(EGL_NOT_INITIALIZED)
12-23 16:46:00.732: W/HardwareRenderer(11852): Mountain View, we've had a
problem here. Switching back to software rendering.
12-23 16:46:00.742: E/libEGL(11852): validate_display:256 error 3001
(EGL_NOT_INITIALIZED)
12-23 16:46:00.742: D/AndroidRuntime(11852): Shutting down VM
12-23 16:46:00.742: W/dalvikvm(11852): threadid=1: thread exiting with
uncaught exception (group=0x4155f560)
12-23 16:46:00.742: E/Ipdoor(11852): UNCAUGHT EXCEPTION ERROR
12-23 16:46:00.742: W/System.err(11852): java.lang.RuntimeException:
createWindowSurface failed EGL_NOT_INITIALIZED
12-23 16:46:00.752: W/System.err(11852): at
android.view.HardwareRenderer$GlRenderer.createSurface(HardwareRenderer.java:1353)
12-23 16:46:00.752: W/System.err(11852): at
android.view.HardwareRenderer$GlRenderer.createEglSurface(HardwareRenderer.java:1241)
12-23 16:46:00.752: W/System.err(11852): at
android.view.HardwareRenderer$GlRenderer.initialize(HardwareRenderer.java:1058)
12-23 16:46:00.752: W/System.err(11852): at
android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1594)
12-23 16:46:00.752: W/System.err(11852): at
android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1044)
12-23 16:46:00.752: W/System.err(11852): at
android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5714)
12-23 16:46:00.752: W/System.err(11852): at
android.view.Choreographer$CallbackRecord.run(Choreographer.java:761)
12-23 16:46:00.752: W/System.err(11852): at
android.view.Choreographer.doCallbacks(Choreographer.java:574)
12-23 16:46:00.752: W/System.err(11852): at
android.view.Choreographer.doFrame(Choreographer.java:544)
12-23 16:46:00.752: W/System.err(11852): at
android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:747)
12-23 16:46:00.752: W/System.err(11852): at
android.os.Handler.handleCallback(Handler.java:733)
12-23 16:46:00.752: W/System.err(11852): at
android.os.Handler.dispatchMessage(Handler.java:95)
12-23 16:46:00.752: W/System.err(11852): at
android.os.Looper.loop(Looper.java:136)
12-23 16:46:00.752: W/System.err(11852): at
android.app.ActivityThread.main(ActivityThread.java:5017)
12-23 16:46:00.752: W/System.err(11852): at
java.lang.reflect.Method.invokeNative(Native Method)
12-23 16:46:00.752: W/System.err(11852): at
java.lang.reflect.Method.invoke(Method.java:515)
12-23 16:46:00.752: W/System.err(11852): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
12-23 16:46:00.752: W/System.err(11852): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
12-23 16:46:00.752: W/System.err(11852): at
dalvik.system.NativeStart.main(Native Method)
12-23 16:46:00.752: I/AndroidRuntime(11852): VM exiting with result code 2,
cleanup skipped.
Best regards,
Nicola
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-android/attachments/20151223/4c426057/attachment-0001.html>
More information about the gstreamer-android
mailing list