Comments (9)
Mine crashes too, seems like it runs out of memory???
Device is Nexus 4 with Android 5.0.1
04-12 18:14:10.876 6643-6643/com.example.android.camera2video I/art﹕ Late-enabling -Xcheck:jni
04-12 18:14:11.067 6643-6671/com.example.android.camera2video D/OpenGLRenderer﹕ Render dirty regions requested: true
04-12 18:14:11.074 6643-6643/com.example.android.camera2video D/Atlas﹕ Validating map...
04-12 18:14:11.144 6643-6671/com.example.android.camera2video I/Adreno-EGL﹕ <qeglDrvAPI_eglInitialize:410>: QUALCOMM Build: 10/28/14, c33033c, Ia6306ec328
04-12 18:14:11.146 6643-6671/com.example.android.camera2video I/OpenGLRenderer﹕ Initialized EGL, version 1.4
04-12 18:14:11.169 6643-6671/com.example.android.camera2video D/OpenGLRenderer﹕ Enabling debug mode 0
04-12 18:14:11.218 6643-6643/com.example.android.camera2video W/ArrayUtils﹕ Ignoring invalid value normal
04-12 18:14:11.219 6643-6643/com.example.android.camera2video W/ArrayUtils﹕ Ignoring invalid value emboss
04-12 18:14:11.219 6643-6643/com.example.android.camera2video W/ArrayUtils﹕ Ignoring invalid value sketch
04-12 18:14:11.219 6643-6643/com.example.android.camera2video W/ArrayUtils﹕ Ignoring invalid value neon
04-12 18:14:11.222 6643-6643/com.example.android.camera2video W/ArrayUtils﹕ Ignoring invalid value asd
04-12 18:14:11.222 6643-6643/com.example.android.camera2video W/ArrayUtils﹕ Ignoring invalid value backlight
04-12 18:14:11.222 6643-6643/com.example.android.camera2video W/ArrayUtils﹕ Ignoring invalid value flowers
04-12 18:14:11.222 6643-6643/com.example.android.camera2video W/ArrayUtils﹕ Ignoring invalid value AR
04-12 18:14:11.233 6643-6643/com.example.android.camera2video E/Camera2VideoFragment﹕ Couldn't find any suitable preview size
04-12 18:14:11.240 6643-6643/com.example.android.camera2video W/ArrayUtils﹕ Ignoring invalid value normal
04-12 18:14:11.241 6643-6643/com.example.android.camera2video W/ArrayUtils﹕ Ignoring invalid value emboss
04-12 18:14:11.241 6643-6643/com.example.android.camera2video W/ArrayUtils﹕ Ignoring invalid value sketch
04-12 18:14:11.241 6643-6643/com.example.android.camera2video W/ArrayUtils﹕ Ignoring invalid value neon
04-12 18:14:11.241 6643-6643/com.example.android.camera2video W/ArrayUtils﹕ Ignoring invalid value asd
04-12 18:14:11.241 6643-6643/com.example.android.camera2video W/ArrayUtils﹕ Ignoring invalid value backlight
04-12 18:14:11.241 6643-6643/com.example.android.camera2video W/ArrayUtils﹕ Ignoring invalid value flowers
04-12 18:14:11.241 6643-6643/com.example.android.camera2video W/ArrayUtils﹕ Ignoring invalid value AR
04-12 18:14:11.247 6643-6643/com.example.android.camera2video I/CameraManager﹕ Using legacy camera HAL.
04-12 18:14:11.498 6643-6643/com.example.android.camera2video W/ArrayUtils﹕ Ignoring invalid value normal
04-12 18:14:11.498 6643-6643/com.example.android.camera2video W/ArrayUtils﹕ Ignoring invalid value emboss
04-12 18:14:11.498 6643-6643/com.example.android.camera2video W/ArrayUtils﹕ Ignoring invalid value sketch
04-12 18:14:11.499 6643-6643/com.example.android.camera2video W/ArrayUtils﹕ Ignoring invalid value neon
04-12 18:14:11.499 6643-6643/com.example.android.camera2video W/ArrayUtils﹕ Ignoring invalid value asd
04-12 18:14:11.499 6643-6643/com.example.android.camera2video W/ArrayUtils﹕ Ignoring invalid value backlight
04-12 18:14:11.499 6643-6643/com.example.android.camera2video W/ArrayUtils﹕ Ignoring invalid value flowers
04-12 18:14:11.499 6643-6643/com.example.android.camera2video W/ArrayUtils﹕ Ignoring invalid value AR
04-12 18:14:11.632 6643-6643/com.example.android.camera2video I/CameraDeviceState﹕ Legacy camera service transitioning to state CONFIGURING
04-12 18:14:11.633 6643-6693/com.example.android.camera2video I/RequestThread-0﹕ Configure outputs: 2 surfaces configured.
04-12 18:14:11.633 6643-6693/com.example.android.camera2video D/Camera﹕ app passed NULL surface
04-12 18:14:11.667 6643-6643/com.example.android.camera2video I/CameraDeviceState﹕ Legacy camera service transitioning to state IDLE
04-12 18:14:11.675 6643-6670/com.example.android.camera2video I/RequestQueue﹕ Repeating capture request set.
04-12 18:14:11.681 6643-6693/com.example.android.camera2video W/LegacyRequestMapper﹕ convertRequestMetadata - control.awbRegions setting is not supported, ignoring value
04-12 18:14:11.681 6643-6693/com.example.android.camera2video W/LegacyRequestMapper﹕ Only received metering rectangles with weight 0.
04-12 18:14:11.681 6643-6693/com.example.android.camera2video W/LegacyRequestMapper﹕ Only received metering rectangles with weight 0.
04-12 18:14:12.092 6643-6707/com.example.android.camera2video I/CameraDeviceState﹕ Legacy camera service transitioning to state CAPTURING
04-12 18:14:17.519 6643-6707/com.example.android.camera2video W/Adreno-EGLSUB﹕ DequeueBuffer:721: dequeue native buffer fail: No such device, buffer=0x0, handle=0x0
04-12 18:14:17.519 6643-6707/com.example.android.camera2video W/Adreno-ES20﹕ <core_glFlush:52>: GL_OUT_OF_MEMORY
04-12 18:14:17.523 6643-6707/com.example.android.camera2video W/GLConsumer﹕ [unnamed-6643-1] bindTextureImage: clearing GL error: 0x505
04-12 18:14:17.528 6643-6707/com.example.android.camera2video W/Adreno-EGLSUB﹕ DequeueBuffer:721: dequeue native buffer fail: No such device, buffer=0x0, handle=0x0
04-12 18:14:17.528 6643-6707/com.example.android.camera2video W/Adreno-ES20﹕ <core_glFlushInternal:37>: GL_OUT_OF_MEMORY
04-12 18:14:17.532 6643-6707/com.example.android.camera2video E/CameraDeviceGLThread-0﹕ Received exception on GL render thread:
java.lang.IllegalStateException: onDrawFrame start: GLES20 error: 0x505
at android.hardware.camera2.legacy.SurfaceTextureRenderer.checkGlError(SurfaceTextureRenderer.java:494)
at android.hardware.camera2.legacy.SurfaceTextureRenderer.drawFrame(SurfaceTextureRenderer.java:213)
at android.hardware.camera2.legacy.SurfaceTextureRenderer.drawIntoSurfaces(SurfaceTextureRenderer.java:680)
at android.hardware.camera2.legacy.GLThreadManager$1.handleMessage(GLThreadManager.java:103)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:135)
at android.os.HandlerThread.run(HandlerThread.java:61)
04-12 18:14:17.532 6643-6707/com.example.android.camera2video I/CameraDeviceState﹕ Legacy camera service transitioning to state ERROR
04-12 18:14:17.875 6643-6643/com.example.android.camera2video W/System.err﹕ android.hardware.camera2.CameraAccessException: The camera device has encountered a serious error
04-12 18:14:17.879 6643-6643/com.example.android.camera2video W/System.err﹕ at android.hardware.camera2.impl.CameraDeviceImpl.checkIfCameraClosedOrInError(CameraDeviceImpl.java:1478)
04-12 18:14:17.879 6643-6643/com.example.android.camera2video W/System.err﹕ at android.hardware.camera2.impl.CameraDeviceImpl.createCaptureRequest(CameraDeviceImpl.java:476)
04-12 18:14:17.879 6643-6643/com.example.android.camera2video W/System.err﹕ at com.example.android.camera2video.Camera2VideoFragment.startPreview(Camera2VideoFragment.java:408)
04-12 18:14:17.879 6643-6643/com.example.android.camera2video W/System.err﹕ at com.example.android.camera2video.Camera2VideoFragment.stopRecordingVideo(Camera2VideoFragment.java:543)
04-12 18:14:17.879 6643-6643/com.example.android.camera2video W/System.err﹕ at com.example.android.camera2video.Camera2VideoFragment.onClick(Camera2VideoFragment.java:292)
04-12 18:14:17.879 6643-6643/com.example.android.camera2video W/System.err﹕ at android.view.View.performClick(View.java:4756)
04-12 18:14:17.879 6643-6643/com.example.android.camera2video W/System.err﹕ at android.view.View$PerformClick.run(View.java:19749)
04-12 18:14:17.879 6643-6643/com.example.android.camera2video W/System.err﹕ at android.os.Handler.handleCallback(Handler.java:739)
04-12 18:14:17.879 6643-6643/com.example.android.camera2video W/System.err﹕ at android.os.Handler.dispatchMessage(Handler.java:95)
04-12 18:14:17.879 6643-6643/com.example.android.camera2video W/System.err﹕ at android.os.Looper.loop(Looper.java:135)
04-12 18:14:17.879 6643-6643/com.example.android.camera2video W/System.err﹕ at android.app.ActivityThread.main(ActivityThread.java:5221)
04-12 18:14:17.879 6643-6643/com.example.android.camera2video W/System.err﹕ at java.lang.reflect.Method.invoke(Native Method)
04-12 18:14:17.879 6643-6643/com.example.android.camera2video W/System.err﹕ at java.lang.reflect.Method.invoke(Method.java:372)
04-12 18:14:17.879 6643-6643/com.example.android.camera2video W/System.err﹕ at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
04-12 18:14:17.880 6643-6643/com.example.android.camera2video W/System.err﹕ at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
04-12 18:14:20.526 6643-6693/com.example.android.camera2video E/RequestThread-0﹕ Timed out while waiting for request to complete.
04-12 18:14:20.554 6643-6693/com.example.android.camera2video W/CaptureCollector﹕ Preview buffers dropped for request: 0
04-12 18:14:20.554 6643-6693/com.example.android.camera2video E/CameraDeviceState﹕ Cannot receive result while in state: 0
04-12 18:14:20.555 6643-6693/com.example.android.camera2video E/CameraDeviceState﹕ Cannot receive result while in state: 0
04-12 18:14:20.593 6643-6693/com.example.android.camera2video E/CameraDeviceState﹕ Cannot receive result while in state: 0
04-12 18:14:20.620 6643-6660/com.example.android.camera2video W/MessageQueue﹕ Handler (android.graphics.SurfaceTexture$1) {1582ed32} sending message to a Handler on a dead thread
java.lang.IllegalStateException: Handler (android.graphics.SurfaceTexture$1) {1582ed32} sending message to a Handler on a dead thread
at android.os.MessageQueue.enqueueMessage(MessageQueue.java:325)
at android.os.Handler.enqueueMessage(Handler.java:631)
at android.os.Handler.sendMessageAtTime(Handler.java:600)
at android.os.Handler.sendMessageDelayed(Handler.java:570)
at android.os.Handler.sendEmptyMessageDelayed(Handler.java:534)
at android.os.Handler.sendEmptyMessage(Handler.java:519)
at android.graphics.SurfaceTexture.postEventFromNative(SurfaceTexture.java:368)
04-12 18:14:20.644 6643-6693/com.example.android.camera2video E/BufferQueueProducer﹕ [unnamed-6643-1] cancelBuffer: BufferQueue has been abandoned
04-12 18:14:20.648 6643-6693/com.example.android.camera2video E/BufferQueueProducer﹕ [unnamed-6643-1] cancelBuffer: BufferQueue has been abandoned
04-12 18:14:20.652 6643-6693/com.example.android.camera2video E/BufferQueueProducer﹕ [unnamed-6643-1] cancelBuffer: BufferQueue has been abandoned
04-12 18:14:20.655 6643-6693/com.example.android.camera2video E/BufferQueueProducer﹕ [unnamed-6643-1] cancelBuffer: BufferQueue has been abandoned
04-12 18:14:20.659 6643-6693/com.example.android.camera2video E/BufferQueueProducer﹕ [unnamed-6643-1] cancelBuffer: BufferQueue has been abandoned
04-12 18:14:20.798 6643-6643/com.example.android.camera2video I/Choreographer﹕ Skipped 174 frames! The application may be doing too much work on its main thread.
from android-camera2video.
Same here, Nexus 4, Android 5.1
from android-camera2video.
Hey Hantc, check my PR:
#6
Its based on a fix from someone over on the Xamarin port.
Works for me on the Nexus 4 on 5.1 :)
from android-camera2video.
Many thanks! Works. I tried to fix it by myself (according to xamarin fix),
but as I'm new in this technology so I wasn't able to:)
2015-04-24 8:57 GMT+02:00 madhavajay [email protected]:
Its based on a fix from someone over on the Xamarin port.
Works for me on the Nexus 4 on 5.1 :)—
Reply to this email directly or view it on GitHub
#5 (comment)
.
from android-camera2video.
No problems! :) Good luck.
from android-camera2video.
I think the description of the stop()
method does mean something. Perhaps the reason it crashes is that no valid audio/video data received, which is also why there's empty output file ? Do you not get empty output file ? @madhavajay
Stops recording. Call this after start(). Once recording is stopped,
* you will have to configure it again as if it has just been constructed.
* Note that a RuntimeException is intentionally thrown to the
* application, if no valid audio/video data has been received when stop()
* is called. This happens if stop() is called immediately after
* start(). The failure lets the application take action accordingly to
* clean up the output file (delete the output file, for instance), since
* the output file is not properly constructed when this happens.
*
* @throws IllegalStateException if it is called before start()
from android-camera2video.
check out this stackoverflow answer
worked for me
from android-camera2video.
For those who are getting SurfaceAbandonedException just remove the mMediaRecorder.stop() / mMediaRecorder.release(); from the stopRecordingVideo() method. The mediaplayer causes the surface to destroy and leading to app crash
from android-camera2video.
This sample has been migrated to a new location where we can accept Pull Requests (check README for more information).
As recommended by GitHub, we are closing all issues and pull requests now that this older repo will be archived.
If you still see this issue in the updated repo, please reopen the issue/PR there. Thank you!
from android-camera2video.
Related Issues (20)
- Target Version Android Q Preview HOT 1
- Lock screen,unLock screen HOT 3
- setVideoFrameRate not work for me HOT 2
- NPE on StartPreview after stopRecording HOT 1
- Crash after stopping recording HOT 3
- Is there an alternate for setting video orientation of the output file? HOT 1
- update openCV
- How to add timestamp on each frame? HOT 1
- MediaRecorder and VideoSource.SURFACE, stop failed: -1007 HOT 2
- Changing Resolution to 4K
- Heating during capture HOT 1
- Video not playing on 7.0 and above HOT 6
- Video Pause/Resume... HOT 2
- the video that is recorded with this sample app doesn't play with exoplayer HOT 2
- the recorded video has a problem, it shows a screenshot that takes a time equal to whole of the video HOT 5
- Where is the video file getting stored? HOT 3
- Unable to set custom FPS HOT 1
- Why the videos i record always are horizontal HOT 1
- Camera freezes after unlocking the phone after a few minutes. HOT 1
- Rear camera showing solid green color, front camera is fine. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-camera2video.