paulmandal / atak-forwarder

Forwards packets to/from ATAK over an off-grid communication layer
MIT License
399 stars 42 forks source link

Crash #115

Closed Ellingsoc closed 2 years ago

Ellingsoc commented 2 years ago

Running atak 4.5.1.4 with the latest forwarder and atak instantly crashes when you click on Atak forwarder preferences. Running a pixel 5 with android 12

paulmandal commented 2 years ago

Can you provide a stack trace for the crash? I can't reproduce it on a Pixel 4 XL running Android 12

Ellingsoc commented 2 years ago

I have no idea how to pull one of create one. Is there a guide on how to do so? I'd be happy to try to get it for you.

On Sat, Feb 12, 2022, 9:34 AM paulmandal @.***> wrote:

Can you provide a stack trace for the crash? I can't reproduce it on a Pixel 4 XL running Android 12

— Reply to this email directly, view it on GitHub https://github.com/paulmandal/atak-forwarder/issues/115#issuecomment-1037259551, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXXIY4R6MVOLD7U3Z4QOPXTU2Z4YFANCNFSM5OGAPFMA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

paulmandal commented 2 years ago

The easiest way is to install Android Studio: https://developer.android.com/studio Then enable Developer Mode on your device: https://developer.android.com/studio/debug/dev-options

Connect your phone to your computer and click Yes or OK when it asks whether to allow USB Debugging, then in Android Studio in the Logcat tab (at the bottom of the screen) there is a dropdown for log level (it will say Verbose as the default) click Error and then open ATAK and reproduce the crash. You should see a message like

java.lang.Exception: Stack trace
at java.base/java.lang.Thread.dumpStack(Thread.java:1383)
at com.ericgoebelbecker.stacktraces.StackTrace.d(StackTrace.java:23)
at com.ericgoebelbecker.stacktraces.StackTrace.c(StackTrace.java:19)
at com.ericgoebelbecker.stacktraces.StackTrace.b(StackTrace.java:15)
at com.ericgoebelbecker.stacktraces.StackTrace.a(StackTrace.java:11)
at com.ericgoebelbecker.stacktraces.StackTrace.main(StackTrace.java:7)

That is the stack trace for the crash and will tell me where the crash originated.

Ellingsoc commented 2 years ago

Heres what I found. Let me know if theres more you need.

2022-02-12 13:02:11.737 14312-14312/? E/ACRA: ACRA caught a NullPointerException for com.atakmap.app.civ java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.startsWith(java.lang.String)' on a null object reference at atakplugin.PluginTemplate.t5.a(SourceFile:5) at atakplugin.PluginTemplate.u5.(SourceFile:3) at atakplugin.PluginTemplate.Y4.onCreate(SourceFile:5) at android.app.Fragment.performCreate(Fragment.java:2486) at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1261) at android.app.FragmentManagerImpl.addAddedFragments(FragmentManager.java:2431) at android.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2210) at android.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2166) at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2067) at android.app.FragmentManagerImpl$1.run(FragmentManager.java:742) at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:201) at android.os.Looper.loop(Looper.java:288) at android.app.ActivityThread.main(ActivityThread.java:7839) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)

On Sat, Feb 12, 2022 at 12:26 PM paulmandal @.***> wrote:

The easiest way is to install Android Studio: https://developer.android.com/studio Then enable Developer Mode on your device: https://developer.android.com/studio/debug/dev-options

Connect your phone to your computer and click Yes or OK when it asks whether to allow USB Debugging, then in Android Studio in the Logcat tab (at the bottom of the screen) there is a dropdown for log level (it will say Verbose as the default) click Error and then open ATAK and reproduce the crash. You should see a message like

