zoriya / Opus

Android app for playing music from local file or from youtube.
https://www.raccoon-sdg.fr/en
GNU General Public License v3.0
9 stars 2 forks source link

The app crashing when trying to edit meta data #9

Closed masudr4n4 closed 5 years ago

masudr4n4 commented 5 years ago

Actual behavior

Can not edit meta data,app crashing after clicking the save button.

Expected behavior

I expected that I can edit song meta data and save it successfully.

How to reproduce

  1. Download the app from releas page
  2. Install and give all the permission requiring by the app
  3. Open the app and Click more
  4. Go to any folder which is containing music.
  5. Click any song to play.
  6. Click vertical three dots and click edit metadata
  7. Edit something and click the save icon
  8. See the error

Information

Recording Of The Bug

https://youtu.be/NOIi-Sr23Wc

Logcat


04-20 18:09:58.178 10866 10866 E AndroidRuntime: FATAL EXCEPTION: main

04-20 18:09:58.178 10866 10866 E AndroidRuntime: Process: swati4star.createpdf, PID: 10866

04-20 18:09:58.178 10866 10866 E AndroidRuntime: java.lang.RuntimeException: Unable to destroy activity {swati4star.createpdf/swati4star.createpdf.activity.MainActivity}: java.lang.NullPointerException: Attempt to get length of null array

04-20 18:09:58.178 10866 10866 E AndroidRuntime:    at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:5139)

04-20 18:09:58.178 10866 10866 E AndroidRuntime:    at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:5162)

04-20 18:09:58.178 10866 10866 E AndroidRuntime:    at android.app.ActivityThread.access$1700(ActivityThread.java:229)

04-20 18:09:58.178 10866 10866 E AndroidRuntime:    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1880)

04-20 18:09:58.178 10866 10866 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:102)

04-20 18:09:58.178 10866 10866 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:148)

04-20 18:09:58.178 10866 10866 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:7325)

04-20 18:09:58.178 10866 10866 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)

04-20 18:09:58.178 10866 10866 E AndroidRuntime:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)

04-20 18:09:58.178 10866 10866 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

04-20 18:09:58.178 10866 10866 E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to get length of null array

04-20 18:09:58.178 10866 10866 E AndroidRuntime:    at swati4star.createpdf.util.FileUtils.makeAndClearTemp(FileUtils.java:454)

04-20 18:09:58.178 10866 10866 E AndroidRuntime:    at swati4star.createpdf.activity.MainActivity.onDestroy(MainActivity.java:147)

04-20 18:09:58.178 10866 10866 E AndroidRuntime:    at android.app.Activity.performDestroy(Activity.java:7130)

04-20 18:09:58.178 10866 10866 E AndroidRuntime:    at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1171)

04-20 18:09:58.178 10866 10866 E AndroidRuntime:    at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:5117)

04-20 18:09:58.178 10866 10866 E AndroidRuntime:    ... 9 more

04-20 18:09:58.178  1647 11182 E android.os.Debug: ro.product_ship = true

04-20 18:09:58.178  1647 11182 E android.os.Debug: ro.debug_level = 0x4f4c

zoriya commented 5 years ago

Thank you for the quality of your feedback, i realy apreciate. Unfortunalty i couldn't reproduce your error, it's working fine on my device and on my emulator. I couldn't find where the app crash so i added some debugging message and if you agree, i would like you to install a new version (that you can download here) and try to reproduce the bug. If you can, please give me the logs. That would really help me to solve this bug.

PS: The new version that I just gave is totally not production ready and there is some menu that won't behave normaly. It's because I'm currently reworking many part of the app in order to optimize this.

Thanks!

masudr4n4 commented 5 years ago

Tnx for reply.I tried your given version,same thing happening but in this version after auto relounce the app not crashing.As you see in the video app crashing double time. Logcat of your given apk.


04-21 10:34:08.287 32716 32716 E AndroidRuntime: FATAL EXCEPTION: main

04-21 10:34:08.287 32716 32716 E AndroidRuntime: Process: com.sdg.opus, PID: 32716

04-21 10:34:08.287 32716 32716 E AndroidRuntime: android.runtime.JavaProxyThrowable: System.UnauthorizedAccessException: Access to the path "/storage/6358-17F7/newfoldar/SHAREit/files/MY MUSIC/---SHOLOANA VIDEO SONG - SHAKIB KHAN - SUBHASHREE - BENGALI MOVIE EID 2017 -.mp3" is denied.

04-21 10:34:08.287 32716 32716 E AndroidRuntime:   at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x001b7] in <2ca6b1c40e8a4556a6968b0f37e162c6>:0 

04-21 10:34:08.287 32716 32716 E AndroidRuntime:   at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean isAsync, System.Boolean anonymous) [0x00000] in <2ca6b1c40e8a4556a6968b0f37e162c6>:0 

04-21 10:34:08.287 32716 32716 E AndroidRuntime:   at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access) [0x00000] in <2ca6b1c40e8a4556a6968b0f37e162c6>:0 

04-21 10:34:08.287 32716 32716 E AndroidRuntime:   at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess)

04-21 10:34:08.287 32716 32716 E AndroidRuntime:   at Opus.Fragments.EditMetaData+d__20.MoveNext () [0x00226] in <9268af584b2a4a35b6fda198ced34845>:0 

04-21 10:34:08.287 32716 32716 E AndroidRuntime: --- End of stack trace from previous location where exception was thrown ---

04-21 10:34:08.287 32716 32716 E AndroidRuntime:   at Opus.Fragments.EditMetaData+<b__13_0>d.MoveNext () [0x00069] in <9268af584b2a4a35b6fda198ced34845>:0 

04-21 10:34:08.287 32716 32716 E AndroidRuntime: --- End of stack trace from previous location where exception was thrown ---

04-21 10:34:08.287 32716 32716 E AndroidRuntime:   at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.b__6_0 (System.Object state) [0x00000] in <2ca6b1c40e8a4556a6968b0f37e162c6>:0 

04-21 10:34:08.287 32716 32716 E AndroidRuntime:   at Android.App.SyncContext+<>c__DisplayClass2_0.b__0 () [0x00000] in <1bf7f1d1eda6408d9af9632272dc781e>:0 

04-21 10:34:08.287 32716 32716 E AndroidRuntime:   at Java.Lang.Thread+RunnableImplementor.Run () [0x00008] in <1bf7f1d1eda6408d9af9632272dc781e>:0 

04-21 10:34:08.287 32716 32716 E AndroidRuntime:   at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00009] in <1bf7f1d1eda6408d9af9632272dc781e>:0 

04-21 10:34:08.287 32716 32716 E AndroidRuntime:   at (wrapper dynamic-method) System.Object.75(intptr,intptr)

04-21 10:34:08.287 32716 32716 E AndroidRuntime:    at mono.java.lang.RunnableImplementor.n_run(Native Method)

04-21 10:34:08.287 32716 32716 E AndroidRuntime:    at mono.java.lang.RunnableImplementor.run(RunnableImplementor.java:30)

04-21 10:34:08.287 32716 32716 E AndroidRuntime:    at android.os.Handler.handleCallback(Handler.java:739)

04-21 10:34:08.287 32716 32716 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:95)

04-21 10:34:08.287 32716 32716 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:148)

04-21 10:34:08.287 32716 32716 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:7325)

04-21 10:34:08.287 32716 32716 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)

04-21 10:34:08.287 32716 32716 E AndroidRuntime:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)

04-21 10:34:08.287 32716 32716 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

04-21 10:34:08.297  1647  2449 W ActivityManager:   Force finishing activity com.sdg.opus/md52ff88170c7d9970a054602f7f7250344.EditMetaData

04-21 10:34:08.297  1647  2449 D InputDispatcher: Focused application set to: xxxx

04-21 10:34:08.307  1647  2449 D ActivityTrigger: ActivityTrigger activityPauseTrigger 

04-21 10:34:08.307  1647   531 W DropBoxManagerService: Dropping: data_app_crash (2701 > 0 bytes)

04-21 10:34:08.317  1647   532 E android.os.Debug: ro.product_ship = true

04-21 10:34:08.317  1647   532 E android.os.Debug: ro.debug_level = 0x4f4c

04-21 10:34:08.317  1647   532 E android.os.Debug: sys.mobilecare.preload = false

zoriya commented 5 years ago

Thanks for the report, i could find where the error is ocuring but i can't figure why the app crash. Is your song in a SD card or any other external storage? If yes, could you try with a file in the internal storage and tell me if the app crash again.

masudr4n4 commented 5 years ago

Hi @AnonymusRaccoon sorry for lately reply.Yeah when the song is in internal storage i can edit metadata without crash. But error occuring still if the song is in external sd card. i hope that now you are clear about the problem and looking forward to solve the problem.

zoriya commented 5 years ago

Sure, I am still no very familiar with GitHub issues so I didn't even think of this. Thank you for your help with this error, you really helped me a lot. I'll try to fix this for the next update.

masudr4n4 commented 5 years ago

Thanks for early response.I see how serious you are about your project.

zoriya commented 5 years ago

It should work by now if you use the lastet version (v3.2.6). If not, please reopen this isue.