flutter_rtmp_publisher
flutter_rtmp_publisher copied to clipboard
App Crash
Heyy ! Hope everyone is doing well ! I'm stuck with something. Actually I have used this plugin in my app and app has fourth different screens.The third screen is the camera preview screen. Now when I'm pressing the back button on the third screen, I have routed to an exit screen(i.e, fourth screen of the app). After pressing back button on the exit screen, App crashes giving the logs : D/ViewRootImpl@a08ca14MainActivity: dispatchDetachedFromWindow D/InputTransport( 4339): Input channel destroyed: fd=85 D/AndroidRuntime( 4339): Shutting down VM E/AndroidRuntime( 4339): FATAL EXCEPTION: main E/AndroidRuntime( 4339): Process: com.example.flutterapp, PID: 4339 E/AndroidRuntime( 4339): java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object android.content.Context.getSystemService(java.lang.String)' on a null object reference E/AndroidRuntime( 4339): at com.takusemba.rtmppublisher.RtmpPublisher.getDeviceRotation(RtmpPublisher.java:166) E/AndroidRuntime( 4339): at com.takusemba.rtmppublisher.RtmpPublisher.checkOrientation(RtmpPublisher.java:155) E/AndroidRuntime( 4339): at com.takusemba.rtmppublisher.RtmpPublisher.access$000(RtmpPublisher.java:16) E/AndroidRuntime( 4339): at com.takusemba.rtmppublisher.RtmpPublisher$1.run(RtmpPublisher.java:65) E/AndroidRuntime( 4339): at android.os.Handler.handleCallback(Handler.java:873) E/AndroidRuntime( 4339): at android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime( 4339): at android.os.Looper.loop(Looper.java:214) E/AndroidRuntime( 4339): at android.app.ActivityThread.main(ActivityThread.java:7076) E/AndroidRuntime( 4339): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime( 4339): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) E/AndroidRuntime( 4339): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965) I/Process ( 4339): Sending signal. PID: 4339 SIG: 9 Lost connection to device.
I'm stuck in this for a week but couldn't resolve this. @espresso3389 Please look into this Hoping anyone might help. Thanks in advance !