gitskarios / Gitskarios

GitHub Android application
MIT License
527 stars 73 forks source link

App crash, force restart when libked to comment in code #609

Closed rancidfrog closed 7 years ago

rancidfrog commented 7 years ago

On events tab, clicked on a link to a comment on a commit - crashes app, force restart:

<br />java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String core.User.getLogin()' on a null object reference<br /> at core.repositories.Repo.toInfo(Repo.java:333)<br /> at com.alorma.github.ui.fragment.events.EventsListFragment.onItemSelected(EventsListFragment.java:380)<br /> at com.alorma.github.ui.fragment.events.EventsListFragment.onItemSelected(EventsListFragment.java:60)<br /> at com.alorma.github.ui.adapter.events.holders.EventViewHolder.lambda$populate$0(EventViewHolder.java:39)<br /> at com.alorma.github.ui.adapter.events.holders.EventViewHolder.access$lambda$0(EventViewHolder.java)<br /> at com.alorma.github.ui.adapter.events.holders.EventViewHolder$$Lambda$1.onClick(Unknown Source)<br /> at android.view.View.performClick(View.java:5609)<br /> at android.view.View$PerformClick.run(View.java:22262)<br /> at android.os.Handler.handleCallback(Handler.java:751)<br /> at android.os.Handler.dispatchMessage(Handler.java:95)<br /> at android.os.Looper.loop(Looper.java:154)<br /> at android.app.ActivityThread.main(ActivityThread.java:6077)<br /> at java.lang.reflect.Method.invoke(Native Method)<br /> at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)<br /> at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)<br />

rancidfrog commented 7 years ago

When there is an event of comment in code, app crashes or has error can not access

alorma commented 7 years ago

Can you provide the comment event url? Thanks

rancidfrog commented 7 years ago

For example, in the following PR there is comment in code which causes app popup:

For the other link, which causes restart app popup, it cannot be copied. I tried long-clicking event in app but nothing happens. Events do not appear in web

alorma commented 7 years ago

Ok, it's enough, thanks

rancidfrog commented 7 years ago

Is it possible to have longclick event to copy link, such that you can open in browser or report broken links?

alorma commented 7 years ago

yes, i will implement that

rancidfrog commented 7 years ago

The other event I believe links to this, https://github.com/oshmoun/kernel/commit/67aac2ff05 Causing app to restart:

rancidfrog commented 7 years ago

It works now when I click the link above, but it does not show comment and if you open it in web browser you will see a comment, which causes app to crash when linking to it via events

alorma commented 7 years ago

Hi @rancidfrog .

Checking that PR, i see it shows unknown repository on head branch.

What does it means? Is the head repository private?