Should this change be added to gui-lib? Vincent
On Fri, 29 Jul 2016 10:08:46 -0500, Dmitry Pavlov wrote: > > Matthew, > > Yes that works, thank! > > Also I figured why the message did not show up on my "first" WinXP > installation: the spreadsheet-editor package has not been updated there. > Newer version of spreadsheet-editor sets (style '(hide-vscroll)) and > (style '(hide-hscroll)) to panels with row and column buttons. > > Styles cause the error. Changing styles to just '(hscroll) and > '(vscroll) does not remove the error. > Anyway, I need those (hide-vscroll) and (hide-hscroll), so I am going to > use the patch you proposed, unless there is a more elegant solution I am > unaware of. > > (Another question is why there is a stack trace in 32-bit Windows and > just a message in 64-bit Windows, but that is of purely theoretical > importance to me.) > > Best regards, > > Dmitry > > > On 07/29/2016 05:25 PM, Matthew Flatt wrote: > > It may be that a guard against a 0-sized drawing dimension is needed. > > The right place for the guard might be in the `get-cr` method of > > > > gui-lib/mred/private/wx/common/backing-dc.rkt > > > > after `get-backing-size` is called. A zero dimension could be just > > increased to 1 before passing it to `get-backing-bitmap`. Can you try > > making that change to see if it solves the problem on your machine? > > > > At Fri, 29 Jul 2016 17:08:42 +0300, Dmitry Pavlov wrote: > >> Jens, > >> > >> Oddly, another installation of Racket 6.6 on 32-bit Windows XP not only > >> reproduced the error, but also gave a stack trace: > >> > >> initialization for bitmap%: bad argument combination: 495 0 #f #t 1.25 > >> context...: > >> C:\Program > >> Files\Racket\share\pkgs\draw-lib\racket\draw\private\syntax.rkt:252:13: > >> next > >> C:\Program > >> Files\Racket\share\pkgs\draw-lib\racket\draw\private\bitmap.rkt:156:2 > >> C:\Program > >> Files\Racket\collects\racket\private\class-internal.rkt:3553:0: > >> continue-make-object > >> C:\Program > >> Files\Racket\collects\racket\private\class-internal.rkt:3507:0: > >> do-make-object > >> C:\Program > >> Files\Racket\share\pkgs\gui-lib\mred\private\wx\common\backing-dc.rkt:122:4: > >> get-cr method in backing-dc% > >> C:\Program > >> Files\Racket\share\pkgs\gui-lib\mred\private\wx\common\canvas-mixin.rkt:144:4: > >> do-on-paint method in ...mon/canvas-mixin.rkt:118:2 > >> C:\Program > >> Files\Racket\share\pkgs\gui-lib\mred\private\wx\common\queue.rkt:454:6 > >> C:\Program > >> Files\Racket\share\pkgs\gui-lib\mred\private\wx\common\queue.rkt:505:32 > >> C:\Program > >> Files\Racket\share\pkgs\gui-lib\mred\private\wx\common\queue.rkt:653:3 > >> > >> bitmap.rkt confirms your hypothesis that the first number is the width, > >> and the second number is the height, and they both must be positive. > >> > >> [([exact-positive-integer? w] > >> [exact-positive-integer? h] > >> [any? [b&w? #f]] > >> [any? [alpha? #f]] > >> [positive-real? [scale 1.0]]) > >> > >> The width is not specified exactly in the app. I do not know why the > >> height is zero. I do not use bitmaps directly, just controls and canvas. > >> I will go with trial and error to get a small reproducible example. > >> > >> Regards, > >> > >> Dmitry > >> > >> > >> On 07/28/2016 11:50 PM, Jens Axel Søgaard wrote: > >>> Just a hunch: If 486 is a width - then the 0 could be a problematic > >>> height? > >>> > >>> Do you recognize the number 486? > >>> > >>> /Jens Axel > >>> > >>> > >>> 2016-07-28 22:29 GMT+02:00 <[email protected] <mailto:[email protected]>>: > >>> > >>> Hello, > >>> > >>> Running my GUI app from Racket 6.6, I see the following error > >>> message in the console: > >>> > >>> initialization for bitmap%: bad argument combination: 486 0 #f #t 1.0 > >>> > >>> It happens on 64-bit Windows 7 and 10, and does not happen on > >>> 32-bit Windows XP and 64-bit Linux. > >>> > >>> It also did not happen on Racket 6.5. > >>> > >>> The app continues to work despite the error. There is no stack > >>> trace whatsoever. > >>> What can I do to trace the problem? > >>> > >>> > >>> Best regards, > >>> > >>> Dmitry > >>> > >>> -- > >>> You received this message because you are subscribed to the Google > >>> Groups "Racket Users" group. > >>> To unsubscribe from this group and stop receiving emails from it, > >>> send an email to [email protected] > >>> <mailto:racket-users%[email protected]>. > >>> For more options, visit https://groups.google.com/d/optout. > >>> > >>> > >>> > >>> > >>> -- > >>> -- > >>> Jens Axel Søgaard > >>> > >> -- > >> You received this message because you are subscribed to the Google Groups > >> "Racket Users" group. > >> To unsubscribe from this group and stop receiving emails from it, send an > >> email to [email protected]. > >> For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to the Google Groups > "Racket Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

