32-bit racket fullscreen error
Open
Nobody has claimed this yet.
- Dominant language
- Racket
- Stars
- 68
- Forks
- 82
- PR merge metrics
- No merged PRs in 30d
Description
Running (send frame fullscreen #t) on a 32-bit version of Racket on Windows comes up with this error.
$ racket test.rkt
ptr-set!: given value does not fit primitive C type
C type: _int32
given value: 2147483648
context...:
C:\Program Files (x86)\Racket\collects\ffi\unsafe.rkt:1260:0: cast
C:\Program Files (x86)\Racket\share\pkgs\gui-lib\mred\private\wx\win32\frame.rkt:627:2: fullscreen method in frame%
C:\Program Files (x86)\Racket\collects\ffi\unsafe\atomic.rkt:72:13
C:\Program Files (x86)\Racket\share\pkgs\gui-lib\mred\private\wx\common\queue.rkt:454:6
C:\Program Files (x86)\Racket\share\pkgs\gui-lib\mred\private\wx\common\queue.rkt:505:32
C:\Program Files (x86)\Racket\share\pkgs\gui-lib\mred\private\wx\common\queue.rkt:653:3
The script I used is bare-bones.
#lang racket/base
(require racket/class racket/gui/base)
(define frame
(new frame%
[label "foo"]
[width 100]
[height 100]))
(define fullscreen-button
(new button%
[parent frame]
[label "Toggle Fullscreen"]
[callback (lambda (button evt)
(define fs? (send frame is-fullscreened?))
(send frame fullscreen (not fs?)))]))
(define close-button
(new button%
[parent frame]
[label "Close"]
[callback (lambda (button evt)
(send frame show #f)
(exit))]))
(send frame show #t)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The failure is reported in share/pkgs/gui-lib/mred/private/wx/win32/frame.rkt at line 627; start by reproducing test.rkt on 32-bit Windows and inspect the fullscreen method and its FFI cast. Done means (send frame fullscreen #t) toggles fullscreen without the _int32 overflow error.
Written by the indexing model from the issue text.
Assessment
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100