Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashes portrait to landscape #17

Open
Brucepbd opened this issue Feb 11, 2018 · 4 comments
Open

Crashes portrait to landscape #17

Brucepbd opened this issue Feb 11, 2018 · 4 comments

Comments

@Brucepbd
Copy link

Works great overall. When a text file is not open it switches from portrait to landscape just fine. But when a text file is open for editing in portrait, when changing from portrait to landscape by turning the orientation of the phone it crashes. The same crash happens when in landscape and switching to Portrait while editing text.

I'm using a Nexus 6 with Android 7.0.

For now, whenever I'm editing text I lock the screen orientation in either portrait or landscape mode and everything is fine. But it would be useful if I didn't have to do that.

@Brucepbd
Copy link
Author

I'm using the latest Snotepad 1.2.1 and thank you for developing the app! :)

@gjedeer
Copy link

gjedeer commented Jun 3, 2018

06-03 15:45:19.186 24070 24070 D AndroidRuntime: Shutting down VM
06-03 15:45:19.188 24070 24070 E AndroidRuntime: FATAL EXCEPTION: main
06-03 15:45:19.188 24070 24070 E AndroidRuntime: Process: info.aario.snotepad, PID: 24070
06-03 15:45:19.188 24070 24070 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{info.aario.snotepad/info.aario.snotepad.MainActivity}: java.lang.NullPointerException
06-03 15:45:19.188 24070 24070 E AndroidRuntime:        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2665)
06-03 15:45:19.188 24070 24070 E AndroidRuntime:        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726)
06-03 15:45:19.188 24070 24070 E AndroidRuntime:        at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:4519)
06-03 15:45:19.188 24070 24070 E AndroidRuntime:        at android.app.ActivityThread.-wrap19(ActivityThread.java)
06-03 15:45:19.188 24070 24070 E AndroidRuntime:        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1483)
06-03 15:45:19.188 24070 24070 E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:102)
06-03 15:45:19.188 24070 24070 E AndroidRuntime:        at android.os.Looper.loop(Looper.java:154)
06-03 15:45:19.188 24070 24070 E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:6126)
06-03 15:45:19.188 24070 24070 E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
06-03 15:45:19.188 24070 24070 E AndroidRuntime:        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
06-03 15:45:19.188 24070 24070 E AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
06-03 15:45:19.188 24070 24070 E AndroidRuntime: Caused by: java.lang.NullPointerException
06-03 15:45:19.188 24070 24070 E AndroidRuntime:        at java.io.File.<init>(File.java:262)
06-03 15:45:19.188 24070 24070 E AndroidRuntime:        at info.aario.snotepad.Filer.getFileName(Filer.java:43)
06-03 15:45:19.188 24070 24070 E AndroidRuntime:        at info.aario.snotepad.Filer.getFileNameWithoutExtension(Filer.java:47)
06-03 15:45:19.188 24070 24070 E AndroidRuntime:        at info.aario.snotepad.EditorFragment.onCreateView(EditorFragment.java:95)
06-03 15:45:19.188 24070 24070 E AndroidRuntime:        at android.support.v4.app.Fragment.performCreateView(Fragment.java:2189)
06-03 15:45:19.188 24070 24070 E AndroidRuntime:        at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1299)
06-03 15:45:19.188 24070 24070 E AndroidRuntime:        at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1528)
06-03 15:45:19.188 24070 24070 E AndroidRuntime:        at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1595)
06-03 15:45:19.188 24070 24070 E AndroidRuntime:        at android.support.v4.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManager.java:2888)
06-03 15:45:19.188 24070 24070 E AndroidRuntime:        at android.support.v4.app.FragmentController.dispatchActivityCreated(FragmentController.java:201)
06-03 15:45:19.188 24070 24070 E AndroidRuntime:        at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:603)
06-03 15:45:19.188 24070 24070 E AndroidRuntime:        at android.support.v7.app.AppCompatActivity.onStart(AppCompatActivity.java:178)
06-03 15:45:19.188 24070 24070 E AndroidRuntime:        at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1249)
06-03 15:45:19.188 24070 24070 E AndroidRuntime:        at android.app.Activity.performStart(Activity.java:6696)
06-03 15:45:19.188 24070 24070 E AndroidRuntime:        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2628)
06-03 15:45:19.188 24070 24070 E AndroidRuntime:        ... 10 more
06-03 15:45:19.268  1360  2706 W ActivityManager:   Force finishing activity info.aario.snotepad/.MainActivity

@gjedeer
Copy link

gjedeer commented Jun 3, 2018

@aario I see in commit logs that this is fixed in 1.2.2. But I can't add 1.2.2 to F-Droid because you didn't bump versionCode from 2 to 3 in your commit:

b4a8cf8

Do you mind just changing it from 2 to 3 so that F-Droid can build the latest version of your app? (using it with syncthing btw, good duo)

@jakobcornell
Copy link

@aario Have you seen this? Really looking forward to a fix for this bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants