Skip to content

Crash when trying to open user subreddits (r/u_user) for users with a dash (-) in their username #1326

@ayawnymouse

Description

@ayawnymouse

Please note, the example user here ( u_Ruby_Soho- ) is NSFW, I only encounter this issue with my NSFW account because of how I use Reddit. This particular one also contains underscores ( _ ) but I know from other encounters that those are fine and it's the dash that is the problem.

In order to actually follow a user requires being able to open the user subreddit ( /r/u_username ) for them, but that isn't possible if the username contains a dash/hyphen ( - ) because the app hits an exception. Also tested with latest RedReader alpha version 363. (And earlier)

Here's the report it generated for sending by email, which I've done before, but this is the issue tracker.

Error report -- RedReader v1.25

Manufacturer: Google
Model: Pixel 7 Pro
Product: cheetah
Android release: 16
Android SDK: 36


Exception: java.lang.RuntimeException
Got exception for subreddit: u_Ruby_Soho-
okio.-SegmentedByteString.onActionMenuItemSelected(r8-map-id-a302616bba84542209fb8ae7bdf0d77a04273f04707f227de4c5acb4da43a210:492)
org.quantumbadger.redreader.common.LinkHandler$$ExternalSyntheticLambda3.onClick(r8-map-id-a302616bba84542209fb8ae7bdf0d77a04273f04707f227de4c5acb4da43a210:104)
androidx.appcompat.app.AlertController$AlertParams$3.onItemClick(r8-map-id-a302616bba84542209fb8ae7bdf0d77a04273f04707f227de4c5acb4da43a210:9)
android.widget.AdapterView.performItemClick(AdapterView.java:330)
android.widget.AbsListView.performItemClick(AbsListView.java:1274)
android.widget.AbsListView$PerformClick.run(AbsListView.java:3287)
android.widget.AbsListView$3.run(AbsListView.java:4266)
android.os.Handler.handleCallback(Handler.java:995)
android.os.Handler.dispatchMessage(Handler.java:103)
android.os.Looper.loopOnce(Looper.java:248)
android.os.Looper.loop(Looper.java:338)
android.app.ActivityThread.main(ActivityThread.java:9067)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:593)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:932)
Caused by: Exception: java.lang.NullPointerException
Attempt to invoke virtual method 'android.net.Uri org.quantumbadger.redreader.reddit.url.RedditURLParser$RedditURL.generateJsonUri()' on a null object reference
okio.-SegmentedByteString.onActionMenuItemSelected(r8-map-id-a302616bba84542209fb8ae7bdf0d77a04273f04707f227de4c5acb4da43a210:470)
org.quantumbadger.redreader.common.LinkHandler$$ExternalSyntheticLambda3.onClick(r8-map-id-a302616bba84542209fb8ae7bdf0d77a04273f04707f227de4c5acb4da43a210:104)
androidx.appcompat.app.AlertController$AlertParams$3.onItemClick(r8-map-id-a302616bba84542209fb8ae7bdf0d77a04273f04707f227de4c5acb4da43a210:9)
android.widget.AdapterView.performItemClick(AdapterView.java:330)
android.widget.AbsListView.performItemClick(AbsListView.java:1274)
android.widget.AbsListView$PerformClick.run(AbsListView.java:3287)
android.widget.AbsListView$3.run(AbsListView.java:4266)
android.os.Handler.handleCallback(Handler.java:995)
android.os.Handler.dispatchMessage(Handler.java:103)
android.os.Looper.loopOnce(Looper.java:248)
android.os.Looper.loop(Looper.java:338)
android.app.ActivityThread.main(ActivityThread.java:9067)
java.lang.reflect.Method.invoke(Native Method)
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:593)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:932)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions