View Issue Details

IDProjectCategoryView StatusLast Update
0002651JEDI VCL00 JVCL Componentspublic2005-02-18 06:12
ReporteranonymousAssigned Towapostma 
Status resolvedResolutionfixed 
Product Version 
Target VersionFixed in Version3.00 
Summary0002651: Latest Cvs Version - Access Violation at Designtime in TJvgLabel paint code - jvglabel.pas
DescriptionProblem reported by Warren Postma:

Jvglabel works fine until you put it into the TTabSheet of a TPageControl.
You can paste it onto an empty Form, cut it, then paste it inside the TTabSheet and boom, access violations, ad nauseum, which kills Delphi's IDE essentially.


See suggested patch in Additional Information - someone please evaluate if this is the right way to patch this issue.

Additional Information
There is a designtime access violation, one you can't get rid of that basically brings Delphi down with it, if you put a JvgLabel onto your form, then cut it, then paste it into a page of a tab control.

I don't know *why* but here's the evil code:

A patch which I am not sure if it's the right patch, at JvgLabel.pas, circa line 900:

  if (Assigned(FTextureBmp) or (floTransparentFont in Options)) and
    (CurrTextStyle <> fstPushed) then begin
    {Fixes access violation! -WPostma.}
      if Assigned(FTextureMask) then begin
    BitBlt(FTargetCanvas.Handle, 0, 0, FTextureMask.Width, FTextureMask.Height,
      FTextureMask.Canvas.Handle, 0, 0, SRCPAINT);

In the case above, it checks if FTextureBmp is assigned and
then ASSUMEs that FTextureMask is assigned.

I am not sure why this particular bug is triggered the way it is triggered, but could someone with more knowledge of the component
test my fix, and see if there is a better one? I have created
 a mantis issue for this one.



TagsNo tags attached.



2005-02-18 06:10

viewer   ~0006516

Fix checkin dev/JVCL3/run/JvgLabel.pas rev 1.33 checked in Friday Feb 18, 2005.-WPostma


2005-02-18 06:12

developer   ~0006517

Fixed in CVS. Sorry, it's fixed in CVS, rev 1.34, not 1.33 as said above.

Issue History

Date Modified Username Field Change
2005-02-17 12:14 anonymous New Issue
2005-02-18 06:10 anonymous Note Added: 0006516
2005-02-18 06:11 wapostma Status new => assigned
2005-02-18 06:11 wapostma Assigned To => wapostma
2005-02-18 06:12 wapostma Status assigned => resolved
2005-02-18 06:12 wapostma Fixed in Version => 3.00
2005-02-18 06:12 wapostma Resolution open => fixed
2005-02-18 06:12 wapostma Note Added: 0006517