G2L crash when add empty gesture.
reproduce:
- open the app.
- click "plus" button in the right-bottom corner.
- click "SELECT ACTION" button.
- choose any Action then come back.
- choose "Confirm Before Launch" and then click "SAVE" Button then app crash.
My device is redNote, level 21. I believe this crash isn't related to devices and levels. the message below is the bug info.
D/Gestures: Could not load the gesture library from /storage/emulated/0/.g2l/gestures java.io.EOFException at libcore.io.Streams.readFully(Streams.java:83) at java.io.DataInputStream.readShort(DataInputStream.java:152) at android.gesture.GestureStore.load(GestureStore.java:290) at android.gesture.GestureLibraries$FileGestureLibrary.load(GestureLibraries.java:95) at com.easwareapps.g2l.AddGestureActivity.initGesture(AddGestureActivity.java:163) at com.easwareapps.g2l.AddGestureActivity.saveGestureDetails(AddGestureActivity.java:196) at com.easwareapps.g2l.AddGestureActivity.onClick(AddGestureActivity.java:174) at android.view.View.performClick(View.java:4819) at android.view.View$PerformClick.run(View.java:20152) at android.os.Handler.handleCallback(Handler.java:815) at android.os.Handler.dispatchMessage(Handler.java:104) at android.os.Looper.loop(Looper.java:194) at android.app.ActivityThread.main(ActivityThread.java:5562) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:968) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:763) E/Save img: Attempt to invoke virtual method 'android.graphics.Bitmap android.gesture.Gesture.toBitmap(int, int, int, int)' on a null object reference D/AndroidRuntime: Shutting down VM E/ACRA: ACRA caught a NullPointerException for com.easwareapps.g2l java.lang.NullPointerException: Attempt to invoke virtual method 'java.util.ArrayList android.gesture.Gesture.getStrokes()' on a null object reference at android.gesture.Instance.temporalSampler(Instance.java:91) at android.gesture.Instance.createInstance(Instance.java:76) at android.gesture.GestureStore.addGesture(GestureStore.java:158) at android.gesture.GestureLibrary.addGesture(GestureLibrary.java:68) at com.easwareapps.g2l.AddGestureActivity.saveGesture(AddGestureActivity.java:222) at com.easwareapps.g2l.AddGestureActivity.saveGestureDetails(AddGestureActivity.java:198) at com.easwareapps.g2l.AddGestureActivity.onClick(AddGestureActivity.java:174) at android.view.View.performClick(View.java:4819) at android.view.View$PerformClick.run(View.java:20152) at android.os.Handler.handleCallback(Handler.java:815) at android.os.Handler.dispatchMessage(Handler.java:104) at android.os.Looper.loop(Looper.java:194) at android.app.ActivityThread.main(ActivityThread.java:5562) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:968) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:763) I/Timeline: Timeline: Activity_launch_request time:191721541