[Gambas-user] Fwd: [Gambas Bug Tracker] Bug #1136: ColorButton fails with error bad drawing under gtk2 and gtk3

Benoît Minisini gambas at ...1...
Sat Sep 2 13:11:34 CEST 2017



-------- Message transféré --------
Sujet : [Gambas Bug Tracker] Bug #1136: ColorButton fails with error bad drawing under gtk2 and gtk3
Date : Sat, 02 Sep 2017 02:22:27 GMT
De : bugtracker at ...3416...
Pour : tmorehen at ...3634..., g4mba5 at ...626...

http://gambaswiki.org/bugtracker/edit?object=BUG.1136&from=L21haW4-

Comment #2 by Tony MOREHEN:

I published the program with the problem to the Software Farm as gbTerm.  Yes yet another terminal emulator.  This emulator has a quick navigate sidebar on the left.  It also has a pretty full cli, comparable to other standard emulators. gbTerm -h for instructions.  BTW I can't see any way to attach the program to this report.

Any way, the version I uploaded uses QT for the gui; you'll need to switch to one of the gtk components.  Clich Edit then Preferences then crash.

I did some more error tracing.  The crash occurs the first time that FillPicture in ColorButton.class is run.  When QT runs this function, $hPicture is Null.  When gtk runs FillPicture, $hPicture is not Null, but has 0 width and height (and probably other invalid parameters).  Hence, the crash at Draw.Begin.

Private Sub FillPicture()

  If $hPicture Then
    '$hPicture.Fill($iColor)
    Draw.Begin($hPicture)        '<===== crashes here
    Draw.LineStyle = Line.None
    Draw.FillStyle = Fill.Solid
    Draw.FillColor = $iColor
    Draw.Rect(2, 2, $hPicture.Width - 4, $hPicture.Height - 4)
    Draw.LineStyle = Line.Solid
    Draw.FillStyle = Fill.None
    Draw.Foreground = Color.LightForeground
    Draw.Rect(0, 0, $hPicture.Width, $hPicture.Height)
    Draw.Foreground = Color.White
    Draw.Rect(1, 1, $hPicture.Width - 2, $hPicture.Height - 2)
    Draw.End
  Endif

  $hButton.Picture = $hPicture

End

Tony MOREHEN changed the state of the bug to: Accepted.







More information about the User mailing list