macOS Ventura 13.3 GUI Maximize Window
Issue:
When I run dune exec bin/main.exe, I see my GUI and it's fully functional, but when I click on the green button on the GUI window to maximize it, the GUI crashes, and I receive a warning about how "main.exe crashed suddenly". I also see this message in the terminal: zsh: bus error dune exec bin/main.exe. Let me know if anyone is able to reproduce this issue :^)
Hi, sorry for this. Could you try with one of the shipped boguex examples, with debugging and logging turned on? for instance
BOGUE_DEBUG=true BOGUE_LOG_TO_FILE=true boguex 1h
and attach the log file?
I've entered that command into my terminal and here is the file: bogue9953e6.log Let me know if I did it right
did you trigger the maximize bug with this example too?
Yep. It's strange because if I hover over the green button and select "maximize window" from the dropdown, it's okay, but if I just click on it, the GUI crashes.
that's weird, I see no trace of the bug (and of the maximize event) in the log
Oh wow, that's very strange. This issue has been reproduced with my friends who also have the M2 MBA running Ventura, so it might be on Apple's end.
let's check if the problem lies in SDL/tsdl. Could you try the following in an ocaml toplevel?
#require "tsdl";;
open Tsdl;;
Sdl.create_window ~w:600 ~h:400 "test" Sdl.Window.(windowed + resizable + opengl + allow_highdpi);;
This should open a window (without any meaningful content). Then try to maximize it.
you may then quit with
Sdl.quit ();;
When I type this into utop, I don't see a window, and when I try to access it in the application bar at the bottom of the Mac, it freezes and then says "Application Not Responding".
oh yeah I forgot that mac os treats SDL windows in a weird way.
Could you try this sample code from the Tsdl doc? https://erratique.ch/software/tsdl/doc/Tsdl/index.html#opengl_2
open Tsdl
let main () = match Sdl.init Sdl.Init.(video + events) with
| Error (`Msg e) -> Sdl.log "Init error: %s" e; exit 1
| Ok () ->
match Sdl.create_window ~w:640 ~h:480 "SDL OpenGL" Sdl.Window.opengl with
| Error (`Msg e) -> Sdl.log "Create window error: %s" e; exit 1
| Ok w ->
Sdl.pump_events ();
Sdl.delay 3000l;
Sdl.destroy_window w;
Sdl.quit ();
exit 0
let () = main ()
Tried the following code, and the window is created, but when I click on it, it quits and disappears without printing anything in the terminal or anything
it quits after 3 sec, you may change to a longer time, for instance 10sec
Sdl.delay 10000l;
if you need it to test maximizing the window