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

On windows7, the black screen of my electron app #24434

Closed
3 tasks done
zhu-xiaoming opened this issue Jul 6, 2020 · 7 comments
Closed
3 tasks done

On windows7, the black screen of my electron app #24434

zhu-xiaoming opened this issue Jul 6, 2020 · 7 comments

Comments

@zhu-xiaoming
Copy link

Preflight Checklist

  • I have read the Contributing Guidelines for this project.
  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Issue Details

  • Electron Version:
    • 8.2.3
  • Operating System:
    • Windows 7 SP1 (Currently only reproducible on this system)
  • Last Known Working Electron version:
    • 4.0.1

Expected Behavior

Open normally, no black screen

Actual Behavior

When starting the software, An error occurs: Internal D3D9 error: HRESULT: 0x8007000E: LoadLibrary failed to load D3D Compiler DLL. A black screen appears at the same time

To Reproduce

It can be used normally on the Windows10 system and cannot reproduce the bug.
At present, this bug can only be successfully reproduced on the newly installed windows7 SP1 system. And directly use electron-quick-start original code can be reproduced, without adding other code.

Screenshots

Below is the screenshot when running electron-quick-start on windows7 SP1 system. The phenomenon at this time is a white screen. This is different from the black screen of my software, but the error message is the same.

TIM截图20200707011852
TIM截图20200707011739
According to the error report, I guess that there is a problem with the d3dcompiler_47.dll file, so I copied the d3dcompiler_47.dll file from chrome 83.0.4103.116 and used it to replace the d3dcompiler_47.dll file in the dist folder of node_modules. Run electron-quick-start again. Can be used normally.
In the picture below, d3dcompiler_47.dll was copied from the chrome folder, and d3dcompiler_47.dll.80 was the original electron file.

TIM截图20200707012143
TIM截图20200707012020
TIM截图20200707011945

Additional Information

I searched for developers to use the app.disableHardwareAcceleration() method to disable GPUs to avoid this error. see: #21500. But my software must use webgl, if you disable gpu, it will give users a very bad experience.

@javaxiu
Copy link

javaxiu commented Jul 7, 2020

see also #22118

@zhu-xiaoming
Copy link
Author

@javaxiu So must my software users install .net framework 4.7.1? Or I can only tell users that Windows 7 is not supported.
But why does Chrome still work properly on Windows 7 even if .net framework 4.7.1 is not installed. In addition, I use chrome's d3dcompiler_47.dll file to replace the electron dll file, which can also make the electron app work normally.
I think we should check why there is a problem with the electron’s d3dcompiler_47.dll file.It's just that I'm not familiar with the internals of C++ and Chrome, so I can't find the specific reason.
I sent this issue because I hope the electron developer can find the reason for the d3dcompiler_47.dll file error.

@Mrhoho
Copy link

Mrhoho commented Jul 31, 2020

app.commandLine.appendSwitch('disable-gpu') can be displayed normally,

But how do I know if a device does not support hardware acceleration.

app.getGPUFeatureStatus()Did not help

@zhu-xiaoming
Copy link
Author

app.commandLine.appendSwitch('disable-gpu') can be displayed normally,

But how do I know if a device does not support hardware acceleration.

app.getGPUFeatureStatus()Did not help

It is currently impossible to know whether the device supports hardware acceleration. You see whether the detection system is windows7, and then turn off hardware acceleration. I still hope that Electron will solve this problem.

@Mrhoho
Copy link

Mrhoho commented Aug 13, 2020

app.commandLine.appendSwitch('disable-gpu') can be displayed normally,
But how do I know if a device does not support hardware acceleration.
app.getGPUFeatureStatus()Did not help

It is currently impossible to know whether the device supports hardware acceleration. You see whether the detection system is windows7, and then turn off hardware acceleration. I still hope that Electron will solve this problem.

Thanks for your reply, I have turned off hardware acceleration now, but I am curious how chrome does it, because everything is normal in chrome

@electron-triage
Copy link

The Electron version reported on this issue is no longer supported. See our supported versions documentation.

If you're still experiencing this issue on a supported version, please open a new issue with an updated repro - a Fiddle is very appreciated.

Electron has a large issues backlog. To help our team prioritize, we're closing older issues and asking for new issues with updated repro steps if it affects a supported version. This helps sort what issues are still relevant and helps us fix them more quickly.

Thanks for your patience and understanding!

@soymikey
Copy link

Hi, i am facing the same problem as well. but after one round of search, I have found a way to work around it. my solution is on electron builder's afterPack setting, you can actually delete the original d3dcompiler_47.dll on unpacked folder and replace it with google's d3dcompiler_47.dll. Hope this will help you~~

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

6 participants