Skip to content
This repository has been archived by the owner on Oct 28, 2024. It is now read-only.

crashes when I open the app #430

Closed
deanveloper opened this issue Feb 14, 2023 · 11 comments
Closed

crashes when I open the app #430

deanveloper opened this issue Feb 14, 2023 · 11 comments
Labels
bug Something isn't working

Comments

@deanveloper
Copy link

deanveloper commented Feb 14, 2023

Describe the bug

A clear and concise description of what the bug is.

When I open the app, it crashes

To reproduce

Steps to reproduce the behavior:

  1. open the app
  2. it crashes 😱

Does this happen in the official app?

No

Does this issue also occur with the respective upstream release?

No

Screenshots and screen recordings

If applicable, add screenshots (and screen recordings, if possible) to help explain your problem.

Version

Megalodon version:

version 1.1.5+fork.76-play

I run a Pixel 7 Pro on Android 13 (Dec 5th security update)

Crash log

If you know your way around Android development tools, please consider attaching a crash log, if possible.

I'd love to provide one, but unfortunately don't know how.

@deanveloper deanveloper added the bug Something isn't working label Feb 14, 2023
@TheEssem
Copy link

I'm having this same issue, here's a crash log I got through Scoop:

FATAL EXCEPTION: main
Process: org.joinmastodon.android.sk, PID: 23970
java.lang.RuntimeException: Unable to start activity ComponentInfo{org.joinmastodon.android.sk/org.joinmastodon.android.MainActivity}: java.lang.StringIndexOutOfBoundsException: length=0; index=0
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3645)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3782)
	at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101)
	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:2307)
	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:7868)
	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:936)
Caused by: java.lang.StringIndexOutOfBoundsException: length=0; index=0
	at java.lang.String.charAt(Native Method)
	at android.graphics.Color.parseColor(Color.java:1383)
	at org.joinmastodon.android.fragments.c6.p1(SourceFile:212)
	at org.joinmastodon.android.fragments.c6.Y(SourceFile:64)
	at u.d.onCreateView(SourceFile:24)
	at android.app.Fragment.performCreateView(Fragment.java:2505)
	at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1303)
	at android.app.FragmentManagerImpl.addAddedFragments(FragmentManager.java:2431)
	at android.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2210)
	at android.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2166)
	at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2067)
	at android.app.FragmentManagerImpl.dispatchMoveToState(FragmentManager.java:3057)
	at android.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManager.java:3004)
	at android.app.Fragment.performActivityCreated(Fragment.java:2520)
	at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1323)
	at android.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1581)
	at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1642)
	at android.app.FragmentManagerImpl.dispatchMoveToState(FragmentManager.java:3052)
	at android.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManager.java:3004)
	at android.app.FragmentController.dispatchActivityCreated(FragmentController.java:185)
	at android.app.Activity.performCreate(Activity.java:8319)
	at android.app.Activity.performCreate(Activity.java:8290)
	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1421)
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3626)
	... 12 more

@deanveloper
Copy link
Author

@TheEssem Given that it looks like it's trying to parse a color on launch, what color theme are you using? I use system theme, which might make sense as to why this is occurring?

@cybersulu
Copy link

I'm experiencing a crash upon opening the app also. I noticed that it only happens when I'm signed in with an owner/admin account. When I change to a regular user role on the same account/server, it no longer crashes.

@TheEssem
Copy link

@TheEssem Given that it looks like it's trying to parse a color on launch, what color theme are you using? I use system theme, which might make sense as to why this is occurring?

I have the color set to blue inside the app.

@deanveloper
Copy link
Author

I'm experiencing a crash upon opening the app also. I noticed that it only happens when I'm signed in with an owner/admin account. When I change to a regular user role on the same account/server, it no longer crashes.

Yup, I'm an admin as well. I assume that's where the issue stems from then

@MagicGoddess
Copy link

I'm facing this issue as well, and I'm an admin as well.

@cryofault
Copy link

Another admin account, same issue it's definitely related

@TheEssem
Copy link

Yeah, I'm also an admin.

@hazycora
Copy link

hazycora commented Feb 15, 2023

Hi, same, and on another admin account! if the color theme thing is relevant as someone else guessed, I'm pretty sure mine was set to purple.

Stack trace from Scoop:

FATAL EXCEPTION: main
Process: org.joinmastodon.android.sk, PID: 16207
java.lang.RuntimeException: Unable to start activity ComponentInfo{org.joinmastodon.android.sk/org.joinmastodon.android.MainActivity}: java.lang.StringIndexOutOfBoundsException: length=0; index=0
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3645)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3782)
	at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101)
	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:2307)
	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:7872)
	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:936)
Caused by: java.lang.StringIndexOutOfBoundsException: length=0; index=0
	at java.lang.String.charAt(Native Method)
	at android.graphics.Color.parseColor(Color.java:1383)
	at org.joinmastodon.android.fragments.ProfileFragment.bindHeaderView(ProfileFragment.java:493)
	at org.joinmastodon.android.fragments.ProfileFragment.onCreateContentView(ProfileFragment.java:309)
	at me.grishka.appkit.fragments.LoaderFragment.onCreateView(LoaderFragment.java:78)
	at android.app.Fragment.performCreateView(Fragment.java:2505)
	at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1303)
	at android.app.FragmentManagerImpl.addAddedFragments(FragmentManager.java:2431)
	at android.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2210)
	at android.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2166)
	at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2067)
	at android.app.FragmentManagerImpl.dispatchMoveToState(FragmentManager.java:3057)
	at android.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManager.java:3004)
	at android.app.Fragment.performActivityCreated(Fragment.java:2520)
	at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1323)
	at android.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1581)
	at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1642)
	at android.app.FragmentManagerImpl.dispatchMoveToState(FragmentManager.java:3052)
	at android.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManager.java:3004)
	at android.app.FragmentController.dispatchActivityCreated(FragmentController.java:185)
	at android.app.Activity.performCreate(Activity.java:8313)
	at android.app.Activity.performCreate(Activity.java:8284)
	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1417)
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3626)
	... 12 more

@rmford91
Copy link

rmford91 commented Feb 15, 2023

Having the same issue here. I'm also an admin and my instance is running 4.1.0. Using a Pixel 5a, Android 13, app version 1.1.5+fork.76-play and the app Color Palette setting is set to System, in case that matters. I also noticed if I uninstall the app and then re-install it, the app will work the first time I launch it and keep working until I close the app by swiping it away.

@parkrocker
Copy link

The problem does not occur in version v1.1.5+fork.74, but it does in all newer versions.

@sk22 sk22 closed this as completed in c05d0b6 Feb 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants