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

White screen then crash. #1276

Closed
2 tasks done
xreic opened this issue Apr 8, 2020 · 12 comments
Closed
2 tasks done

White screen then crash. #1276

xreic opened this issue Apr 8, 2020 · 12 comments

Comments

@xreic
Copy link

xreic commented Apr 8, 2020

  • I have read the FAQ.
  • I have searched in existing issues.

Environment

  • OS: Windows 10
  • scrcpy version: 1.12.1
  • installation method: [Windows release
  • device model: XiaoMi Mi 9 Lite
  • Android version: MIUI Global 11.0.1 / Android 10

Describe the bug
Open cmd prompt (both as non-admin and admin) and direct to where I extracted the contents to
Run scrcpy
It executes and a white window pops up, then it closes a second later or so

INFO: scrcpy 1.12.1 <https://github.com/Genymobile/scrcpy>
F:\scrcpy-win64-v1.12.1\scrcpy-server: 1 file pushed. 7.1 MB/s (26202 bytes in 0.004s)
java.io.FileNotFoundException: /data/system/theme_config/theme_compatibility.xml: open failed: ENOENT (No such file or directory)
        at libcore.io.IoBridge.open(IoBridge.java:496)
        at java.io.FileInputStream.<init>(FileInputStream.java:159)
        at java.io.FileInputStream.<init>(FileInputStream.java:115)
        at java.io.FileReader.<init>(FileReader.java:58)
        at miui.content.res.ThemeCompatibilityLoader.getVersion(ThemeCompatibilityLoader.java:108)
        at miui.content.res.ThemeCompatibilityLoader.getConfigDocumentTree(ThemeCompatibilityLoader.java:126)
        at miui.content.res.ThemeCompatibilityLoader.loadConfig(ThemeCompatibilityLoader.java:59)
        at miui.content.res.ThemeCompatibility.<clinit>(ThemeCompatibility.java:31)
        at miui.content.res.ThemeCompatibility.isThemeEnabled(ThemeCompatibility.java:111)
        at android.content.res.MiuiResourcesImpl.<clinit>(MiuiResourcesImpl.java:41)
        at android.content.res.Resources.<init>(Resources.java:283)
        at android.content.res.MiuiResources.<init>(MiuiResources.java:49)
        at android.content.res.Resources.getSystem(Resources.java:204)
        at android.app.LoadedApk.<init>(LoadedApk.java:235)
        at android.app.ContextImpl.createSystemContext(ContextImpl.java:2430)
        at android.app.ActivityThread.getSystemContext(ActivityThread.java:2427)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.genymobile.scrcpy.Workarounds.fillAppInfo(Workarounds.java:66)
        at com.genymobile.scrcpy.ScreenEncoder.streamScreen(ScreenEncoder.java:56)
        at com.genymobile.scrcpy.Server.scrcpy(Server.java:34)
        at com.genymobile.scrcpy.Server.main(Server.java:163)
        at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
        at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:380)
Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
        at libcore.io.Linux.open(Native Method)
        at libcore.io.ForwardingOs.open(ForwardingOs.java:167)
        at libcore.io.BlockGuardOs.open(BlockGuardOs.java:252)
        at libcore.io.IoBridge.open(IoBridge.java:482)
        ... 22 more
INFO: Initial texture: 1080x2336
@rom1v
Copy link
Collaborator

rom1v commented Apr 8, 2020

The exception is not a bug (see #994).

It executes and a white window pops up, then it closes a second later or so

Try with a lower definition:

scrcpy -m1024

If it still does not work, please provide the output of adb logcat.

@xreic
Copy link
Author

xreic commented Apr 8, 2020

log.txt

I've already tried with a lower resolution too.

adb logcat generates a 7 MB file. Do you have a preferred host for me to upload it to?

@rom1v
Copy link
Collaborator

rom1v commented Apr 8, 2020

Could you do some more tests to find the cause.

  1. Run adb logcat in a terminal, and start scrcpy in another. When scrcpy stops, does adb logcat also terminate?
  2. Try to record without display (scrcpy --record file.mkv --no-display -m 800). (Unplug the device to stop if you're on Windows.) Is the recorded file ok?
  3. Try to record with adb shell screenrecord /sdcard/file.mp4 (then adb pull /sdcard/file.mp4). Is the recorded file ok?

@xreic
Copy link
Author

xreic commented Apr 8, 2020

  1. adb logcat keep going even when scrcpy stops.
  2. Recording is good.
  3. Recording is good.

@rom1v
Copy link
Collaborator

rom1v commented Apr 8, 2020

Oh, might be a driver issue on the computer then. Could you test on another computer/system?

a white window pops up

Could you post a screenshot?

@xreic
Copy link
Author

xreic commented Apr 9, 2020

Untitled
This is the window.

I'll test on another machine now.
It works on my laptop, while still showing that error I believe. However, using my laptop would not be optimal. I'll continue on trying to figuring out what I can do to fix this.

When I use v1.11, no error appears, but the windows does not render anything and immediately exits.

@rom1v
Copy link
Collaborator

rom1v commented Apr 9, 2020

while still showing that error

This is not an error (this is expected on some devices, the message will not be shown in future versions of scrcpy): #994

@xreic
Copy link
Author

xreic commented Apr 9, 2020

Yea I read that recently, but I'm still trying to figure out of how fix the "crashing" so I can use this on my main machine.

@rom1v
Copy link
Collaborator

rom1v commented Apr 9, 2020

Out of curiousity, could you test v1.9? (it uses a different SDL version)

@xreic
Copy link
Author

xreic commented Apr 9, 2020

No error, but it still opens then closes.

@xreic
Copy link
Author

xreic commented Apr 9, 2020

I didn't know why I didn't try it before, but the 32-bit version of v1.12 works (I was using the 64-bit version before). It still shows that false error, but it works. If you want me to run some more tests, then just ask.

Thanks for all your time and effort.

@rom1v
Copy link
Collaborator

rom1v commented Apr 10, 2020

OK good to know that this kind of problem can occur only on 32 or 64 bits 👍

@rom1v rom1v closed this as completed Apr 10, 2020
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

2 participants