You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 3963 Reporter: anonymous Status: closed (set by @damiendoligez on 2013-06-03T19:00:27Z) Resolution: fixed Priority: normal Severity: major Version: 3.09.0 Target version: 4.01.0+dev Fixed in version: 4.01.0+dev Category: ~DO NOT USE (was: OCaml general) Monitored by:@Chris00
Bug description
Call Graphics.open_graph "" to open the graphics window.
Call Graphics.wait_next_event.
Close the window by clicking on the close box with the mouse.
wait_next_event will never return, and the caller has no
way of knowing that the window has gone away.
I looked through the source code in ocaml-3.09.1/otherlibs/win32graph.
In open.c/GraphicsWndProc(), when a WM_DESTROY message arrives, the
message is passed to caml_gr_handle_event() as usual. But
caml_gr_handle_event() is not sensitive to a WM_DESTROY message.
So the waiting call from Graphics.wait_next_event continues
to wait forever.
The text was updated successfully, but these errors were encountered:
Since Graphics.wait_next_event does not have a return value for this case, I've fixed this by making it raise Graphic_failure as it does under X-window, although the message is not the same.
Original bug ID: 3963
Reporter: anonymous
Status: closed (set by @damiendoligez on 2013-06-03T19:00:27Z)
Resolution: fixed
Priority: normal
Severity: major
Version: 3.09.0
Target version: 4.01.0+dev
Fixed in version: 4.01.0+dev
Category: ~DO NOT USE (was: OCaml general)
Monitored by: @Chris00
Bug description
Call Graphics.open_graph "" to open the graphics window.
Call Graphics.wait_next_event.
Close the window by clicking on the close box with the mouse.
wait_next_event will never return, and the caller has no
way of knowing that the window has gone away.
I looked through the source code in ocaml-3.09.1/otherlibs/win32graph.
In open.c/GraphicsWndProc(), when a WM_DESTROY message arrives, the
message is passed to caml_gr_handle_event() as usual. But
caml_gr_handle_event() is not sensitive to a WM_DESTROY message.
So the waiting call from Graphics.wait_next_event continues
to wait forever.
The text was updated successfully, but these errors were encountered: