TecCheck/FastLyrics

Force crash on launch?

PeterKW opened this issue · 3 comments

Any idea what this means?

FATAL EXCEPTION: main
Process: io.github.teccheck.fastlyrics, PID: 25644
java.lang.RuntimeException: Unable to start activity ComponentInfo{io.github.teccheck.fastlyrics/io.github.teccheck.fastlyrics.MainActivity}: android.view.InflateException: Binary XML file line #15 in io.github.teccheck.fastlyrics:layout/activity_main: Binary XML file line #34 in io.github.teccheck.fastlyrics:layout/app_bar_main: Error inflating class fragment
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3636)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3793)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2211)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7894)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1009)
Caused by: android.view.InflateException: Binary XML file line #15 in io.github.teccheck.fastlyrics:layout/activity_main: Binary XML file line #34 in io.github.teccheck.fastlyrics:layout/app_bar_main: Error inflating class fragment
Caused by: android.view.InflateException: Binary XML file line #34 in io.github.teccheck.fastlyrics:layout/app_bar_main: Error inflating class fragment
Caused by: java.lang.NullPointerException: title must not be null
at io.github.teccheck.fastlyrics.api.MediaSession.getSongMeta(MediaSession.kt:62)
at io.github.teccheck.fastlyrics.api.MediaSession.getSongInformation(MediaSession.kt:23)
at io.github.teccheck.fastlyrics.ui.fastlyrics.FastLyricsViewModel.loadLyricsForCurrentSong(FastLyricsViewModel.kt:44)
at io.github.teccheck.fastlyrics.ui.fastlyrics.FastLyricsFragment.loadLyricsForCurrentSong(FastLyricsFragment.kt:87)
at io.github.teccheck.fastlyrics.ui.fastlyrics.FastLyricsFragment.onCreateView(FastLyricsFragment.kt:69)
at androidx.fragment.app.Fragment.performCreateView(Fragment.java:3104)
at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:524)
at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:261)
at androidx.fragment.app.FragmentStore.moveToExpectedState(FragmentStore.java:113)
at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1433)
at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:2977)
at androidx.fragment.app.FragmentManager.dispatchViewCreated(FragmentManager.java:2888)
at androidx.fragment.app.Fragment.performViewCreated(Fragment.java:3129)
at androidx.fragment.app.FragmentStateManager.ensureInflatedView(FragmentStateManager.java:394)
at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:260)
at androidx.fragment.app.FragmentLayoutInflaterFactory.onCreateView(FragmentLayoutInflaterFactory.java:142)
at androidx.fragment.app.FragmentController.onCreateView(FragmentController.java:136)
at androidx.fragment.app.FragmentActivity.dispatchFragmentsOnCreateView(FragmentActivity.java:248)
at androidx.fragment.app.FragmentActivity.onCreateView(FragmentActivity.java:227)
at android.view.LayoutInflater.tryCreateView(LayoutInflater.java:1073)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:1001)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:965)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:1127)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1088)
at android.view.LayoutInflater.parseInclude(LayoutInflater.java:1267)

I'm sorry it took so long to answer. It seems to me that Android doesn't know the title of the song you where playing. However the app expected there to be a title. That's why it crashed.

Can you try to play a different song to see if it's just that song? I'll make a fix soon:tm:

I hope, this is fixed now. You can try it out by either building the lastest source code yourself or installing
app-release.apk.zip (you need to remove the .zip for that to work)

I think this is fixed. Therefore I'll close this issue. If the crash happens again, you can reopen it