java.lang.Exception: Stack trace at java.base/java.lang.Thread.dumpStack(Thread.java:1383) at com.ericgoebelbecker.stacktraces.StackTrace.d(StackTrace.java:23) at com.ericgoebelbecker.stacktraces.StackTrace.c(StackTrace.java:19) at com.ericgoebelbecker.stacktraces.StackTrace.b(StackTrace.java:15) at com.ericgoebelbecker.stacktraces.StackTrace.a(StackTrace.java:11) at com.ericgoebelbecker.stacktraces.StackTrace.main(StackTrace.java:7)```

That is the stack trace for the crash and will tell me where the crash originated.

— Reply to this email directly, view it on GitHub https://github.com/paulmandal/atak-forwarder/issues/115#issuecomment-1037372940, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXXIY4WCZBXQ63OWBJ5QSZDU22Q6RANCNFSM5OGAPFMA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

Ellingsoc commented 2 years ago

Heres more of the read out. I dont see anything that says stack trace.

2022-02-12 13:52:23.332 1670-1670/? E/AndroidRuntime: FATAL EXCEPTION: main Process: com.atakmap.app.civ, PID: 1670 java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.startsWith(java.lang.String)' on a null object reference at atakplugin.PluginTemplate.t5.a(SourceFile:5) at atakplugin.PluginTemplate.u5.(SourceFile:3) at atakplugin.PluginTemplate.Y4.onCreate(SourceFile:5) at android.app.Fragment.performCreate(Fragment.java:2486) at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1261) at android.app.FragmentManagerImpl.addAddedFragments(FragmentManager.java:2431) at android.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2210) at android.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2166) at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2067) at android.app.FragmentManagerImpl$1.run(FragmentManager.java:742) at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:201) at android.os.Looper.loop(Looper.java:288) at android.app.ActivityThread.main(ActivityThread.java:7839) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003) 2022-02-12 13:52:23.428 1670-1693/? E/SharedPreferencesImpl: Couldn't create directory for SharedPreferences file /data/user/0/com.paulmandal.atak.forwarder/shared_prefs/com.paulmandal.atak.forwarder_preferences.xml 2022-02-12 13:52:23.970 954-960/? E/statsd: DurationMetric 2271129699865384196 dropping data for what dimension key (10)0x2010101->10190[I] (10)0x30000->CastSocketMultiplexer_WakeLock[S] 2022-02-12 13:52:23.970 954-960/? E/statsd: DurationMetric 1897601926725174045 dropping data for what dimension key (10)0x2010101->10190[I] (10)0x30000->CastSocketMultiplexer_WakeLock[S] 2022-02-12 13:52:24.191 954-960/? E/statsd: DurationMetric 2271129699865384196 dropping data for what dimension key (10)0x2010101->10190[I] (10)0x30000->CastSocketMultiplexer_WakeLock[S] 2022-02-12 13:52:24.191 954-960/? E/statsd: DurationMetric 1897601926725174045 dropping data for what dimension key (10)0x2010101->10190[I] (10)0x30000->CastSocketMultiplexer_WakeLock[S] 2022-02-12 13:52:24.192 954-960/? E/statsd: DurationMetric 2271129699865384196 dropping data for what dimension key (10)0x2010101->10190[I] (10)0x30000->CastDeviceController-com.google.android.gms[S] 2022-02-12 13:52:24.192 954-960/? E/statsd: DurationMetric 1897601926725174045 dropping data for what dimension key (10)0x2010101->10190[I] (10)0x30000->CastDeviceController-com.google.android.gms[S] 2022-02-12 13:52:26.663 1670-1670/? E/ACRA: ACRA caught a NullPointerException for com.atakmap.app.civ java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.startsWith(java.lang.String)' on a null object reference at atakplugin.PluginTemplate.t5.a(SourceFile:5) at atakplugin.PluginTemplate.u5.(SourceFile:3) at atakplugin.PluginTemplate.Y4.onCreate(SourceFile:5) at android.app.Fragment.performCreate(Fragment.java:2486) at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1261) at android.app.FragmentManagerImpl.addAddedFragments(FragmentManager.java:2431) at android.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2210) at android.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2166) at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2067) at android.app.FragmentManagerImpl$1.run(FragmentManager.java:742) at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:201) at android.os.Looper.loop(Looper.java:288) at android.app.ActivityThread.main(ActivityThread.java:7839) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003) 2022-02-12 13:52:26.705 567-567/? E/SELinux: avc: denied { find } for pid=2205 uid=10386 name=meminfo scontext=u:r:untrusted_app:s0:c130,c257,c512,c768 tcontext=u:object_r:meminfo_service:s0 tclass=service_manager permissive=0 2022-02-12 13:52:26.713 1670-1670/? E/ACRA: Not adding buildConfig to log. Class Not found : com.atakmap.app.BuildConfig. Please configure 'buildConfigClass' in your ACRA config 2022-02-12 13:52:26.823 1670-2228/? E/ACRA: Unknown json subtree type, see issue #186 2022-02-12 13:52:27.040 1727-3178/? E/WifiMulticastLockManager: Multicaster binderDied 2022-02-12 13:52:27.065 621-621/? E/BpTransactionCompletedListener: Failed to transact (-32) 2022-02-12 13:52:27.066 978-1884/? E/LocSvc_ApiV02: reportLocEvent:3908] Loc event report: 0 KlobucharIonoMode_valid:0: leapSec_valid:1: tauC_valid:1 featureStatusReport_valid: 0 featureStatusReport: 0 2022-02-12 13:52:27.109 2344-3129/? E/bt_stack: [ERROR:bta_gattc_utils.cc(441)] bta_gattc_mark_bg_conn unable to find the bg connection mask for bd_addr=30:c6:f7:1e:8c:c2

On Sat, Feb 12, 2022 at 1:03 PM Ryan Ellingson @.***> wrote:

Heres what I found. Let me know if theres more you need.

2022-02-12 13:02:11.737 14312-14312/? E/ACRA: ACRA caught a NullPointerException for com.atakmap.app.civ java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.startsWith(java.lang.String)' on a null object reference at atakplugin.PluginTemplate.t5.a(SourceFile:5) at atakplugin.PluginTemplate.u5.(SourceFile:3) at atakplugin.PluginTemplate.Y4.onCreate(SourceFile:5) at android.app.Fragment.performCreate(Fragment.java:2486) at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1261) at android.app.FragmentManagerImpl.addAddedFragments(FragmentManager.java:2431) at android.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2210) at android.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2166) at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2067) at android.app.FragmentManagerImpl$1.run(FragmentManager.java:742) at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:201) at android.os.Looper.loop(Looper.java:288) at android.app.ActivityThread.main(ActivityThread.java:7839) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)

On Sat, Feb 12, 2022 at 12:26 PM paulmandal @.***> wrote:

The easiest way is to install Android Studio: https://developer.android.com/studio Then enable Developer Mode on your device: https://developer.android.com/studio/debug/dev-options

Connect your phone to your computer and click Yes or OK when it asks whether to allow USB Debugging, then in Android Studio in the Logcat tab (at the bottom of the screen) there is a dropdown for log level (it will say Verbose as the default) click Error and then open ATAK and reproduce the crash. You should see a message like

java.lang.Exception: Stack trace at java.base/java.lang.Thread.dumpStack(Thread.java:1383) at com.ericgoebelbecker.stacktraces.StackTrace.d(StackTrace.java:23) at com.ericgoebelbecker.stacktraces.StackTrace.c(StackTrace.java:19) at com.ericgoebelbecker.stacktraces.StackTrace.b(StackTrace.java:15) at com.ericgoebelbecker.stacktraces.StackTrace.a(StackTrace.java:11) at com.ericgoebelbecker.stacktraces.StackTrace.main(StackTrace.java:7)```

That is the stack trace for the crash and will tell me where the crash originated.

— Reply to this email directly, view it on GitHub https://github.com/paulmandal/atak-forwarder/issues/115#issuecomment-1037372940, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXXIY4WCZBXQ63OWBJ5QSZDU22Q6RANCNFSM5OGAPFMA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

paulmandal commented 2 years ago

Okay this is good -- this is the stack trace I was looking for. Sadly the TPC signing pipeline doesn't seem to give me the mapping.txt I'd need to symbolicate this stack trace, but I can still use it as a clue. I'm getting a build signed now that may fix this bug.

paulmandal commented 2 years ago

Try this out: https://drive.google.com/file/d/1p14b5oAqXSAemUmBWCqhFRgZdxs9Sknt/view?usp=sharing please let me know if it fixes this issue. For reference: https://github.com/paulmandal/atak-forwarder/pull/116

Ellingsoc commented 2 years ago

Happy to report that its working great man. Awesome job man!

On Sun, Feb 13, 2022 at 1:16 AM paulmandal @.***> wrote:

Try this out: https://drive.google.com/file/d/1p14b5oAqXSAemUmBWCqhFRgZdxs9Sknt/view?usp=sharing please let me know if it fixes this issue. For reference: #116 https://github.com/paulmandal/atak-forwarder/pull/116

— Reply to this email directly, view it on GitHub https://github.com/paulmandal/atak-forwarder/issues/115#issuecomment-1037877620, or unsubscribe https://github.com/notifications/unsubscribe-auth/AXXIY4VF42IWXFWBDBLJKMTU25LGNANCNFSM5OGAPFMA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

paulmandal commented 2 years ago

Great to hear! Thank you for reporting the issue and for giving me the stack trace I needed to get it fixed.