View Issue Details

IDProjectCategoryView StatusLast Update
0032342LazarusIDEpublic2017-10-21 12:46
ReporterBenito van der Zander Assigned ToJuha Manninen  
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Product Version1.8RC4 
Summary0032342: anchordocking crash
DescriptionSo I took a first look at the anchordocking

I dragged the object inspector and dropped it in the middle of the source editor, because I did not know what I was doing there.

Then there was a window with two tabs, source editor and object inspector, which I did not like at all, so I dragged the object inspector back and dropped it on the leftmost side of Lazarus.

Which caused the attached screenshot and this:

[TJITComponentList.DestroyJITComponent] ERROR destroying component Error: Access violation
  Stack trace:
  $0000000000B054CD SETCUSTOMFORM, line 1165 of ../designer/controlselection.pp
  $0000000000B09031 DELETE, line 2282 of ../designer/controlselection.pp
  $0000000000B08F58 REMOVE, line 2264 of ../designer/controlselection.pp
  $0000000000B0649B NOTIFICATION, line 1452 of ../designer/controlselection.pp
  $0000000000542A5F
  $00000000005D3197 DESTROY, line 5064 of include/control.inc
  $00000000005BA671 DESTROY, line 6601 of include/wincontrol.inc
  $00000000005D66C1 DESTROY, line 54 of include/customcontrol.inc
  $000000000047FEE1 DESTROY, line 316 of include/scrollingwincontrol.inc
  $0000000000481F2F DESTROY, line 212 of include/customform.inc
  $0000000000431C60
  $0000000000AD705B DESTROY, line 728 of ../designer/jitforms.pp
  $0000000000431C60
  $0000000000431C60
  $00000000004B44BC DESTROY, line 1661 of main.pp
  $0000000000431C60
  $000000000047BA8B BEFOREFINALIZATION, line 1904 of forms.pp
TCustomFormEditor.JITListException List.CurReadStreamClass=nil nil
NOTE: Window with stalled focus found!, faking focus-out event


And clicking cancel (Abbrechen) gives an never ending

[TJITComponentList.DestroyJITComponent] ERROR destroying component Error: Access violation
  Stack trace:
  $00000000004E9C28 BEGINCODETOOL, line 790 of mainbase.pas
  $00000000004D474F PROPHOOKPERSISTENTDELETING, line 8980 of main.pp
  $00000000009F608E PERSISTENTDELETING, line 6446 of propedits.pp
  $0000000000AF3893 DODELETEPERSISTENT, line 3009 of ../designer/designer.pp
  $0000000000AF40C8 NOTIFICATION, line 3166 of ../designer/designer.pp
  $000000000048224C NOTIFICATION, line 288 of include/customform.inc
  $0000000000542A5F
  $00000000005D3197 DESTROY, line 5064 of include/control.inc
  $00000000005BA671 DESTROY, line 6601 of include/wincontrol.inc
  $00000000005D66C1 DESTROY, line 54 of include/customcontrol.inc
  $000000000047FEE1 DESTROY, line 316 of include/scrollingwincontrol.inc
  $0000000000481F2F DESTROY, line 212 of include/customform.inc
  $0000000000431C60
  $0000000000AD705B DESTROY, line 728 of ../designer/jitforms.pp
  $0000000000431C60
  $0000000000431C60
  $00000000004B44BC DESTROY, line 1661 of main.pp
TCustomFormEditor.JITListException List.CurReadStreamClass=nil nil
[TJITComponentList.DestroyJITComponent] ERROR destroying component Error: Access violation
  Stack trace:
  $00000000004E9C28 BEGINCODETOOL, line 790 of mainbase.pas
  $00000000004D474F PROPHOOKPERSISTENTDELETING, line 8980 of main.pp
  $00000000009F608E PERSISTENTDELETING, line 6446 of propedits.pp
  $0000000000AF3893 DODELETEPERSISTENT, line 3009 of ../designer/designer.pp
  $0000000000AF40C8 NOTIFICATION, line 3166 of ../designer/designer.pp
  $000000000048224C NOTIFICATION, line 288 of include/customform.inc
  $0000000000542A5F
  $00000000005D3197 DESTROY, line 5064 of include/control.inc
  $00000000005BA671 DESTROY, line 6601 of include/wincontrol.inc
  $00000000005D66C1 DESTROY, line 54 of include/customcontrol.inc
  $000000000047FEE1 DESTROY, line 316 of include/scrollingwincontrol.inc
  $0000000000481F2F DESTROY, line 212 of include/customform.inc
  $0000000000431C60
  $0000000000AD705B DESTROY, line 728 of ../designer/jitforms.pp
  $0000000000431C60
  $0000000000431C60
  $00000000004B44BC DESTROY, line 1661 of main.pp
