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

macOS Ventura 13.3 GUI Maximize Window #19

Open
vinnyh125 opened this issue Oct 19, 2023 · 12 comments
Open

macOS Ventura 13.3 GUI Maximize Window #19

vinnyh125 opened this issue Oct 19, 2023 · 12 comments

Comments

@vinnyh125
Copy link

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 :^)
image

@sanette
Copy link
Owner

sanette commented Oct 20, 2023

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?

@vinnyh125
Copy link
Author

I've entered that command into my terminal and here is the file:
bogue9953e6.log
Let me know if I did it right

@sanette
Copy link
Owner

sanette commented Oct 21, 2023

did you trigger the maximize bug with this example too?

@vinnyh125
Copy link
Author

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.

@sanette
Copy link
Owner

sanette commented Oct 21, 2023

that's weird, I see no trace of the bug (and of the maximize event) in the log

@vinnyh125
Copy link
Author

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.

@sanette
Copy link
Owner

sanette commented Oct 22, 2023

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 ();;

@vinnyh125
Copy link
Author

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".

@sanette
Copy link
Owner

sanette commented Oct 22, 2023

oh yeah I forgot that mac os treats SDL windows in a weird way.

@sanette
Copy link
Owner

sanette commented Oct 28, 2023

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 ()

@vinnyh125
Copy link
Author

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

@sanette
Copy link
Owner

sanette commented Oct 29, 2023

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

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