sergstetsuk / CosyDVR

android open source auto DVR
Other
51 stars 23 forks source link

Changing the number on "video height feature" causes the application to crash. #39

Open rezamusic881 opened 6 years ago

rezamusic881 commented 6 years ago

Project Information


Expected behavior

Supposedly, When changing numbers on the "Video Height" feature and doing a video record does not cause the application to crash.

Actual behavior

When changing numbers on the "Video Height" feature and making a video recording causes the app to crash.

How to reproduce

  1. Instal App here
  2. Run the app.
  3. Click and hold on the "start" feature to enter the "settings" feature.
  4. After successfully entering the "Settings" feature, then you will find "Video Height feature".
  5. Please change the number on "Video Height Feature" and do Video Record, then the application will crash.

Environment



Recording Of The Issues

https://youtu.be/_3u83ckOuVg


Logcat

05-23 19:45:58.694 31276 31276 E AndroidRuntime: FATAL EXCEPTION: main
05-23 19:45:58.694 31276 31276 E AndroidRuntime: Process: es.esy.CosyDVR, PID: 31276
05-23 19:45:58.694 31276 31276 E AndroidRuntime: java.lang.RuntimeException: Camera is being used after Camera.release() was called
05-23 19:45:58.694 31276 31276 E AndroidRuntime:    at android.hardware.Camera.native_getParameters(Native Method)
05-23 19:45:58.694 31276 31276 E AndroidRuntime:    at android.hardware.Camera.getParameters(Camera.java:2050)
05-23 19:45:58.694 31276 31276 E AndroidRuntime:    at es.esy.CosyDVR.BackgroundVideoRecorder.applyCameraParameters(BackgroundVideoRecorder.java:713)
05-23 19:45:58.694 31276 31276 E AndroidRuntime:    at es.esy.CosyDVR.BackgroundVideoRecorder.StartRecording(BackgroundVideoRecorder.java:524)
05-23 19:45:58.694 31276 31276 E AndroidRuntime:    at es.esy.CosyDVR.BackgroundVideoRecorder.RestartRecording(BackgroundVideoRecorder.java:469)
05-23 19:45:58.694 31276 31276 E AndroidRuntime:    at es.esy.CosyDVR.CosyDVR$3.onClick(CosyDVR.java:220)
05-23 19:45:58.694 31276 31276 E AndroidRuntime:    at android.view.View.performClick(View.java:5647)
05-23 19:45:58.694 31276 31276 E AndroidRuntime:    at android.view.View$PerformClick.run(View.java:22462)
05-23 19:45:58.694 31276 31276 E AndroidRuntime:    at android.os.Handler.handleCallback(Handler.java:754)
05-23 19:45:58.694 31276 31276 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:95)
05-23 19:45:58.694 31276 31276 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:163)
05-23 19:45:58.694 31276 31276 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:6361)
05-23 19:45:58.694 31276 31276 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)
05-23 19:45:58.694 31276 31276 E AndroidRuntime:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
05-23 19:45:58.694 31276 31276 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)

Proof Of Work Done

Submit in github
sergstetsuk commented 6 years ago

It seems that you've used incompatible parameters for your device 1280x1280. If you'd like better quality try Width=1920, Height=1080.