View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0002693 | JEDI VCL | 00 JVCL Components | public | 2005-02-27 13:23 | 2005-05-19 08:01 |
Reporter | deks-den | Assigned To | obones | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 3.00 | ||||
Target Version | Fixed in Version | 3.10 | |||
Summary | 0002693: TJvSpecialImage raise AV when set Transparent property to True | ||||
Description | Test situation: create new project, drop TJvSpecialImage on form (name it as "Image"), create Form.OnShow event handler with following code: begin Image.Picture.Assign (Application.Icon); Image.Visible := True; Image.Transparent := True; end; This code always produce AV when setting Transparent to True. | ||||
Additional Information | I have no idea why it is so, but calling chain leads into TJvImage.ApplyCanges. | ||||
Tags | No tags attached. | ||||
|
My TJvSpecialImage.pas file version is 1.11, newest is 1.12, but nothing there is helpfull. |
|
My dev environment is D5 of Win XP. |
|
This is confirmed under WinXP and Delphi 7 with the latest JVCL |
2005-05-18 08:39
|
2693.zip (2,319 bytes) |
|
To anyone: Please use the attached project, it shows the behaviour. Here are the steps: Run the App Click on Set Image. All is fine Click on Set Transparent. You get an AV. I've tried to pinpoint the place where it AV's it's in TImage.PictureChanged in ExtCtrls.pas, on this test: if (not G.Transparent) and (D.Left <= 0) and (D.Top <= 0) and (D.Right >= Width) and (D.Bottom >= Height) then Evaluation of any property from G gives an AV, you can even crash the debugger. If you put a breakpoint in TJvSpecialImage.PictureChanged and inspect the value of @Self, it keeps changing everytime the breakpoint hits, which is very strange to me. I can't figure out why this is happening, please anyone help here. |
|
An Icon is already transparent so TIcon.Transparent is effectively read-only (see help for TIcon.Transparent). Maybe somewhere the Transparent handling goes wild. The weak spot of TImage is changes to the bitmap. It triggers Changed which can easily lead to a constant update loop. |
|
G (actually Picture.Graphic) is freed in G.Transparent := FTransparent; from TImage.PictureChanged because this triggers the OnChange event of the picture, then: TJvSpecialImage.PictureChanged -> calls ApplyChanges then TJvSpecialImage.ApplyChanges -> calls inherited Picture.Assign(Dest) then TPicture.Assign -> calls TPicture.SetGraphic then FGraphic is freed, which is Picture.Graphic which is G. Main problem is thus that Picture.Graphic is set in a Picture.OnChange handler. |
|
Thanks all, this is now fixed in CVS. Please have a look at version 1.13 and let me know if all is ok. |
Date Modified | Username | Field | Change |
---|---|---|---|
2005-02-27 13:23 | deks-den | New Issue | |
2005-02-27 13:26 | deks-den | Note Added: 0006605 | |
2005-02-27 13:27 | deks-den | Note Added: 0006606 | |
2005-03-31 08:33 | obones | Note Added: 0006795 | |
2005-03-31 08:33 | obones | Product Version | 3.00 BETA 2 => 3.00 |
2005-03-31 08:35 | obones | Status | new => acknowledged |
2005-05-18 08:39 | obones | File Added: 2693.zip | |
2005-05-18 08:45 | obones | Note Added: 0007214 | |
2005-05-18 08:45 | obones | Status | acknowledged => confirmed |
2005-05-18 12:45 | robert_marquardt | Note Added: 0007229 | |
2005-05-18 12:48 | robert_marquardt | Note Edited: 0007229 | |
2005-05-18 14:34 | remkobonte | Note Added: 0007230 | |
2005-05-19 08:01 | obones | Status | confirmed => resolved |
2005-05-19 08:01 | obones | Resolution | open => fixed |
2005-05-19 08:01 | obones | Assigned To | => obones |
2005-05-19 08:01 | obones | Note Added: 0007248 |