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

Crash on Android #324

Closed
nesbox opened this issue Oct 5, 2017 · 13 comments
Closed

Crash on Android #324

nesbox opened this issue Oct 5, 2017 · 13 comments
Assignees
Labels
bug platform: android For issues affecting TIC80 on Android
Milestone

Comments

@nesbox
Copy link
Owner

nesbox commented Oct 5, 2017

JupiterSky says:

I found a crashing glitch.
If you type a wrong command in the prompt TIC dies, and it takes a little longer to open back up.
Android 4.4.2

@nesbox nesbox added platform: android For issues affecting TIC80 on Android bug labels Oct 5, 2017
@Rolzad73
Copy link

Rolzad73 commented Oct 5, 2017

I tried quickly on a Nexus 5 @ Android 5.1.1 using the official TIC from the store to type in random things and just got error messages, no crashing.
^*** UPDATE: I may have actually been using 0.45.0 ***

If JupiterSky can supply device type (some devices use non stock OS) and the logcat, that would help greatly in diagnosing.

I use CatLog app to help diagnose:
https://play.google.com/store/apps/details?id=com.nolanlawson.logcat

@Jusstas
Copy link

Jusstas commented Oct 6, 2017

The same happens for me.
Tic version 0.46.0 from google play
Android 5.0.2
LG-D405

nesbox added a commit that referenced this issue Oct 6, 2017
nesbox added a commit that referenced this issue Oct 6, 2017
@BearThorne
Copy link

I get this too... It only started happening in TIC 0.46.
I'm using an LG Tribute with Android 5.0

@Rolzad73
Copy link

I tried out the store version 0.46 and it crashes with unknown command for me as well (Nexus 5, 5.1.1)

I did get some logcat, but it looks like its in the C layer, possible difficult to narrow down. But since @BearThorne says that it just started happening on .46, a diff between that and .45 may give clues.

here is the trace file:
NOTE: com.nesbox.tic pid = 19959

F/libc    (19959): Fatal signal 7 (SIGBUS), code 2, fault addr 0xaf0fc000 in tid 19992 (SDLThread)
I/libc    (19959): Suppressing debuggerd output because prctl(PR_GET_DUMPABLE)==0
I/WindowState(  766): WIN DEATH: Window{1a0cf7d4 u0 com.nesbox.tic/com.nesbox.tic.TIC}
W/WindowManager(  766): Force-removing child win Window{c6b4472 u0 SurfaceView} from container Window{1a0cf7d4 u0 com.nesbox.tic/com.nesbox.tic.TIC}
W/WindowManager(  766): Failed looking up window
W/WindowManager(  766): java.lang.IllegalArgumentException: Requested window android.os.BinderProxy@d004d7d does not exist
W/WindowManager(  766): 	at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:8539)
W/WindowManager(  766): 	at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:8530)
W/WindowManager(  766): 	at com.android.server.wm.WindowState$DeathRecipient.binderDied(WindowState.java:1142)
W/WindowManager(  766): 	at android.os.BinderProxy.sendDeathNotice(Binder.java:551)
I/WindowState(  766): WIN DEATH: null
I/ThermalEngine(  200): TM Id 'VDD_DIG_SWMODE_MONITOR-TSENS6' Sensor 'tsens_tz_sensor6' - alarm cleared 1 at 73.0 degC
I/Zygote  (  201): Process 19959 exited due to signal (7)
I/ThermalEngine(  200): ACTION: VDD DIG SW_MODE 0 AUTO
I/ActivityManager(  766): Process com.nesbox.tic (pid 19959) has died
W/ActivityManager(  766): Force removing ActivityRecord{2aad8709 u0 com.nesbox.tic/.TIC t38997}: app died, no saved state
W/InputMethodManagerService(  766): Got RemoteException sending setActive(false) notification to pid 19959 uid 10864

this line seems to be the start of the crash, possibly always referencing "fault addr 0xaf0fc000":
Fatal signal 7 (SIGBUS), code 2, fault addr 0xaf0fc000 in tid 19992 (SDLThread)

@Rolzad73
Copy link

Just to confirm, I tried the release apks downloaded from here.

0.45.0 works fine, 0.46.0 has the error

@MineRobber9000
Copy link
Contributor

Please fix this bug. I'm getting this same issue on a Galaxy S3.

@Rolzad73
Copy link

Just an update.

I was trying to build the Android version on my own machine to track down the bug, but my self built one works fine. To be clear, this was as of commit cd101d4

I did have a strange build environment because this project uses ANT, and my android tools are at "Android SDK Platform-tools, revision 26.0.1" and as of "SDK Tools, Revision 25.3.0 (March 2017)", they removed ant tools. But I was able to download an previous version of just "tools" dir and substitute it in for my normal tools directory.

Then I ran into a problem of SDK version android-12 which is listed in AndroidManifest.xml, default.properties and project.properties, all of which are in "TIC-80/build/android/". android-12 actually points to Android 3.1 (Honeycomb) which, I don't have installed, and was not going to install since the Honeycombs have given me so many problems during the years when I tried to develop on them.

I first tried to back it down to android-10 (Android 2.3.3) but got a complaint about "android:hardwareAccelerated" not defined, which of course was introduced in Android 3.0 (API level 11), again Honeycomb.

So I went the other way and replaced the android-12 references listed above with android-17, which is Android 4.2. The complaints went away, so I continued to build.

First, I made sure that the 3rd-party dir was clean and then went into the jni dir and ran this command:
$ ndk-build

After the C files were built, I went back to the main Android build dir and ran this:
$ ant debug

After the build I went to the 'bin' dir and used the TIC-debug.apk to install:
$ adb install TIC-debug.apk

That's it.
I do not know what the cause of the original error is unless it was something that happened to the compilation of the 0.46.0 apk here.

@nesbox do you have the instructions of your Android build sequence, as well as the versions of tools that you use?

nesbox added a commit that referenced this issue Oct 16, 2017
@nesbox nesbox self-assigned this Oct 16, 2017
@nesbox nesbox added this to the 0.47.0 milestone Oct 16, 2017
@nesbox
Copy link
Owner Author

nesbox commented Oct 16, 2017

The problem was with my build system.
Could someone test this build tic_0.46.1.apk.zip?

@Rolzad73 I have NDK and ANT installed and I just call ndk-build then ant release to build Andriod version

@nesbox nesbox closed this as completed Oct 16, 2017
@Rolzad73
Copy link

@nesbox I just tried tic_0.46.1.apk.zip and the crash is still there. But it is a bit different than before, as it takes a bit longer of a pause after an invalid command input to crash (about 3 seconds) and it has a different crash trace. Before , it was Fatal signal 7 (SIGBUS), now it is Fatal signal 11 (SIGSEGV).

F/libc    (21531): Fatal signal 11 (SIGSEGV), code 2, fault addr 0xb05d4000 in tid 21565 (SDLThread)
I/libc    (21531): Suppressing debuggerd output because prctl(PR_GET_DUMPABLE)==0
I/WindowState(  770): WIN DEATH: Window{97e2140 u0 com.nesbox.tic/com.nesbox.tic.TIC}
W/WindowManager(  770): Force-removing child win Window{231839be u0 SurfaceView} from container Window{97e2140 u0 com.nesbox.tic/com.nesbox.tic.TIC}
W/WindowManager(  770): Failed looking up window
W/WindowManager(  770): java.lang.IllegalArgumentException: Requested window android.os.BinderProxy@3055d879 does not exist
W/WindowManager(  770):         at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:8539)
W/WindowManager(  770):         at com.android.server.wm.WindowManagerService.windowForClientLocked(WindowManagerService.java:8530)
W/WindowManager(  770):         at com.android.server.wm.WindowState$DeathRecipient.binderDied(WindowState.java:1142)
W/WindowManager(  770):         at android.os.BinderProxy.sendDeathNotice(Binder.java:551)
I/WindowState(  770): WIN DEATH: null

@nesbox
Copy link
Owner Author

nesbox commented Oct 16, 2017

@Rolzad73 pls check this one
tic_0.46.1.apk.zip
thanks

@Rolzad73
Copy link

@Rolzad73 pls check this one
tic_0.46.1.apk.zip
thanks

@nesbox
That one does work!!

@nesbox
Copy link
Owner Author

nesbox commented Oct 16, 2017

great, thanks 👍

nesbox added a commit that referenced this issue Oct 17, 2017
@Rolzad73
Copy link

Rolzad73 commented Oct 21, 2017

This can be closed.
Oh, nvm not sure what I was looking at.

CliffsDover pushed a commit to CliffsDover/TIC-80 that referenced this issue Oct 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug platform: android For issues affecting TIC80 on Android
Projects
None yet
Development

No branches or pull requests

5 participants