Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when opening very quickly the search window after NewPipe launch #6231

Closed
3 tasks done
Massedil opened this issue May 3, 2021 · 8 comments
Closed
3 tasks done

Comments

@Massedil
Copy link
Contributor

Massedil commented May 3, 2021

Checklist

Steps to reproduce the bug

Open NewPipe and very quickly click on the search icon as soon as it appears

Actual behaviour

NewPipe crashes.

Expected behavior

No crash and possibility to search !

Screenshots/Screen recordings

Logs

Exception

  • User Action: ui error
  • Request: ACRA report
  • Content Country: FR
  • Content Language: fr
  • App Language: fr_FR
  • Service: none
  • Version: 0.21.2
  • OS: Linux Android 10 - 29
Crash log

java.lang.NullPointerException: Attempt to invoke virtual method 'android.widget.RelativeLayout org.schabi.newpipe.databinding.PlaylistHeaderBinding.getRoot()' on a null object reference
at org.schabi.newpipe.fragments.list.playlist.PlaylistFragment.handleResult(PlaylistFragment.java:277)
at org.schabi.newpipe.fragments.list.playlist.PlaylistFragment.handleResult(PlaylistFragment.java:65)
at org.schabi.newpipe.fragments.list.BaseListInfoFragment.lambda$startLoading$0(BaseListInfoFragment.java:146)
at org.schabi.newpipe.fragments.list.BaseListInfoFragment.lambda$startLoading$0$BaseListInfoFragment(Unknown Source:0)
at org.schabi.newpipe.fragments.list.-$$Lambda$BaseListInfoFragment$Gn1fP3-8OJnktT5gkmUmbW-egTg.accept(Unknown Source:4)
at io.reactivex.rxjava3.internal.observers.ConsumerSingleObserver.onSuccess(ConsumerSingleObserver.java:62)
at io.reactivex.rxjava3.internal.operators.single.SingleObserveOn$ObserveOnSingleObserver.run(SingleObserveOn.java:81)
at io.reactivex.rxjava3.android.schedulers.HandlerScheduler$ScheduledRunnable.run(HandlerScheduler.java:123)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7356)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:491)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:940)


Device info

  • Android version/Custom ROM version: Android 10 / LineageOS 17.1
  • Device model: Samsung Galaxy S5
@Massedil Massedil added the bug Issue is related to a bug label May 3, 2021
@sauravrao637
Copy link
Contributor

sauravrao637 commented May 6, 2021

Hi! @Massedil
Thanks for reporting the issue :) till we fix the issue please slow down your reflexes ;)

Now to the developers

The reason behind this bug is obvious that the headerBinding is still inflating (idts) or never been called to inflate yet and thus is null.
I don't think just doing null check here is enough because the ui work must be done after headerBinding is inflated , so what we can do is check if it's null we call getHeaderBinding and then proceed forward with ui work but I doubt if this is the best approach.
So I would like to know if this is a good approach and I proceed further or there is a better one?

@mhmdanas
First of all sorry for pinging you
I want to know where can I ask such questions and whom to ping?

@triallax
Copy link
Contributor

triallax commented May 8, 2021

@sauravrao637 sorry, I'm not very familiar with NewPipe's code (or Android development in general). You'd probably be better served by asking in the IRC channel (see https://github.com/TeamNewPipe/NewPipe/blob/dev/.github/CONTRIBUTING.md#communication).

@vhouriet
Copy link
Contributor

Hey, maybe I'm too slow, but I can't reproduce this behaviour. Is it still a problem ?

@opusforlife2 opusforlife2 added the waiting for author If the author doesn't respond, the issue will be auto-closed. Otherwise the label will be removed. label Dec 25, 2021
@Massedil
Copy link
Contributor Author

I can't reproduce too. I seems to be corrected ! Thanks !

@github-actions github-actions bot removed the waiting for author If the author doesn't respond, the issue will be auto-closed. Otherwise the label will be removed. label Dec 26, 2021
@Massedil
Copy link
Contributor Author

In fact, it still crashes in the latest version.

Exception

  • User Action: get suggestions
  • Request:
  • Content Country: FR
  • Content Language: fr
  • App Language: fr_FR
  • Service: YouTube
  • Version: 0.21.15
  • OS: Linux Android 11 - 30
Crash log

java.lang.NullPointerException: Attempt to read from field 'androidx.recyclerview.widget.RecyclerView org.schabi.newpipe.databinding.FragmentSearchBinding.suggestionsList' on a null object reference
	at org.schabi.newpipe.fragments.list.search.SearchFragment.handleSuggestions(SearchFragment.java:973)
	at org.schabi.newpipe.fragments.list.search.SearchFragment.lambda$initSuggestionObserver$13(SearchFragment.java:814)
	at org.schabi.newpipe.fragments.list.search.SearchFragment.$r8$lambda$0KRipyJJS1-v4wlqLTlO9OsWksw(Unknown Source:0)
	at org.schabi.newpipe.fragments.list.search.SearchFragment$$ExternalSyntheticLambda11.accept(Unknown Source:4)
	at io.reactivex.rxjava3.internal.observers.LambdaObserver.onNext(LambdaObserver.java:63)
	at io.reactivex.rxjava3.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.drainNormal(ObservableObserveOn.java:201)
	at io.reactivex.rxjava3.internal.operators.observable.ObservableObserveOn$ObserveOnObserver.run(ObservableObserveOn.java:255)
	at io.reactivex.rxjava3.android.schedulers.HandlerScheduler$ScheduledRunnable.run(HandlerScheduler.java:123)
	at android.os.Handler.handleCallback(Handler.java:938)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:223)
	at android.app.ActivityThread.main(ActivityThread.java:7664)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)


@Massedil Massedil reopened this Dec 28, 2021
@litetex litetex mentioned this issue Feb 7, 2022
4 tasks
This was referenced Feb 15, 2022
@Massedil
Copy link
Contributor Author

Massedil commented Jan 4, 2023

Something related to this issue that can help.

On my SM-G900F, Android 11, LineageOS 18.1 :

  • With Parameters > Accessibility > Disable animations = On, the crash occurs.
  • With Parameters > Accessibility > Disable animations = Off, the crash does not occurs.

To reproduce the crash : "Open NewPipe and very quickly click on the search icon as soon as it appears".

This was referenced Apr 24, 2023
@ShareASmile
Copy link
Collaborator

Hello, does this issue still occur on curretly latest v0.27.2?

@Massedil
Copy link
Contributor Author

Hello, does this issue still occur on curretly latest v0.27.2?

I tried on 2 devices and can't reproduce with latest version.

@ShareASmile ShareASmile removed the bug Issue is related to a bug label Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants