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

core : segfault on windows 10 when specifying .height of window struct #1341

Open
nat3Github opened this issue Jan 29, 2025 · 0 comments
Open
Labels
bug Something isn't working needs-triage Issues that need triaging

Comments

@nat3Github
Copy link

Image

to reproduce on windows 10:
add .height = 300, i.e. in the triangle example

error log:

Segmentation fault at address 0x68
C:\Users\E-zoc\AppData\Local\zig\p\122092af23a9e9346b15032fc6ff896630a3729209f36efa1e7881363c3342303eca\src\core\Windows.zig:340:47: 0x7ff7dee4001d in wndProc (weather_screensaver.exe.obj)
core_window.swap_chain.release();
^
???:?:?: 0x7fffaecaef5b in ??? (USER32.dll)
???:?:?: 0x7fffaecae8cb in ??? (USER32.dll)
???:?:?: 0x7fffaecc622f in ??? (USER32.dll)
???:?:?: 0x7fffaf591373 in ??? (ntdll.dll)
???:?:?: 0x7fffad2f14c3 in ??? (win32u.dll)
C:\Users\E-zoc\AppData\Local\zig\p\122092af23a9e9346b15032fc6ff896630a3729209f36efa1e7881363c3342303eca\src\core\Windows.zig:161:28: 0x7ff7dee423b4 in updateWindowSize (weather_screensaver.exe.obj)
if (0 == w.SetWindowPos(
^
C:\Users\E-zoc\AppData\Local\zig\p\122092af23a9e9346b15032fc6ff896630a3729209f36efa1e7881363c3342303eca\src\core\Windows.zig:229:21: 0x7ff7dee3e42f in initWindow (weather_screensaver.exe.obj)
updateWindowSize(dpi, window_style, hwnd, .{
^
C:\Users\E-zoc\AppData\Local\zig\p\122092af23a9e9346b15032fc6ff896630a3729209f36efa1e7881363c3342303eca\src\core\Windows.zig:58:31: 0x7ff7dee42789 in tick (weather_screensaver.exe.obj)
try initWindow(core, window_id);
^
C:\Users\E-zoc\AppData\Local\zig\p\122092af23a9e9346b15032fc6ff896630a3729209f36efa1e7881363c3342303eca\src\Core.zig:258:22: 0x7ff7dee43470 in main (weather_screensaver.exe.obj)
try Platform.tick(core);
^
C:\Users\E-zoc\AppData\Local\zig\p\122092af23a9e9346b15032fc6ff896630a3729209f36efa1e7881363c3342303eca\src\module.zig:668:29: 0x7ff7dee0ae96 in run__anon_6930 (weather_screensaver.exe.obj)
switch (@typeinfo(Ret)) {
^
C:\Users\E-zoc\AppData\Local\zig\p\122092af23a9e9346b15032fc6ff896630a3729209f36efa1e7881363c3342303eca\src\module.zig:629:40: 0x7ff7dee03803 in run__anon_5390 (weather_screensaver.exe.obj)
callMod.run(callFn);
^
D:\Programming\Zig\lib\screensaver\src\main.zig:51:12: 0x7ff7dee02dc5 in startScreensaver (weather_screensaver.exe.obj)
app.run(.main);
^
D:\Programming\Zig\lib\screensaver\src\main.zig:15:25: 0x7ff7dee03b09 in main (weather_screensaver.exe.obj)
try startScreensaver();
^
D:\Programming\Zig\zigup\zig\0.14.0-dev.2577+271452d22\files\lib\std\start.zig:631:75: 0x7ff7dee0405a in main (weather_screensaver.exe.obj)
return callMainWithArgs(@as(usize, @intcast(c_argc)), @as([][:0]u8, @ptrCast(c_argv)), envp);

  ^

D:\Programming\Zig\zigup\zig\0.14.0-dev.2577+271452d22\files\lib\libc\mingw\crt\crtexe.c:259:0: 0x7ff7df1b01f2 in __tmainCRTStartup (crt2.obj)
mainret = _tmain (argc, argv, envp);

D:\Programming\Zig\zigup\zig\0.14.0-dev.2577+271452d22\files\lib\libc\mingw\crt\crtexe.c:180:0: 0x7ff7df1b025b in mainCRTStartup (crt2.obj)
ret = __tmainCRTStartup ();

???:?:?: 0x7fffaf2d7373 in ??? (KERNEL32.DLL)
???:?:?: 0x7fffaf53cc90 in ??? (ntdll.dll)

@nat3Github nat3Github added bug Something isn't working needs-triage Issues that need triaging labels Jan 29, 2025
@nat3Github nat3Github changed the title windows : segfault when specifying .height of window struct core : segfault on windows 10 when specifying .height of window struct Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage Issues that need triaging
Projects
None yet
Development

No branches or pull requests

1 participant