Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007745OCamlotherlibspublic2018-02-23 15:392018-05-21 18:55
Reportersampo 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
StatusconfirmedResolutionopen 
PlatformOSOS Version
Product Version4.06.0 
Target VersionFixed in Version 
Summary0007745: Graphics
DescriptionHello everybody.
I tested this program found at this address https://www.typerex.org/images/ocpwin-graphics.png [^]
# #load "graphics.cma";;
# open Graphics;;
# open_graph "600x600";;
- : unit = ()
# draw_poly [| 30,300; 200,40; 400,190; 250,500 |];;
- : unit = ()
# set_color red;;
- : unit = ()
# fill_poly [| 35,300; 200,45; 395,190; 250,495 |];;
- : unit = ()
With Windows(OCaml 4.06.0), two things are different:
1) instead of writing on the graphic window "OCaml graphics" it is
written Chinese characters.
2) instead of the red color, the black color is displayed.
With Linux(OCaml 4.02.3), one error:
# open_graph "600x600";;
Exception: Graphics.Graphic_failure "Cannot open display 600x600".
Thank you.
(I am not sure which category I have registered, sorry if it's not the right one)
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0018915)
gasche (administrator)
2018-02-23 15:44

I seem to remember that, under X11, you need to add a space before the size specification: (Graphics.open_graphics " 400x600") may work better.
(0018916)
dra (developer)
2018-02-23 22:39

For the Windows part, I'm not seeing the black fill instead red - can you give some more details of your set-up (which Windows port, which version of Windows).

I have no idea if the characters being displayed for the window title are strictly Chinese, but https://github.com/ocaml/ocaml/pull/1629 [^] fixes the bug!
(0018917)
sampo (reporter)
2018-02-24 12:12

Thank you.

If I use a Cygwin terminal, the background is red.
GNU bash, version 4.4.12(3)-release (i686-pc-cygwin)

If I use a Windows Vista terminal, the background is black.
Microsoft Windows [version 6.0.6002]
Copyright (c) 2006 Microsoft Corporation. Tous droits réservés.
(0019132)
xleroy (administrator)
2018-05-21 18:55

The mystery of the X11 geometry specification was explained.
The bad characters in the windows title should be fixed by now.
What remains is the mysterious red background under Cygwin. Actually, even the black background under Windows could be a bug -- I thought we want a white background for all ports.


- Issue History
Date Modified Username Field Change
2018-02-23 15:39 sampo New Issue
2018-02-23 15:44 gasche Note Added: 0018915
2018-02-23 22:39 dra Note Added: 0018916
2018-02-23 22:39 dra Status new => confirmed
2018-02-24 12:12 sampo Note Added: 0018917
2018-05-21 18:55 xleroy Note Added: 0019132


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker