[Bug] Crash in issues fragment #443

Closed
opened 2 years ago by mmarif · 2 comments
mmarif commented 2 years ago
Owner

# What do you want to address?

(This step is required; examples are shown below)

  • Bug
  • Feature
  • Suggestion

# Describe your matter briefly

App crash when moving around in the repo fragments. It is caused by the issues fragment.

User just sent a log.

Some additional details (Useful, when we are trying to reproduce a bug)

(This step is optional; an example is shown below)

  • The version of Gitea you are using:
  • The version of GitNex you are using: 2.5.0
  • The type of certificate you are using (self-signed, signed):
  • How you used to log in (via password or token):
We would appreciate some screenshots or stacktrace's, but this is also not required.

04-23 14:14:36.953 E/AndroidRuntime(  838): java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object android.content.Context.getSystemService(java.lang.String)' on a null object reference
04-23 14:14:36.953 E/AndroidRuntime(  838): 	at org.mian.gitnex.util.AppUtil.haveNetworkConnection(AppUtil.java:34)
04-23 14:14:36.953 E/AndroidRuntime(  838): 	at org.mian.gitnex.clients.RetrofitClient.<init>(RetrofitClient.java:32)
04-23 14:14:36.953 E/AndroidRuntime(  838): 	at org.mian.gitnex.clients.RetrofitClient.getInstance(RetrofitClient.java:80)
04-23 14:14:36.953 E/AndroidRuntime(  838): 	at org.mian.gitnex.fragments.IssuesOpenFragment.lambda$loadNext$2$IssuesOpenFragment(IssuesOpenFragment.java:211)
04-23 14:14:36.953 E/AndroidRuntime(  838): 	at org.mian.gitnex.fragments.-$$Lambda$IssuesOpenFragment$C2_hBl-dKIS-qgZnFLap0Kh4LeQ.run(Unknown Source:16)
04-23 14:14:36.953 E/AndroidRuntime(  838): 	at android.os.Handler.handleCallback(Handler.java:883)
04-23 14:14:36.953 E/AndroidRuntime(  838): 	at android.os.Handler.dispatchMessage(Handler.java:100)
04-23 14:14:36.953 E/AndroidRuntime(  838): 	at android.os.Looper.loop(Looper.java:214)
04-23 14:14:36.953 E/AndroidRuntime(  838): 	at android.app.ActivityThread.main(ActivityThread.java:7356)
04-23 14:14:36.953 E/AndroidRuntime(  838): 	at java.lang.reflect.Method.invoke(Native Method)
04-23 14:14:36.953 E/AndroidRuntime(  838): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
04-23 14:14:36.953 E/AndroidRuntime(  838): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
04-23 14:14:36.953 E/ACRA    (  838): ACRA caught a NullPointerException for org.mian.gitnex
04-23 14:14:36.953 E/ACRA    (  838): java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object android.content.Context.getSystemService(java.lang.String)' on a null object reference
04-23 14:14:36.953 E/ACRA    (  838): 	at org.mian.gitnex.util.AppUtil.haveNetworkConnection(AppUtil.java:34)
04-23 14:14:36.953 E/ACRA    (  838): 	at org.mian.gitnex.clients.RetrofitClient.<init>(RetrofitClient.java:32)
04-23 14:14:36.953 E/ACRA    (  838): 	at org.mian.gitnex.clients.RetrofitClient.getInstance(RetrofitClient.java:80)
04-23 14:14:36.953 E/ACRA    (  838): 	at org.mian.gitnex.fragments.IssuesOpenFragment.lambda$loadNext$2$IssuesOpenFragment(IssuesOpenFragment.java:211)
04-23 14:14:36.953 E/ACRA    (  838): 	at org.mian.gitnex.fragments.-$$Lambda$IssuesOpenFragment$C2_hBl-dKIS-qgZnFLap0Kh4LeQ.run(Unknown Source:16)
04-23 14:14:36.953 E/ACRA    (  838): 	at android.os.Handler.handleCallback(Handler.java:883)
04-23 14:14:36.953 E/ACRA    (  838): 	at android.os.Handler.dispatchMessage(Handler.java:100)
04-23 14:14:36.953 E/ACRA    (  838): 	at android.os.Looper.loop(Looper.java:214)
04-23 14:14:36.953 E/ACRA    (  838): 	at android.app.ActivityThread.main(ActivityThread.java:7356)
04-23 14:14:36.953 E/ACRA    (  838): 	at java.lang.reflect.Method.invoke(Native Method)
04-23 14:14:36.953 E/ACRA    (  838): 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
04-23 14:14:36.953 E/ACRA    (  838): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)

By the way this issue is fixed in #439

