App crashes when accessing diff #415

Closed
opened 2020-06-04 04:50:17 +00:00 by opyale · 6 comments
Member

# What do you want to address?

(This step is required; examples are shown below)

  • Bug
  • Feature
  • Suggestion

# Describe your matter briefly

When accessing the diff of #413 the app closes. This is not related to the actual changes made in #413. It happens with the current master branch too.

I had a look at this, but i'm probably not doing well in fixing it. I think this is more likely something for @6543.

What did you expect? (Useful when addressing bugs)

(This step is optional)

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: 1.12.0+dev-142-g9b7737df
  • The version of GitNex you are using: newest
  • The type of certificate you are using (self-signed, signed): signed
  • How you used to log in (via password or token): password
We would appreciate some screenshots or stacktrace's, but this is also not required.

E/AndroidRuntime: FATAL EXCEPTION: main
    Process: org.mian.gitnex, PID: 23363
    java.lang.ArrayIndexOutOfBoundsException: length=1; index=1
        at org.mian.gitnex.activities.FileDiffActivity$1.onResponse(FileDiffActivity.java:112)
        at retrofit2.DefaultCallAdapterFactory$ExecutorCallbackCall$1.lambda$onResponse$0$DefaultCallAdapterFactory$ExecutorCallbackCall$1(DefaultCallAdapterFactory.java:82)
        at retrofit2.-$$Lambda$DefaultCallAdapterFactory$ExecutorCallbackCall$1$3wC8FyV4pyjrzrYL5U0mlYiviZw.run(lambda)
        at android.os.Handler.handleCallback(Handler.java:751)
        at android.os.Handler.dispatchMessage(Handler.java:95)
        at android.os.Looper.loop(Looper.java:154)
        at android.app.ActivityThread.main(ActivityThread.java:6119)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)

Thank you for your time.

## # What do you want to address? (This step is required; examples are shown below) - [x] Bug - [ ] Feature - [ ] Suggestion ## # Describe your matter briefly When accessing the diff of #413 the app closes. This is **not** related to the actual changes made in #413. It happens with the current master branch too. I had a look at this, but i'm probably not doing well in fixing it. I think this is more likely something for @6543. ##### What did you expect? (Useful when addressing bugs) --- _(This step is optional)_ ##### 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: 1.12.0+dev-142-g9b7737df * The version of **GitNex** you are using: newest * The type of certificate you are using (self-signed, signed): signed * How you used to log in (via password or token): password ##### We would appreciate some screenshots or stacktrace's, but this is also not required. --- ``` E/AndroidRuntime: FATAL EXCEPTION: main Process: org.mian.gitnex, PID: 23363 java.lang.ArrayIndexOutOfBoundsException: length=1; index=1 at org.mian.gitnex.activities.FileDiffActivity$1.onResponse(FileDiffActivity.java:112) at retrofit2.DefaultCallAdapterFactory$ExecutorCallbackCall$1.lambda$onResponse$0$DefaultCallAdapterFactory$ExecutorCallbackCall$1(DefaultCallAdapterFactory.java:82) at retrofit2.-$$Lambda$DefaultCallAdapterFactory$ExecutorCallbackCall$1$3wC8FyV4pyjrzrYL5U0mlYiviZw.run(lambda) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6119) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776) ``` #### Thank you for your time.
opyale added the
🐛 Bug
label 2020-06-04 04:50:17 +00:00
Member
https://github.com/go-gitea/gitea/issues/10921 https://github.com/go-gitea/gitea/issues/10933 if they are done we have a nice api to work with
Author
Member

@6543 I still feel like this issue is somehow related to the API.

@6543 I still feel like this issue is somehow related to the API.
Owner

I still feel like this issue is somehow related to the API.

There is no API for this yet. Diffs are rendered directly from the web.

> I still feel like this issue is somehow related to the API. There is no API for this yet. Diffs are rendered directly from the web.
Author
Member

@mmarif I think that there is a parsing error (or an error induced by the API), because it works for all other PRs.

@mmarif I think that there is a parsing error (or an error induced by the API), because it works for all other PRs.
Owner

I think that there is a parsing error

Yes there is parsing error in the adapter. It's because the data is random and checking and parsing each bit is hard.

> I think that there is a parsing error Yes there is parsing error in the adapter. It's because the data is random and checking and parsing each bit is hard.
Author
Member

This can be closed (#537)

This can be closed (#537)
Sign in to join this conversation.
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: gitnex/GitNex#415
No description provided.