Skip to content
New issue

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

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

Already on GitHub? # to your account

NPE crash in BaseTextAndGraphicsManager.java line 206 #1842

Closed
spstreckfus opened this issue Apr 25, 2023 · 3 comments
Closed

NPE crash in BaseTextAndGraphicsManager.java line 206 #1842

spstreckfus opened this issue Apr 25, 2023 · 3 comments
Labels
bug A defect in the library

Comments

@spstreckfus
Copy link

Bug Summary

We're seeing the following crash affecting a few hundred users in Crashlytics, but have been unable to reproduce it as of yet. Seems to be a new issue after upgrading to SDL 5.6.0. The crash is coming from line 206 in BaseTextAndGraphicsManager.java where transactionQueue.add(updateOperation, false); is called. Somehow the value of transactionQueue is null when this line is reached.

Reproduction Steps

No reproduction steps yet. This crash came from Crashlytics logs and was observed after we updated to SDL 5.6.0.

Which projects have you seen this bug on?

Android

Android Version(s)

Android 7.0-Android 13.0

Android Device(s)

Multiple Samsung, Motorola, LG, OnePlus, and Nokia phones

sdl_java_suite Version

5.6.0

Testing Environment(s)

N/A

Relevant log output

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.livio.taskmaster.a.e(com.livio.taskmaster.b, boolean)' on a null object reference
       at com.smartdevicelink.managers.screen.BaseTextAndGraphicManager.sdlUpdate(BaseTextAndGraphicManager.java:206)
       at com.smartdevicelink.managers.screen.BaseTextAndGraphicManager.setPrimaryGraphic(BaseTextAndGraphicManager.java:452)
       at com.smartdevicelink.managers.screen.BaseScreenManager.setPrimaryGraphic(BaseScreenManager.java:306)
       at com.smartdevicelink.managers.screen.ScreenManager.setPrimaryGraphic(ScreenManager.java:46)
       at com.clearchannel.iheartradio.remote.sdl.core.adapter.PlayerAdapter.updateAlbumArtIfChanged$lambda-1(PlayerAdapter.kt:97)
       at io.reactivex.internal.observers.ConsumerSingleObserver.onSuccess(ConsumerSingleObserver.java:62)
       at io.reactivex.internal.operators.single.SingleObserveOn$ObserveOnSingleObserver.run(SingleObserveOn.java:81)
       at io.reactivex.android.schedulers.HandlerScheduler$ScheduledRunnable.run(HandlerScheduler.java:124)
       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:7529)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935)
@spstreckfus spstreckfus added the bug A defect in the library label Apr 25, 2023
@mrapitis
Copy link
Contributor

@jordynmackool would it be possible to prioritize this ticket in a future bug fix release?

@jordynmackool
Copy link
Contributor

We are working on it now.

joeygrover pushed a commit that referenced this issue Jun 20, 2023
* Add null check to prevent NPE in BaseVoiceCommandManager

* Add null check to prevent NPE in BaseMenuManager

* Add null check to prevent NPE in BaseChoiceSetManager

* Add null check to prevent NPE in BaseTextAndGraphicManager

* Add null check to prevent NPE in BaseSoftButtonManager

* Add null checks to prevent NPE in BaseAlertManager

* Add null check to prevent NPE in AudioStreamManager

* Add null check to prevent NPE in BaseFileManager

* Complete the listener for when we cannot add an operation to the queue in AlertManager

* Add callback for when we cannot add operation to Queue in AudioStreamManager

* Complete listener if queue is null in BaseChoiceSetManager

* add missing return

* update ChoiceSetManagerTest
@joeygrover
Copy link
Member

Closed with #1847

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug A defect in the library
Projects
None yet
Development

No branches or pull requests

4 participants