## # What do you want to address? (This step is required; examples are shown below) - [x] Bug - [ ] Feature - [ ] Suggestion ## # Describe your matter briefly App crash when moving around in the repo fragments. It is caused by the issues fragment. User just sent a log. ##### Some additional details (Useful, when we are trying to reproduce a bug) --- _(This step is optional; an example is shown below)_ * The version of **Gitea** you are using: * The version of **GitNex** you are using: 2.5.0 * The type of certificate you are using (self-signed, signed): * How you used to log in (via password or token): ##### We would appreciate some screenshots or stacktrace's, but this is also not required. --- ``` 04-23 14:14:36.953 E/AndroidRuntime( 838): java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object android.content.Context.getSystemService(java.lang.String)' on a null object reference 04-23 14:14:36.953 E/AndroidRuntime( 838): at org.mian.gitnex.util.AppUtil.haveNetworkConnection(AppUtil.java:34) 04-23 14:14:36.953 E/AndroidRuntime( 838): at org.mian.gitnex.clients.RetrofitClient.<init>(RetrofitClient.java:32) 04-23 14:14:36.953 E/AndroidRuntime( 838): at org.mian.gitnex.clients.RetrofitClient.getInstance(RetrofitClient.java:80) 04-23 14:14:36.953 E/AndroidRuntime( 838): at org.mian.gitnex.fragments.IssuesOpenFragment.lambda$loadNext$2$IssuesOpenFragment(IssuesOpenFragment.java:211) 04-23 14:14:36.953 E/AndroidRuntime( 838): at org.mian.gitnex.fragments.-$$Lambda$IssuesOpenFragment$C2_hBl-dKIS-qgZnFLap0Kh4LeQ.run(Unknown Source:16) 04-23 14:14:36.953 E/AndroidRuntime( 838): at android.os.Handler.handleCallback(Handler.java:883) 04-23 14:14:36.953 E/AndroidRuntime( 838): at android.os.Handler.dispatchMessage(Handler.java:100) 04-23 14:14:36.953 E/AndroidRuntime( 838): at android.os.Looper.loop(Looper.java:214) 04-23 14:14:36.953 E/AndroidRuntime( 838): at android.app.ActivityThread.main(ActivityThread.java:7356) 04-23 14:14:36.953 E/AndroidRuntime( 838): at java.lang.reflect.Method.invoke(Native Method) 04-23 14:14:36.953 E/AndroidRuntime( 838): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) 04-23 14:14:36.953 E/AndroidRuntime( 838): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) 04-23 14:14:36.953 E/ACRA ( 838): ACRA caught a NullPointerException for org.mian.gitnex 04-23 14:14:36.953 E/ACRA ( 838): java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object android.content.Context.getSystemService(java.lang.String)' on a null object reference 04-23 14:14:36.953 E/ACRA ( 838): at org.mian.gitnex.util.AppUtil.haveNetworkConnection(AppUtil.java:34) 04-23 14:14:36.953 E/ACRA ( 838): at org.mian.gitnex.clients.RetrofitClient.<init>(RetrofitClient.java:32) 04-23 14:14:36.953 E/ACRA ( 838): at org.mian.gitnex.clients.RetrofitClient.getInstance(RetrofitClient.java:80) 04-23 14:14:36.953 E/ACRA ( 838): at org.mian.gitnex.fragments.IssuesOpenFragment.lambda$loadNext$2$IssuesOpenFragment(IssuesOpenFragment.java:211) 04-23 14:14:36.953 E/ACRA ( 838): at org.mian.gitnex.fragments.-$$Lambda$IssuesOpenFragment$C2_hBl-dKIS-qgZnFLap0Kh4LeQ.run(Unknown Source:16) 04-23 14:14:36.953 E/ACRA ( 838): at android.os.Handler.handleCallback(Handler.java:883) 04-23 14:14:36.953 E/ACRA ( 838): at android.os.Handler.dispatchMessage(Handler.java:100) 04-23 14:14:36.953 E/ACRA ( 838): at android.os.Looper.loop(Looper.java:214) 04-23 14:14:36.953 E/ACRA ( 838): at android.app.ActivityThread.main(ActivityThread.java:7356) 04-23 14:14:36.953 E/ACRA ( 838): at java.lang.reflect.Method.invoke(Native Method) 04-23 14:14:36.953 E/ACRA ( 838): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) 04-23 14:14:36.953 E/ACRA ( 838): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) ``` By the way this issue is fixed in #439
mmarif added this to the 2.5.1 milestone 2 years ago
mmarif added the
Bug
label 2 years ago
mmarif closed this issue 2 years ago
Collaborator

if it is fixed in #439 do we have an easy bugfix we can backport?

if it is fixed in #439 do we have an easy bugfix we can backport?
Poster
Owner

if it is fixed in #439 do we have an easy bugfix we can backport?

Yes, I will send a fix soon.

> if it is fixed in #439 do we have an easy bugfix we can backport? Yes, I will send a fix soon.
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This issue currently doesn't have any dependencies.

Loading…
There is no content yet.