openfoodfacts / openfoodfacts-androidapp

(Legacy) Native version of Open Food Facts on Android - Coders & Decoders welcome 🤳🥫
https://android.openfoodfacts.org
Apache License 2.0
767 stars 447 forks source link

npe after going back to scan from SummaryFragment #3748

Closed mrudultora closed 3 years ago

mrudultora commented 3 years ago

Describe the bug Getting npe after going back to scan from SummaryFragment.

Stacktrace 2021-01-16 18:31:30.452 21019-21019/openfoodfacts.github.scrachx.openfood.debug E/AndroidRuntime: FATAL EXCEPTION: main Process: openfoodfacts.github.scrachx.openfood.debug, PID: 21019 java.lang.NullPointerException at openfoodfacts.github.scrachx.openfood.features.product.view.summary.SummaryProductFragment.getBinding(SummaryProductFragment.kt:80) at openfoodfacts.github.scrachx.openfood.features.product.view.summary.SummaryProductFragment.resetScroll(SummaryProductFragment.kt:832) at openfoodfacts.github.scrachx.openfood.features.product.view.ProductViewFragment.bottomSheetWillGrow(ProductViewFragment.kt:109) at openfoodfacts.github.scrachx.openfood.features.scan.ContinuousScanActivity$QuickViewCallback.onSlide(ContinuousScanActivity.kt:737) at com.google.android.material.bottomsheet.BottomSheetBehavior.dispatchOnSlide(BottomSheetBehavior.java:1498) at com.google.android.material.bottomsheet.BottomSheetBehavior$4.onViewPositionChanged(BottomSheetBehavior.java:1365) at androidx.customview.widget.ViewDragHelper.continueSettling(ViewDragHelper.java:786) at com.google.android.material.bottomsheet.BottomSheetBehavior$SettleRunnable.run(BottomSheetBehavior.java:1537) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1031) at android.view.Choreographer.doCallbacks(Choreographer.java:854) at android.view.Choreographer.doFrame(Choreographer.java:785) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1016) at android.os.Handler.handleCallback(Handler.java:883) at android.os.Handler.dispatchMessage(Handler.java:100) at android.os.Looper.loop(Looper.java:224) at android.app.ActivityThread.main(ActivityThread.java:7590) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)

Smartphone (please complete the following information):

kartikaysharma01 commented 3 years ago

@mrudultora Can you please add steps to reproduce ?

VaiTon commented 3 years ago

@mrudultora could you please provide more info? I am unable to reproduce.

mrudultora commented 3 years ago

Unable to reproduce now. Also, as far as I remember this was for a particular product.