gui icon indicating copy to clipboard operation
gui copied to clipboard

make-gl-bitmap exposes ffi error (maybe specific to Mac OS)

Open LiberalArtist opened this issue 5 years ago • 1 comments

This program:

#lang racket/base

(require racket/class racket/gui/base)

(make-gl-bitmap 10 10 (new gl-config%))

produces the following error message, both in DrRacket and at the command line:

memcpy: contract violation
  expected: cpointer?
  given: #<variable-code>
  argument position: 1st
  other arguments...:
   #<cpointer>
   40
  context...:
   /Applications/Racket v7.3/share/pkgs/gui-lib/mred/private/wx/cocoa/cgl.rkt:210:12: for-loop
   /Applications/Racket v7.3/share/pkgs/gui-lib/mred/private/wx/cocoa/cgl.rkt:187:8: surface-flush method in bitmap%
   /Applications/Racket v7.3/share/pkgs/gui-lib/mred/private/wx/cocoa/cgl.rkt:183:8: get-cairo-surface method in bitmap%
   /Applications/Racket v7.3/share/pkgs/gui-lib/mred/private/wx/cocoa/cgl.rkt:225:0: create-gl-bitmap
   "/Users/philip/Downloads/tmp-memcpy-error.rkt": [running body]
   temp37_0
   for-loop
   run-module-instance!125
   perform-require!78

I've only tested this on Mac OS so far.

LiberalArtist avatar Jul 01 '19 18:07 LiberalArtist

That commit fixes some obvious problems and makes the crash go away on my machine, but I haven't paged this back in enough to remember how to check it properly.

mflatt avatar Jul 01 '19 21:07 mflatt