caarmen / network-monitor

A network monitor tool for Android that executes an http GET to google.com every x seconds and logs the results into a file.
74 stars 27 forks source link

The app crashes and exits by itself while accessing the "Frequency Log" feature when changing the rotation to landscape mode and back to portrait mode. #113

Open ahyar92 opened 6 years ago

ahyar92 commented 6 years ago

Expected behavior

Supposedly, when accessing the "Frequency Log" feature and when changing the screen rotation 2 times, the app will not experience errors.

Actual behavior

When I click on the "Frequency Log" feature and after being on the Log frequency setting page, I accidentally changed the rotation to landscape mode, and when returned to portrait mode again, the app crashes and exits by itself. I have done the repetition, but the error persists.

How to reproduce

  1. Install and Open apps
  2. Next click the feature "Log Frequency"
  3. If the log frequency settings page is open, change the rotation to landscape mode, and then return the rotation to the portrait mode. Then you will find the error as I experienced.

Recording Of The Bug

https://www.youtube.com/watch?v=aHuDCDFAymE

Logcat

05-20 22:38:49.874  5898  5898 E AndroidRuntime: FATAL EXCEPTION: main
05-20 22:38:49.874  5898  5898 E AndroidRuntime: Process: ca.rmen.android.networkmonitor, PID: 5898
05-20 22:38:49.874  5898  5898 E AndroidRuntime: java.lang.IllegalStateException: Failure saving state: ListPreferenceDialogFragmentCompat{d05e308 #1 android.support.v7.preference.PreferenceFragment.DIALOG} has target not in fragment manager: NetMonPreferenceFragmentCompat{6de4aa1}
05-20 22:38:49.874  5898  5898 E AndroidRuntime:    at android.support.v4.app.FragmentManagerImpl.saveAllState(FragmentManager.java:2937)
05-20 22:38:49.874  5898  5898 E AndroidRuntime:    at android.support.v4.app.FragmentActivity.onSaveInstanceState(FragmentActivity.java:18125)
05-20 22:38:49.874  5898  5898 E AndroidRuntime:    at android.support.v7.app.AppCompatActivity.onSaveInstanceState(AppCompatActivity.java:509)
05-20 22:38:49.874  5898  5898 E AndroidRuntime:    at android.app.Activity.performSaveInstanceState(Activity.java:1313)
05-20 22:38:49.874  5898  5898 E AndroidRuntime:    at android.app.Instrumentation.callActivityOnSaveInstanceState(Instrumentation.java:1290)
05-20 22:38:49.874  5898  5898 E AndroidRuntime:    at android.app.ActivityThread.callCallActivityOnSaveInstanceState(ActivityThread.java:4131)
05-20 22:38:49.874  5898  5898 E AndroidRuntime:    at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4093)
05-20 22:38:49.874  5898  5898 E AndroidRuntime:    at android.app.ActivityThread.access$1100(ActivityThread.java:153)
05-20 22:38:49.874  5898  5898 E AndroidRuntime:    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1381)
05-20 22:38:49.874  5898  5898 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:102)
05-20 22:38:49.874  5898  5898 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:154)
05-20 22:38:49.874  5898  5898 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:5527)
05-20 22:38:49.874  5898  5898 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)
05-20 22:38:49.874  5898  5898 E AndroidRuntime:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739)
05-20 22:38:49.874  5898  5898 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629)
05-20 22:38:49.878  5898  5898 E MQSEventManagerDelegate: failed to get MQSService.