nbossard / packlist

An Android open-source packing-list helper for your next trip.
Apache License 2.0
12 stars 9 forks source link

Crashes and toggling not working #34

Closed DevPika closed 7 years ago

DevPika commented 8 years ago

It's crashing a lot mainly while toggling an item Tick/untick(toggling) doesn't work if I press back key after that(Tried it with different times between toggling and it just doesn't work)

nbossard commented 8 years ago

Ok sorry for that... did you send a crash report by email?

DevPika commented 8 years ago

I did send it once. But later on I stopped thinking that it might be considered spamming if I sent too many crash reports On Jun 2, 2016 11:14 PM, "nbossard" notifications@github.com wrote:

Ok sorry for that... did you send a crash report by email?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

DevPika commented 8 years ago

Sent one right now. Toggling problem very acute. Changing states not working at all now. Let me try using the app on another device and report back.

nbossard commented 8 years ago

Is your email starting with GameS...@gmail.com ?

DevPika commented 8 years ago

Yes, my mail is that.

Further developments(in v0.8.1 after verifying with another device):

  1. State is saved after toggling if the item is clicked anywhere except the checkbox. Directly clicking on the checkbox make it look as if the state has changed but it reverts after anything else is clicked.
  2. If I click on sort when unsorted elements, they get sorted but after that if I click back, the positions are reverted. But after clicking if I do another activity like toggling only then the new positions are saved.
  3. Sometimes elements sort themselves (usually just after clicking sort) and sometimes they don't. Can,t track when exactly.

I'll try v0.9 and see if these problems still persist.

On Fri, Jun 3, 2016 at 12:09 AM, nbossard notifications@github.com wrote:

Is your email starting with GameS...@gmail.com ?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/nbossard/packlist/issues/34#issuecomment-223383248, or mute the thread https://github.com/notifications/unsubscribe/ASygHs67Ru_iAYhjMtHXITki9XdaSir-ks5qHyNxgaJpZM4IsNvy .

nbossard commented 8 years ago

Thanks for testing on two devices and for all these feedbacks. You will see that sorting has been much improved in release v0.9. I also made some fixes on checking, hope it will solve your problem. Keep me informed.

By the way you problem seems similar to issue #29.

nbossard commented 8 years ago

Ok so the problem is not fixed : USER_COMMENT=first crash in v0.9 REPORT_ID=d36ebcc2-a648-454b-97b4-42751a6b8f10 APP_VERSION_CODE=13 APP_VERSION_NAME=0.9

PACKAGE_NAME=com.nbossard.packlist FILE_PATH=/data/data/com.nbossard.packlist/files PHONE_MODEL=MI 4W ANDROID_VERSION=4.4.4 BRAND=Xiaomi PRODUCT=cancro_wc_lte DISPLAY=0.currentSizeRange.smallest=[1080,1020] 0.currentSizeRange.largest=[1920,1860] 0.flags=FLAG_SUPPORTS_PROTECTED_BUFFERS+FLAG_SECURE 0.height=1920 0.metrics.density=3.0 0.metrics.densityDpi=480 0.metrics.scaledDensity=x3.0 0.metrics.widthPixels=1080 0.metrics.heightPixels=1920 0.metrics.xdpi=449.704 0.metrics.ydpi=447.412 0.name=Built-in Screen 0.orientation=0 0.pixelFormat=1 0.realMetrics.density=3.0 0.realMetrics.densityDpi=480 0.realMetrics.scaledDensity=x3.0 0.realMetrics.widthPixels=1080 0.realMetrics.heightPixels=1920 0.realMetrics.xdpi=449.704 0.realMetrics.ydpi=447.412 0.realSize=[1080,1920] 0.rectSize=[0,0,1080,1920] 0.refreshRate=60.0 0.rotation=ROTATION_0 0.size=[1080,1920] 0.width=1080 0.isValid=true

USER_APP_START_DATE=2016-06-03T00:50:05.726+05:30 USER_CRASH_DATE=2016-06-03T01:01:39.947+05:30 STACK_TRACE=java.lang.NullPointerException at android.text.format.DateFormat.getDateFormat(DateFormat.java:230) at com.nbossard.packlist.model.TripFormatter.getFormattedDate(TripFormatter.java:77) at com.nbossard.packlist.databinding.FragmentTripDetailBinding.executeBindings(FragmentTripDetailBinding.java:242) at android.databinding.ViewDataBinding.executePendingBindings(ViewDataBinding.java:355) at com.nbossard.packlist.gui.TripDetailFragment.displayTrip(TripDetailFragment.java:380) at com.nbossard.packlist.gui.TripDetailFragment.displayTrip(TripDetailFragment.java:392) at com.nbossard.packlist.gui.MainActivity.onTripChange(MainActivity.java:244) at com.nbossard.packlist.process.saving.PrefsSavingModule.updateTrip(PrefsSavingModule.java:246) at com.nbossard.packlist.process.saving.PrefsSavingModule.addOrUpdateTrip(PrefsSavingModule.java:135) at com.nbossard.packlist.gui.MainActivity.saveTrip(MainActivity.java:284) at com.nbossard.packlist.gui.TripDetailFragment$1.onItemClick(TripDetailFragment.java:128) at android.widget.AdapterView.performItemClick(AdapterView.java:299) at android.widget.AbsListView.performItemClick(AbsListView.java:1115) at android.widget.AbsListView$PerformClick.run(AbsListView.java:2928) at android.widget.AbsListView$3.run(AbsListView.java:3691) at android.os.Handler.handleCallback(Handler.java:733) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5065) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609) at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:133) at dalvik.system.NativeStart.main(Native Method)

DevPika commented 8 years ago

The crash above is while toggling some item only Improvements (issue based) in v0.9: Toggling now works (and is saved) even when items are clicked on their accompanying checkboxes.

nbossard commented 8 years ago

Elements of explanation : The faulty line :

   dateFormat = android.text.format.DateFormat.getDateFormat(mContext);

and its implementation in Android API 23 :

public static java.text.DateFormat getDateFormat(Context context) { return java.text.DateFormat.getDateInstance(java.text.DateFormat.SHORT); }

and its implementation in Android API V14 :

public static java.text.DateFormat getDateFormat(Context context) { String value = Settings.System.getString(context.getContentResolver(), <==== line 230 Settings.System.DATE_FORMAT);

   return getDateFormatForSetting(context, value);

}

Note that context is used here