TCustomFormEditor.JITListException List.CurReadStreamClass=nil nil
[TJITComponentList.DestroyJITComponent] ERROR destroying component Error: Access violation
  Stack trace:
  $00000000004E9C28 BEGINCODETOOL, line 790 of mainbase.pas
  $00000000004D474F PROPHOOKPERSISTENTDELETING, line 8980 of main.pp
  $00000000009F608E PERSISTENTDELETING, line 6446 of propedits.pp
  $0000000000AF3893 DODELETEPERSISTENT, line 3009 of ../designer/designer.pp
  $0000000000AF40C8 NOTIFICATION, line 3166 of ../designer/designer.pp
  $000000000048224C NOTIFICATION, line 288 of include/customform.inc
  $0000000000542A5F
  $00000000005D3197 DESTROY, line 5064 of include/control.inc
  $00000000005BA671 DESTROY, line 6601 of include/wincontrol.inc
  $00000000005D66C1 DESTROY, line 54 of include/customcontrol.inc
  $000000000047FEE1 DESTROY, line 316 of include/scrollingwincontrol.inc
  $0000000000481F2F DESTROY, line 212 of include/customform.inc
  $0000000000431C60
  $0000000000AD705B DESTROY, line 728 of ../designer/jitforms.pp
  $0000000000431C60
  $0000000000431C60
  $00000000004B44BC DESTROY, line 1661 of main.pp
TCustomFormEditor.JITListException List.CurReadStreamClass=nil nil
[TJITComponentList.DestroyJITComponent] ERROR destroying component Error: Access violation
  Stack trace:
  $00000000004E9C28 BEGINCODETOOL, line 790 of mainbase.pas
  $00000000004D474F PROPHOOKPERSISTENTDELETING, line 8980 of main.pp
  $00000000009F608E PERSISTENTDELETING, line 6446 of propedits.pp
  $0000000000AF3893 DODELETEPERSISTENT, line 3009 of ../designer/designer.pp
  $0000000000AF40C8 NOTIFICATION, line 3166 of ../designer/designer.pp
  $000000000048224C NOTIFICATION, line 288 of include/customform.inc
  $0000000000542A5F
  $00000000005D3197 DESTROY, line 5064 of include/control.inc
  $00000000005BA671 DESTROY, line 6601 of include/wincontrol.inc
  $00000000005D66C1 DESTROY, line 54 of include/customcontrol.inc
  $000000000047FEE1 DESTROY, line 316 of include/scrollingwincontrol.inc
  $0000000000481F2F DESTROY, line 212 of include/customform.inc
  $0000000000431C60
  $0000000000AD705B DESTROY, line 728 of ../designer/jitforms.pp
  $0000000000431C60
  $0000000000431C60
  $00000000004B44BC DESTROY, line 1661 of main.pp
TCustomFormEditor.JITListException List.CurReadStreamClass=nil nil


TagsNo tags attached.
Fixed in Revision
LazTarget-
Widgetset
Attached Files

Relationships

related to 0032343 resolvedJuha Manninen cannot close forms (after having tried anchordocking) 
related to 0029200 assignedMattias Gaertner Desktop manager restore incorrect docked layouts when layout has docked pages 
related to 0032591 resolvedJuha Manninen Anchor docking fall with AV and hang IDE after moving Code Explorer to another place 

Activities

Benito van der Zander

2017-08-27 00:59

reporter  

Screenshot_20170827_005543.png (25,337 bytes)   
Screenshot_20170827_005543.png (25,337 bytes)   

Juha Manninen

2017-08-27 14:13

developer   ~0102437

Resolving.
This is caused by a local FPC configuration issue.

Benito van der Zander

2017-08-27 15:08

reporter   ~0102441

fpc caused the other issue

This one happens with 3.0.0 too

Juha Manninen

2017-08-27 15:27

developer   ~0102442

Last edited: 2017-08-28 13:13

View 2 revisions

Well, it works for everybody else.
Besides, I don't think FPC causes bugs in AnchorDocking. It is a configuration issue in your system.

Ondrej Pokorny

2017-08-28 18:56

developer   ~0102472

Last edited: 2017-08-28 18:57

View 2 revisions

I personally don't think something like this can be caused by FPC or user configuration. There are issues reported about docked pages.

Besides AnchorDocking shouldn't crash the IDE whatever the configuration is.

Juha Manninen

2017-09-01 19:24

developer   ~0102573

Last edited: 2017-09-02 09:31

View 4 revisions

Actually I can reproduce it now...
[Edit] No, this is a different bug. I cannot reproduce the original bug.
Lazarus compiled with FPC trunk for GTK2 widgetset breaks the docking completely.
There is an Access violation after any docking operation.
The output below shows a warning "TAnchorDockPageControl.Destroy with LCLRefCount>0".
Why it happens only with FPC trunk? What changed? Can others reproduce?

