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

Crashes when I try to ffplay it when video size is unsupported #7

Open
vi opened this issue Aug 9, 2016 · 4 comments
Open

Crashes when I try to ffplay it when video size is unsupported #7

vi opened this issue Aug 9, 2016 · 4 comments

Comments

@vi
Copy link

vi commented Aug 9, 2016

8-09 21:56:52.510 I/CameraCapFrontMirror( 2387): [CAMERA_PARAM] env->mFrontMirror = 0
08-09 21:56:52.510 D/CameraPermission(15019): CameraPermission
08-09 21:56:52.515 E/StubController(15019): service = null
08-09 21:56:52.515 D/VideoStream(15019): Unlocking camera
08-09 21:56:52.515 D/CameraPermission(15019): CameraPermission
08-09 21:56:52.515 E/StubController(15019): service = null
08-09 21:56:52.525 I/MediaRecorderJNI(15019): prepare: surface=0x78793878
08-09 21:56:52.525 I/MediaRecorder(15019): start
08-09 21:56:52.530 D/IMG-OMX ( 2387): Loaded OMX.IMG.TOPAZ.VIDEO.Encoder (0xb76ea148) from libomx_vxe.so
08-09 21:56:52.530 E/IMGTOPAZ( 2387): Error in OTE_Video_GetParameter at line 499
08-09 21:56:52.530 D/IMG-OMX ( 2387): Removed 0xb76ea148 from libomx_vxe.so
08-09 21:56:52.535 D/CameraSource( 2387): Camera does not support setVideoSize()
08-09 21:56:52.535 E/CameraSource( 2387): Video dimension (800x480) is unsupported
08-09 21:56:52.535 E/MediaRecorder(15019): start failed: -19
08-09 21:56:52.540 W/dalvikvm(15019): threadid=13: thread exiting with uncaught exception (group=0x41591c50)
08-09 21:56:52.540 E/AndroidRuntime(15019): FATAL EXCEPTION: Thread-1303
08-09 21:56:52.540 E/AndroidRuntime(15019): Process: pl.hypeapp.endoscope, PID: 15019
08-09 21:56:52.540 E/AndroidRuntime(15019): java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
08-09 21:56:52.540 E/AndroidRuntime(15019):     at android.os.Handler.<init>(Handler.java:200)
08-09 21:56:52.540 E/AndroidRuntime(15019):     at android.os.Handler.<init>(Handler.java:114)
08-09 21:56:52.540 E/AndroidRuntime(15019):     at android.app.Dialog.<init>(Dialog.java:109)
08-09 21:56:52.540 E/AndroidRuntime(15019):     at android.app.Dialog.<init>(Dialog.java:149)
08-09 21:56:52.540 E/AndroidRuntime(15019):     at android.support.v7.app.AppCompatDialog.<init>(AppCompatDialog.java:43)
08-09 21:56:52.540 E/AndroidRuntime(15019):     at android.support.v7.app.AlertDialog.<init>(AlertDialog.java:95)
08-09 21:56:52.540 E/AndroidRuntime(15019):     at android.support.v7.app.AlertDialog$Builder.create(AlertDialog.java:927)
08-09 21:56:52.540 E/AndroidRuntime(15019):     at pl.hypeapp.endoscope.StartStreamActivity.logError(StartStreamActivity.java:224)
08-09 21:56:52.540 E/AndroidRuntime(15019):     at pl.hypeapp.endoscope.StartStreamActivity.onError(StartStreamActivity.java:168)
08-09 21:56:52.540 E/AndroidRuntime(15019):     at net.majorkernelpanic.streaming.rtsp.RtspServer.postError(RtspServer.java:300)
08-09 21:56:52.540 E/AndroidRuntime(15019):     at net.majorkernelpanic.streaming.rtsp.RtspServer$WorkerThread.run(RtspServer.java:410)
08-09 21:56:52.545 W/ActivityManager( 3216):   Force finishing activity pl.hypeapp.endoscope/.StartStreamActivity
@hypeapps
Copy link
Owner

You can try change dimension in settings.

@vi
Copy link
Author

vi commented Aug 31, 2016

It should not crash even with wrong settings. It should show some error/warning message and/or work.

The program in general doesn't look reliable.

@hypeapps
Copy link
Owner

hypeapps commented Aug 31, 2016

@vi Supporting many devices and programs is hard work. This is difficulty when whole program depends on external libraries like libstreaming. On my android 5.0 app works well. I am working on update which eliminates bugs and improve app experience.

@lingling-fan
Copy link

Pkg: pl.hypeapp.endoscope
Exception: java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare
Exception Category: Android constraint
Root cause: In method "pl.hypeapp.endoscope.StartStreamActivity.logError", it trying to create a dialog in a background thread -- WorkerThread, which has no looper by default, and "android.app.Dialog" will initially make new handler() to handle message, but without a looper, thus throwing such exception.
Description: only the main thread can create object Looper by default. If other threads directly use new handler() without calling Looper.prepare(), the exception will be thrown.
Possible Fixes:
1: Excute on UI thread (onPostExecute(), runOnUiThread()),especially for Dialog and Toast.makeText.
2: New Handler(context.getMainLooper())
3: Call Looper.prepare() and Looper.loop() before handle message

I'm looking forward to your reply.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants