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

Doesn't run on Android #112

Closed
ip opened this issue Sep 11, 2017 · 11 comments
Closed

Doesn't run on Android #112

ip opened this issue Sep 11, 2017 · 11 comments

Comments

@ip
Copy link

ip commented Sep 11, 2017

It shows a black screen.

Logs:

adb install -r ./target/android-artifacts/app/build/outputs/apk/app-debug.apk

adb logcat -c
adb shell am start -n rust.$PROJ/rust.$PROJ.MainActivity
mkdir -p logs
adb logcat -v time | tee logs/android_log_$(date +%F_%R) | grep 'Rust'
./target/android-artifacts/app/build/outputs/apk/app-debug.apk: 1 file pushed. 3.3 MB/s (3013552 bytes in 0.868s)
	pkg: /data/local/tmp/app-debug.apk
Success
Starting: Intent { cmp=rust.zemeroth/.MainActivity VirtualScreenParam=Params{mDisplayId=-1, null, mFlags=0x00000000)} }
09-11 17:05:27.601 D/RustAndroidGlueStdouterr(22592): Entering android_main
09-11 17:05:27.601 D/RustAndroidGlueStdouterr(22592): Creating application thread
09-11 17:05:28.081 D/RustAndroidGlueStdouterr(22592): thread 'main' panicked at 'Error InvalidEnum executing command: SetRasterizer(Rasterizer { front_face: CounterClockwise, cull_face: Back, method: Fill, offset: None, samples: None })', /home/vanya/.cargo/registry/src/github.com-1ecc6299db9ec823/gfx_device_gl-0.14.3/src/lib.rs:768:12
09-11 17:05:28.081 D/RustAndroidGlueStdouterr(22592): stack backtrace:
09-11 17:05:28.081 D/RustAndroidGlueStdouterr(22592):    0: <unknown>
09-11 17:05:28.081 D/RustAndroidGlueStdouterr(22592):    1: <unknown>
09-11 17:05:28.081 D/RustAndroidGlueStdouterr(22592):    2: <unknown>
09-11 17:05:28.081 D/RustAndroidGlueStdouterr(22592):    3: <unknown>
09-11 17:05:28.081 D/RustAndroidGlueStdouterr(22592):    4: <unknown>
09-11 17:05:28.081 D/RustAndroidGlueStdouterr(22592):    5: <unknown>
09-11 17:05:28.081 D/RustAndroidGlueStdouterr(22592):    6: <unknown>
09-11 17:05:28.081 D/RustAndroidGlueStdouterr(22592):    7: <unknown>
09-11 17:05:28.081 D/RustAndroidGlueStdouterr(22592):    8: <unknown>
09-11 17:05:28.081 D/RustAndroidGlueStdouterr(22592):    9: <unknown>
09-11 17:05:28.081 D/RustAndroidGlueStdouterr(22592):   10: <unknown>
09-11 17:05:28.081 D/RustAndroidGlueStdouterr(22592):   11: <unknown>
09-11 17:05:28.081 D/RustAndroidGlueStdouterr(22592):   12: <unknown>
09-11 17:05:28.081 D/RustAndroidGlueStdouterr(22592):   13: <unknown>
09-11 17:05:28.081 D/RustAndroidGlueStdouterr(22592):   14: <unknown>
09-11 17:05:28.081 D/RustAndroidGlueStdouterr(22592):   15: <unknown>
09-11 17:05:28.081 D/RustAndroidGlueStdouterr(22592):   16: <unknown>
09-11 17:05:28.081 D/RustAndroidGlueStdouterr(22592):   17: <unknown>
09-11 17:05:28.081 D/RustAndroidGlueStdouterr(22592):   18: <unknown>
09-11 17:05:28.081 D/RustAndroidGlueStdouterr(22592):   19: <unknown>
09-11 17:05:28.081 D/RustAndroidGlueStdouterr(22592):   20: <unknown>
09-11 17:05:28.081 D/RustAndroidGlueStdouterr(22592):   21: <unknown>
09-11 17:05:28.081 D/RustAndroidGlueStdouterr(22592):   22: <unknown>
09-11 17:05:28.081 D/RustAndroidGlueStdouterr(22592):   23: <unknown>
@ozkriff
Copy link
Owner

ozkriff commented Sep 11, 2017

That's bad 😞

Can you give more info about your device and android version?

@ip
Copy link
Author

ip commented Sep 11, 2017

Device: Samsung Galaxy A5 (2017)
Android 6.0.1.

@ozkriff
Copy link
Owner

ozkriff commented Sep 11, 2017

Have you built that apk yourself on your local machine?

Can you try running zemeroth-v0-0-0-2017-09-09.apk from https://github.com/ozkriff/zemeroth/releases?

@ip
Copy link
Author

ip commented Sep 11, 2017

Yeah, I just ran it, the result is the same.

@kvark
Copy link

kvark commented Sep 11, 2017

Fix will be easy, see gfx-rs/gfx#1487
Care to try it out and submit a PR? I'll publish the version update if it helps.

@ip
Copy link
Author

ip commented Sep 11, 2017

I'm just starting to learn Rust so this will take more time for me. Leaving it for you guys :)

@vitvakatu
Copy link

Can do now, but have no ability to test

@ip
Copy link
Author

ip commented Sep 11, 2017

@vitvakatu I can test it.

@ozkriff ozkriff mentioned this issue Sep 12, 2017
@ozkriff
Copy link
Owner

ozkriff commented Sep 12, 2017

Updated to gfx_device_gl v0.14.4

@ip Could you check if zemeroth-v0-0-0-2017-09-12.apk works any better for you?

@ip
Copy link
Author

ip commented Sep 13, 2017

Yes, that works, thanks. Although, the screen becomes black after switching to another app and back, and after lock and unlock. And there is also #107. But it runs :)

@ip ip closed this as completed Sep 13, 2017
@ozkriff
Copy link
Owner

ozkriff commented Sep 13, 2017

Although, the screen becomes black after switching to another app and back, and after lock and unlock

That's a known problem of glutin/android-rs-glue.

I think this issue covers it - rust-windowing/glutin#904. But I'm not sure, maybe it's better to open a new issue in https://github.com/tomaka/glutin/issues.

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

No branches or pull requests

4 participants