ihhub / fheroes2

fheroes2 is a recreation of Heroes of Might and Magic II game engine.
https://ihhub.github.io/fheroes2/
GNU General Public License v2.0
2.73k stars 376 forks source link

fh2Toolset crash report #7415

Closed ihhub closed 1 year ago

ihhub commented 1 year ago

Preliminary checks

Platform

Android

Describe the bug

I am not sure how to a user was able to make the application crash but here is a stack trace:

Type java.lang.IllegalStateException

Exception java.lang.IllegalStateException: Could not execute method for android:onClick
  at androidx.appcompat.app.AppCompatViewInflater$DeclaredOnClickListener.onClick (AppCompatViewInflater.java:446)
  at android.view.View.performClick (View.java:5205)
  at com.google.android.material.button.MaterialButton.performClick (MaterialButton.java:1211)
  at android.view.View$PerformClick.run (View.java:21164)
  at android.os.Handler.handleCallback (Handler.java:739)
  at android.os.Handler.dispatchMessage (Handler.java:95)
  at android.os.Looper.loop (Looper.java:148)
  at android.app.ActivityThread.main (ActivityThread.java:5417)
  at java.lang.reflect.Method.invoke
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:726)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:616)
Caused by java.lang.reflect.InvocationTargetException:
  at java.lang.reflect.Method.invoke
  at androidx.appcompat.app.AppCompatViewInflater$DeclaredOnClickListener.onClick (AppCompatViewInflater.java:441)
Caused by android.content.ActivityNotFoundException:
  at android.app.Instrumentation.checkStartActivityResult (Instrumentation.java:1805)
  at android.app.Instrumentation.execStartActivity (Instrumentation.java:1514)
  at android.app.Activity.startActivityForResult (Activity.java:3963)
  at androidx.activity.ComponentActivity.startActivityForResult (ComponentActivity.java:705)
  at android.app.Activity.startActivityForResult (Activity.java:3924)
  at androidx.activity.ComponentActivity.startActivityForResult (ComponentActivity.java:686)
  at android.app.Activity.startActivity (Activity.java:4247)
  at android.app.Activity.startActivity (Activity.java:4215)
  at org.fheroes2.ToolsetActivity.downloadHoMM2DemoButtonClicked (ToolsetActivity.java:170)

The crash happened on 1.0.5 version using Lenovo TB2-X30F (Lenovo TAB 2 A10-30) Android 6.0 (SDK 23).

Save file

No need.

Additional info

No response

oleg-derevenetz commented 1 year ago
Caused by android.content.ActivityNotFoundException:
  at android.app.Instrumentation.checkStartActivityResult (Instrumentation.java:1805)
  at android.app.Instrumentation.execStartActivity (Instrumentation.java:1514)
  at android.app.Activity.startActivityForResult (Activity.java:3963)
  at androidx.activity.ComponentActivity.startActivityForResult (ComponentActivity.java:705)
  at android.app.Activity.startActivityForResult (Activity.java:3924)
  at androidx.activity.ComponentActivity.startActivityForResult (ComponentActivity.java:686)
  at android.app.Activity.startActivity (Activity.java:4247)
  at android.app.Activity.startActivity (Activity.java:4215)
  at org.fheroes2.ToolsetActivity.downloadHoMM2DemoButtonClicked (ToolsetActivity.java:170)

This is the root cause. User clicked the "Download HOMM2 demo button", toolset attempted to start the user's default download manager (or browser) app, this app failed to start for some reason (probably because there is no app on user's device to handle HTTPS URLs?), hence this error.