simonkrauter / NiGui

Cross-platform desktop GUI toolkit written in Nim
MIT License
721 stars 49 forks source link

Windows: SIGSEGV: Illegal storage access #111

Open noetid opened 4 years ago

noetid commented 4 years ago

I tried to compile example_01_basic_app.nim , it gave me error:

Traceback (most recent call last)
d:\Programming\Nim\NiGui-master\examples\example_01_basic_app.nim(6) example_01_basic_app
C:\Users\user\.nimble\pkgs\nigui-0.2.4\nigui\private\windows\platform_impl.nim(402) init
C:\Users\user\.nimble\pkgs\nigui-0.2.4\nigui\private\windows\platform_impl.nim(387) pEnableHighDpiSupport
SIGSEGV: Illegal storage access. (Attempt to read from nil?)
Error: execution of an external program failed: 'd:\Programming\Nim\NiGui-master\examples\example_01_basic_app.exe '

It work when i comment out pEnableHighDpiSupport() in nigui/private/windows/platform_impl.nim.

Nim Compiler Version 1.4.0 [Windows: amd64] Compiled at 2020-10-16

OS Name: Microsoft Windows 8.1 Pro OS Version: 6.3.9600 N/A Build 9600

ghost commented 3 years ago

Sounds like the same issue as #109 which is resolved in master but not in latest release (v0.2.4), GetDpiForWindow() isn't supported pre-Win10 either.

drygdryg commented 3 years ago

I also observe the same issue. NiGui version: 0.2.4 Nim compiler version: 1.4.2 x86_64 C compiler version: GCC 10.2.0 x86_64 OS name: Microsoft Windows Embedded 8.1 Industry Pro x86_64 OS version: 6.3.9600 image

However, this issue does not show up on Windows 7 and Windows 10

ghost commented 3 years ago

@drygdryg Does this still happen if you use master (with nimble, depend on nigui#HEAD)

ghost commented 3 years ago

Pretty sure this was closed in 07225b1737d56e8f93c8b5500f2c76f5ea7936cb.

drygdryg commented 3 years ago

Pretty sure this was closed in 07225b1.

Tested with nigui@#head — no problem, thanks