View Issue Details

IDProjectCategoryView StatusLast Update
0032813LazarusLCLpublic2018-03-15 10:18
ReporterAlexeyAssigned ToJuha Manninen 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformOSWindowsOS Version
Product Version1.8Product Build 
Target VersionFixed in Version 
Summary0032813: TControlBar is faulty
DescriptionDrop TControlBar at Form. It is not moveabe/resizeable. Try to delete it (use Object Inspector for it). Got Access Violation trap.
Steps To ReproduceSee description.
TagsNo tags attached.
Fixed in Revisionr56709, r56716
LazTarget-
WidgetsetWin32/Win64
Attached Files

Relationships

related to 0033430 closedJuha Manninen Tcontrolbar still faulty, AV with IDE. 

Activities

Vojtech Cihak

2017-12-12 19:59

reporter   ~0104664

Last edited: 2017-12-12 20:00

View 2 revisions

I found the reason, it is csDesignInteractive in ControlStyle. But it's there for years so something probably changed in Lazarus. Also, I don't know what this option should exactly do, there's only a short comment "// wants mouse events in design mode ".
Delphi docs says: "The control maps right mouse button clicks at design time into left mouse button clicks to manipulate the control." but it doesn't work in Lazarus.
The fix is to remove csDesignInteractive in TCustomControlBar.Create().

EDIT: I can confirm crashes but after removing csDesignInteractive I didn't notice AccessViolation anymore.

Juha Manninen

2017-12-13 01:12

developer   ~0104668

Last edited: 2017-12-13 01:13

View 2 revisions

Please test with r56709. I think I prevented the AV.
Otherwise the problem remains.
csDesignInteractive is processed in Designer's MouseDownOnControl, MouseUpOnControl and MouseMoveOnControl. Clearly it has a meaning and purpose.
What kind of control should set csDesignInteractive? Apparently TControlBar should not.

Vojtech Cihak

2017-12-13 01:43

reporter   ~0104669

@ Please test with r56709. I think I prevented the AV.

I can't see AV anymore.

@ What kind of control should set csDesignInteractive?
I don't know. It's my mistake, years ago I gave it to constructor even if I didn't know what it really should do.

Alexey

2017-12-13 16:18

reporter   ~0104676

Last edited: 2017-12-13 16:47

View 3 revisions

I removed "csDesignInteractive" from controlbar.inc and rebuilded Lazarus. No changes, AV is here. And I can't understand why component not moveabe/resizeable. Is it "by design"?

Upd: OK, dled designer.pp r5609 and recompiled. All healed. Thnx!

Vojtech Cihak

2017-12-13 17:09

reporter   ~0104678

@ Alexey: If you do some change in include file only (here controlbar.inc) it is not enough and Lazarus doesn't notice it and will not rebuild that file. You have to change something in owner pas file (here extctrls.pas).

Alexey

2017-12-13 21:54

reporter   ~0104681

Last edited: 2017-12-13 21:55

View 2 revisions

Anyhow, can mark it as Resolved.

Juha Manninen

2017-12-14 08:02

developer   ~0104688

I removed csDesignInteractive from TControlBar.
A control that sets it must handle MouseDown, MouseUp and MouseMove by itself.
Resolving.

jamie philbrook

2018-03-15 02:59

reporter   ~0107118

1.8.2 still has AV with that control..

Can't move it

if you delete it the old crash comes back...

Issue History

Date Modified Username Field Change
2017-12-12 17:32 Alexey New Issue
2017-12-12 19:59 Vojtech Cihak Note Added: 0104664
2017-12-12 20:00 Vojtech Cihak Note Edited: 0104664 View Revisions
2017-12-13 01:12 Juha Manninen Note Added: 0104668
2017-12-13 01:13 Juha Manninen Note Edited: 0104668 View Revisions
2017-12-13 01:43 Vojtech Cihak Note Added: 0104669
2017-12-13 16:18 Alexey Note Added: 0104676
2017-12-13 16:19 Alexey Note Edited: 0104676 View Revisions
2017-12-13 16:47 Alexey Note Edited: 0104676 View Revisions
2017-12-13 17:09 Vojtech Cihak Note Added: 0104678
2017-12-13 21:54 Alexey Note Added: 0104681
2017-12-13 21:55 Alexey Note Edited: 0104681 View Revisions
2017-12-14 07:54 Juha Manninen Assigned To => Juha Manninen
2017-12-14 07:54 Juha Manninen Status new => assigned
2017-12-14 08:02 Juha Manninen Fixed in Revision => r56709, r56716
2017-12-14 08:02 Juha Manninen LazTarget => -
2017-12-14 08:02 Juha Manninen Note Added: 0104688
2017-12-14 08:02 Juha Manninen Status assigned => resolved
2017-12-14 08:02 Juha Manninen Resolution open => fixed
2018-03-15 02:59 jamie philbrook Note Added: 0107118
2018-03-15 10:18 Juha Manninen Relationship added related to 0033430