---
(lazarus:7359): GLib-GObject-WARNING **: gsignal.c:1207: no emission of signal "button-release-event" to stop for instance '0x4782110'
TDockPerformer.DragStop Dropped False False AnchorDockSite8:TAnchorDockHostSite
WARNING: TAnchorDockPageControl.Destroy with LCLRefCount>0. Hint: Maybe the component is processing an event?
TAnchorDockHostSite.SimplifyOneControl Self="Code Explorer" Site="Code Explorer"
TAnchorDockHostSite.Simplify AnchorDockSite12:TAnchorDockHostSite CodeExplorerView:TCodeExplorerView
TApplication.HandleException Access violation
  Stack trace:
  $000000000042322A fpc_check_object, line 834 of ../inc/generic.inc
  $000000000060C7F7 DOMOUSEUP, line 2317 of include/control.inc
  $000000000060D58B WMLBUTTONUP, line 2758 of include/control.inc
  $0000000000437E28 DISPATCH, line 674 of ../inc/objpas.inc
  $000000000060C2FF WNDPROC, line 2254 of include/control.inc
  $00000000005FA5F7 WNDPROC, line 5404 of include/wincontrol.inc
  $000000000084C6A6 DELIVERMESSAGE, line 112 of lclmessageglue.pas
  $000000000071512F DELIVERMESSAGE, line 3702 of gtk2/gtk2proc.inc
  $0000000000727F3C DELIVERMOUSEUPMESSAGE, line 2325 of gtk2/gtk2callback.inc
  $000000000072811F GTKMOUSEBTNRELEASE, line 2400 of gtk2/gtk2callback.inc
  $00007F5AA07BC7AC
TApplication.HandleException Access violation

Benito van der Zander

2017-09-10 23:58

reporter  

project1.zip (2,618 bytes)

Benito van der Zander

2017-09-11 00:00

reporter   ~0102768

> $000000000042322A fpc_check_object, line 834 of ../inc/generic.inc
> $000000000060C7F7 DOMOUSEUP, line 2317 of include/control.inc

I tried a simple test project and the same happens there, when moving two forms on pages, and dragging one of them of...

>procedure TControl.DoMouseUp(var Message: TLMMouse; Button: TMouseButton);
>var
> P, MP: TPoint;
>begin
> if not (csNoStdEvents in ControlStyle) then
> begin
> MP := GetMousePosFromMessage(Message.Pos);
> if (Button in [mbLeft, mbRight]) and DragManager.IsDragging then
> begin
> P := ClientToScreen(MP);
> DragManager.MouseUp(Button, KeysToShiftState(Message.Keys), P.X, P.Y);
> Message.Result := 1;
> end;
> MouseUp(Button, KeysToShiftState(Message.Keys), MP.X, MP.Y);
> end;
>end;

Perhaps DragManager.MouseUp destroys the page control, and the last MouseUp is trying to call the MouseUp of the destroyed page control?

Juha Manninen

2017-10-08 13:34

developer   ~0103254

I cannot reproduce any crashes now. Your test project also works without crashes.
I guess things have been fixed. Resolving...

BTW, you project has an ugly unit search path. I added newlines after ";" and it looks like this:
 U:/components/pascal/data;
 ../../import/synapse;
 U:/components/pascal/internet;
 U:/components/lazarus/dialogs;
 U:/components/pascal/system;
 /home/benito/hg/components/pascal/data/;
 /home/benito/hg/programs/contests/euler/;
 /home/benito/hg/components/pascal/internet/;
 /home/benito/hg/components/lazarus/dialogs/;
 /home/benito/hg/components/pascal/system/;
 /home/benito/hg/components/pascal/import/regexpr/source/

You should use packages for such library code! Adding the same paths to many projects can lead to problems.

Issue History

Date Modified Username Field Change
2017-08-27 00:59 Benito van der Zander New Issue
2017-08-27 00:59 Benito van der Zander File Added: Screenshot_20170827_005543.png
2017-08-27 14:03 Juha Manninen Relationship added related to 0032343
2017-08-27 14:13 Juha Manninen LazTarget => -
2017-08-27 14:13 Juha Manninen Note Added: 0102437
2017-08-27 14:13 Juha Manninen Status new => resolved
2017-08-27 14:13 Juha Manninen Resolution open => no change required
2017-08-27 14:13 Juha Manninen Assigned To => Juha Manninen
2017-08-27 15:08 Benito van der Zander Note Added: 0102441
2017-08-27 15:08 Benito van der Zander Status resolved => assigned
2017-08-27 15:08 Benito van der Zander Resolution no change required => reopened
2017-08-27 15:27 Juha Manninen Note Added: 0102442
2017-08-28 13:13 Juha Manninen Note Edited: 0102442 View Revisions
2017-08-28 18:54 Ondrej Pokorny Relationship added related to 0029200
2017-08-28 18:56 Ondrej Pokorny Note Added: 0102472
2017-08-28 18:57 Ondrej Pokorny Note Edited: 0102472 View Revisions
2017-09-01 19:24 Juha Manninen Note Added: 0102573
2017-09-02 09:26 Juha Manninen Note Edited: 0102573 View Revisions
2017-09-02 09:27 Juha Manninen Note Edited: 0102573 View Revisions
2017-09-02 09:31 Juha Manninen Note Edited: 0102573 View Revisions
2017-09-10 23:58 Benito van der Zander File Added: project1.zip
2017-09-11 00:00 Benito van der Zander Note Added: 0102768
2017-10-08 13:34 Juha Manninen Note Added: 0103254
2017-10-08 13:34 Juha Manninen Status assigned => resolved
2017-10-08 13:34 Juha Manninen Resolution reopened => fixed
2017-10-21 12:46 Juha Manninen Relationship added related to 0032591