View Issue Details

IDProjectCategoryView StatusLast Update
0004867JEDI VCL00 JVCL Componentspublic2009-08-05 11:02
ReportercacofonyAssigned Toobones 
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.37 
Target VersionFixed in Version3.38 
Summary0004867: TJvXPBar causes access violation when Actions are removed at runtime
DescriptionIf action are removed from a TJvXPBar at run time on the mouse entry into the component it will raise an access violation.

The issue appears to be due to FHoverIndex no longer being valid. Solution to my problem was resetting FHoverIndex := -1; after a ResizeToMaxHeight. This may not be the best location; but it am updating the items during a BeginUpdate, EndUpdate block and ResizeToMaxHeight is called.
Additional Informationprocedure TJvXPCustomWinXPBar.ResizeToMaxHeight;
var
  NewHeight: Integer;
begin
  { TODO: Check this!!! }
  if IsLocked then
    Exit;
  NewHeight := FC_HEADER_MARGIN + HeaderHeight + FVisibleItems.Count * FRollOffset + FC_ITEM_MARGIN + 1;
  { full collapsing }
  if ((FRolling and not FCollapsed) or (not FRolling and FCollapsed) or
    (FVisibleItems.Count = 0)) then
    Dec(NewHeight, FC_ITEM_MARGIN);
// if Height <> NewHeight then
  Height := NewHeight - 5 + FTopSpace;
  // Tristan Marlow
  FHoverIndex := -1;
end;
TagsNo tags attached.

Activities

obones

2009-07-21 11:14

administrator   ~0015867

Please provide the zipped sources of a sample application showing this issue

2009-07-21 14:51

 

0004867.zip (349,906 bytes)

cacofony

2009-07-21 14:52

reporter   ~0015871

I have attached example application.

obones

2009-08-05 11:02

administrator   ~0015920

Thanks, this is now fixed in SVN

Issue History

Date Modified Username Field Change
2009-07-21 10:03 cacofony New Issue
2009-07-21 11:14 obones Note Added: 0015867
2009-07-21 11:14 obones Status new => feedback
2009-07-21 14:51 cacofony File Added: 0004867.zip
2009-07-21 14:52 cacofony Note Added: 0015871
2009-08-05 11:02 obones Note Added: 0015920
2009-08-05 11:02 obones Status feedback => resolved
2009-08-05 11:02 obones Fixed in Version => Daily / SVN
2009-08-05 11:02 obones Resolution open => fixed
2009-08-05 11:02 obones Assigned To => obones