Recent

Author Topic: AnchorDocking fails using Lazarus Trunk  (Read 10458 times)

dsiders

  • Hero Member
  • *****
  • Posts: 1045
AnchorDocking fails using Lazarus Trunk
« on: June 03, 2021, 01:25:16 am »
I did an install of 2.0.12 (FPC 3.2.0) and applied Lazarus SVN trunk to it. Now, when I try to install AnchorDocking the IDE fails to restart after building. There were no error when I compiled the run-time and design-time packages. After building the IDE, it restarts but hangs after displaying only a wireframe outline of the docked IDE.  Has to be killed using Task Manager.

I've tinkered with everything I can think of... to no avail. Any ideas?

Using Windows 8.1 64-bit, FPC 3.2.0, Lazarus trunk revision 65166.
Preview Lazarus 3.99 documentation at: https://dsiders.gitlab.io/lazdocsnext

af0815

  • Hero Member
  • *****
  • Posts: 1284
Re: AnchorDocking fails using Lazarus Trunk
« Reply #1 on: June 03, 2021, 07:49:56 am »
Try to start Lazarus from commandline. Normal here are more infos. You can also use the the commandline switch --debug-log for more infos.
regards
Andreas

dsiders

  • Hero Member
  • *****
  • Posts: 1045
Re: AnchorDocking fails using Lazarus Trunk
« Reply #2 on: June 03, 2021, 03:48:05 pm »
Try to start Lazarus from commandline. Normal here are more infos. You can also use the the commandline switch --debug-log for more infos.

Thanks for the suggestion. Will try later today, and follow up as needed.
Preview Lazarus 3.99 documentation at: https://dsiders.gitlab.io/lazdocsnext

dsiders

  • Hero Member
  • *****
  • Posts: 1045
Re: AnchorDocking fails using Lazarus Trunk
« Reply #3 on: June 04, 2021, 02:04:20 am »
Try to start Lazarus from commandline. Normal here are more infos. You can also use the the commandline switch --debug-log for more infos.


Finally got around to trying debug-log. Output follows:

Code: Text  [Select][+][-]
  1. Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] PrimaryConfigPath="C:\Users\Don\AppData\Local\lazarus"
  2. Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] SecondaryConfigPath="C:\lazarus"
  3. Hint: (lazarus) [TBuildManager.SetBuildTarget] Old=x86_64-win64-win32 New=x86_64-win64-win32 Changed: OS/CPU=True LCL=False
  4. TApplication.HandleException: EAccessViolation
  5. Access violation
  6.   Stack trace:
  7.   $0000000000000000
  8.   $0000000100B0494C  DRAW,  line 6521 of anchordocking.pas
  9.   $0000000100B050E4  PAINT,  line 6609 of anchordocking.pas
  10.   $00000001001B4B72  PAINTWINDOW,  line 123 of include/customcontrol.inc
  11.   $000000010019E45F  PAINTHANDLER,  line 4857 of include/wincontrol.inc
  12.   $00000001001A22E5  WMPAINT,  line 6836 of include/wincontrol.inc
  13.   $00000001001B4A87  WMPAINT,  line 103 of include/customcontrol.inc
  14.   $00000001000111F1
  15.   $00000001001AB4D1  WNDPROC,  line 2282 of include/control.inc
  16.   $000000010019F7B9  WNDPROC,  line 5429 of include/wincontrol.inc
  17.   $0000000100281C69  DELIVERMESSAGE,  line 112 of lclmessageglue.pas
  18.   $000000010017CD71  SENDPAINTMESSAGE,  line 745 of win32/win32callback.inc
  19.   $0000000100180F69  DOWINDOWPROC,  line 2354 of win32/win32callback.inc
  20.   $0000000100182080  WINDOWPROC,  line 2771 of win32/win32callback.inc
  21.   $00007FF81E333F40
  22.   $00007FF81E333902
  23.   $00007FF81E3339CE
  24. FreeFormEditor: FormEditor1=TFormEditor
  25. [TJITComponentList.DestroyJITComponent] ERROR destroying component Error: Access violation
  26.   Stack trace:
  27.   $00000001004A9F2F  SETCUSTOMFORM,  line 1168 of ../designer/controlselection.pp
  28.   $00000001004AD968  DELETE,  line 2291 of ../designer/controlselection.pp
  29.   $00000001004AD888  REMOVE,  line 2272 of ../designer/controlselection.pp
  30.   $00000001004AAE3D  NOTIFICATION,  line 1456 of ../designer/controlselection.pp
  31.   $00000001000B40F7
  32.   $000000010022633B  DESTROY,  line 152 of lclclasses.pp
  33.   $00000001001B2479  DESTROY,  line 5189 of include/control.inc
  34.   $00000001001A1DD7  DESTROY,  line 6653 of include/wincontrol.inc
  35.   $00000001001B4827  DESTROY,  line 40 of include/customcontrol.inc
  36.   $000000010003B787  DESTROY,  line 354 of include/scrollingwincontrol.inc
  37.   $000000010003CBF9  DESTROY,  line 137 of include/customform.inc
  38.   $0000000100010CBB
  39.   $00000001004811AF  DESTROYJITCOMPONENT,  line 780 of ../designer/jitforms.pp
  40.   $0000000100480F13  DESTROY,  line 731 of ../designer/jitforms.pp
  41.   $0000000100010CBB
  42.   $00000001000307F7
  43.   $000000010049FC6D  DESTROY,  line 530 of customformeditor.pp
  44. TCustomFormEditor.JITListException List.CurReadStreamClass=nil nil

Not sure how to solve it. May have to bug report this one.

It's hard to believe no one else has used 2.0.12 with Lazarus trunk.

Preview Lazarus 3.99 documentation at: https://dsiders.gitlab.io/lazdocsnext

Gustavo 'Gus' Carreno

  • Hero Member
  • *****
  • Posts: 1090
  • Professional amateur ;-P
Re: AnchorDocking fails using Lazarus Trunk
« Reply #4 on: June 04, 2021, 05:03:34 am »
Hey dsiders,

I've had major issues with Anchor Docking and the generics implementation that comes with sparta.

On fpcupdeluxe I have this patch I apply for versions below 2.1:
Code: Diff  [Select][+][-]
  1. Index: components/sparta/mdi/sparta_mdi.lpk
  2. ===================================================================
  3. --- components/sparta/mdi/sparta_mdi.lpk        (revision 61673)
  4. +++ components/sparta/mdi/sparta_mdi.lpk        (working copy)
  5. @@ -46,16 +46,13 @@
  6.          <UnitName Value="sparta_abstractresizer"/>
  7.        </Item8>
  8.      </Files>
  9. -    <RequiredPkgs Count="3">
  10. +    <RequiredPkgs Count="2">
  11.        <Item1>
  12. -        <PackageName Value="sparta_Generics"/>
  13. +        <PackageName Value="LCL"/>
  14.        </Item1>
  15.        <Item2>
  16. -        <PackageName Value="LCL"/>
  17. +        <PackageName Value="FCL"/>
  18.        </Item2>
  19. -      <Item3>
  20. -        <PackageName Value="FCL"/>
  21. -      </Item3>
  22.      </RequiredPkgs>
  23.      <UsageOptions>
  24.        <UnitPath Value="$(PkgOutDir)"/>
  25. Index: components/sparta/toolsapi/sparta_toolsapi.lpk
  26. ===================================================================
  27. --- components/sparta/toolsapi/sparta_toolsapi.lpk      (revision 61673)
  28. +++ components/sparta/toolsapi/sparta_toolsapi.lpk      (working copy)
  29. @@ -9,7 +9,7 @@
  30.        <PathDelim Value="\"/>
  31.        <SearchPaths>
  32.          <OtherUnitFiles Value="source"/>
  33. -        <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)\"/>
  34. +        <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
  35.        </SearchPaths>
  36.      </CompilerOptions>
  37.      <Files Count="3">
  38. @@ -26,16 +26,13 @@
  39.          <UnitName Value="DesignMenus"/>
  40.        </Item3>
  41.      </Files>
  42. -    <RequiredPkgs Count="3">
  43. +    <RequiredPkgs Count="2">
  44.        <Item1>
  45. -        <PackageName Value="sparta_Generics"/>
  46. +        <PackageName Value="IDEIntf"/>
  47.        </Item1>
  48.        <Item2>
  49. -        <PackageName Value="IDEIntf"/>
  50. +        <PackageName Value="FCL"/>
  51.        </Item2>
  52. -      <Item3>
  53. -        <PackageName Value="FCL"/>
  54. -      </Item3>
  55.      </RequiredPkgs>
  56.      <UsageOptions>
  57.        <UnitPath Value="$(PkgOutDir)"/>
  58.  

I'm not sure that this is your problem, or even if it will solve your problem, but I've had success and no more issues after I applied this patch.

Cheers,
Gus
Lazarus 3.99(main) FPC 3.3.1(main) Ubuntu 23.10 64b Dark Theme
Lazarus 3.0.0(stable) FPC 3.2.2(stable) Ubuntu 23.10 64b Dark Theme
http://github.com/gcarreno

dsiders

  • Hero Member
  • *****
  • Posts: 1045
Re: AnchorDocking fails using Lazarus Trunk
« Reply #5 on: June 04, 2021, 07:10:52 am »
Hey dsiders,

I've had major issues with Anchor Docking and the generics implementation that comes with sparta.

On fpcupdeluxe I have this patch I apply for versions below 2.1:
Code: Diff  [Select][+][-]
  1. Index: components/sparta/mdi/sparta_mdi.lpk
  2. ===================================================================
  3. --- components/sparta/mdi/sparta_mdi.lpk        (revision 61673)
  4. +++ components/sparta/mdi/sparta_mdi.lpk        (working copy)
  5. @@ -46,16 +46,13 @@
  6.          <UnitName Value="sparta_abstractresizer"/>
  7.        </Item8>
  8.      </Files>
  9. -    <RequiredPkgs Count="3">
  10. +    <RequiredPkgs Count="2">
  11.        <Item1>
  12. -        <PackageName Value="sparta_Generics"/>
  13. +        <PackageName Value="LCL"/>
  14.        </Item1>
  15.        <Item2>
  16. -        <PackageName Value="LCL"/>
  17. +        <PackageName Value="FCL"/>
  18.        </Item2>
  19. -      <Item3>
  20. -        <PackageName Value="FCL"/>
  21. -      </Item3>
  22.      </RequiredPkgs>
  23.      <UsageOptions>
  24.        <UnitPath Value="$(PkgOutDir)"/>
  25. Index: components/sparta/toolsapi/sparta_toolsapi.lpk
  26. ===================================================================
  27. --- components/sparta/toolsapi/sparta_toolsapi.lpk      (revision 61673)
  28. +++ components/sparta/toolsapi/sparta_toolsapi.lpk      (working copy)
  29. @@ -9,7 +9,7 @@
  30.        <PathDelim Value="\"/>
  31.        <SearchPaths>
  32.          <OtherUnitFiles Value="source"/>
  33. -        <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)\"/>
  34. +        <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
  35.        </SearchPaths>
  36.      </CompilerOptions>
  37.      <Files Count="3">
  38. @@ -26,16 +26,13 @@
  39.          <UnitName Value="DesignMenus"/>
  40.        </Item3>
  41.      </Files>
  42. -    <RequiredPkgs Count="3">
  43. +    <RequiredPkgs Count="2">
  44.        <Item1>
  45. -        <PackageName Value="sparta_Generics"/>
  46. +        <PackageName Value="IDEIntf"/>
  47.        </Item1>
  48.        <Item2>
  49. -        <PackageName Value="IDEIntf"/>
  50. +        <PackageName Value="FCL"/>
  51.        </Item2>
  52. -      <Item3>
  53. -        <PackageName Value="FCL"/>
  54. -      </Item3>
  55.      </RequiredPkgs>
  56.      <UsageOptions>
  57.        <UnitPath Value="$(PkgOutDir)"/>
  58.  

I'm not sure that this is your problem, or even if it will solve your problem, but I've had success and no more issues after I applied this patch.

Cheers,
Gus

Thanks for that... but I'm not using Sparta. The error is in the components/anchordocking package and its interaction with the IDE.
Preview Lazarus 3.99 documentation at: https://dsiders.gitlab.io/lazdocsnext

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4458
  • I like bugs.
Re: AnchorDocking fails using Lazarus Trunk
« Reply #6 on: June 04, 2021, 08:19:37 am »
I did an install of 2.0.12 (FPC 3.2.0) and applied Lazarus SVN trunk to it.
Does it mean you copied trunk sources on top of 2.0.12 sources?
It is not a good idea although I don't know if it causes this particular problem. You should download trunk sources to a dedicated directory and build it with an installed FPC. Just run "make" from console. It works also on Windows, "make" binary is provided by FPC.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

dsiders

  • Hero Member
  • *****
  • Posts: 1045
Re: AnchorDocking fails using Lazarus Trunk
« Reply #7 on: June 04, 2021, 03:09:05 pm »
I did an install of 2.0.12 (FPC 3.2.0) and applied Lazarus SVN trunk to it.
Does it mean you copied trunk sources on top of 2.0.12 sources?
It is not a good idea although I don't know if it causes this particular problem. You should download trunk sources to a dedicated directory and build it with an installed FPC. Just run "make" from console. It works also on Windows, "make" binary is provided by FPC.

I deleted all source directories, and checked out trunk. svn stat shows no issues. I used make clean bigide to rebuild. No errors there either.

No problems until I install anchordockingdsgn.lpk.
Preview Lazarus 3.99 documentation at: https://dsiders.gitlab.io/lazdocsnext

Gustavo 'Gus' Carreno

  • Hero Member
  • *****
  • Posts: 1090
  • Professional amateur ;-P
Re: AnchorDocking fails using Lazarus Trunk
« Reply #8 on: June 04, 2021, 06:25:54 pm »
Hey dsiders,

Thanks for that... but I'm not using Sparta. The error is in the components/anchordocking package and its interaction with the IDE.

Well it's not you that I'm worried about.

Anchor Docking uses Sparta for the form docking. At least if you install it with the default settings.

So, Lazarus, not you, is using one of Sparta's IDE components when Anchor Docking is installed and that's why I've mentioned the generics.

But I do have to say that my issues popped up while compiling, so maybe you got a source version where the Sparta component issue is already solved.

I dunno, I just thought it would be a nice thing to mention in case it could be the culprit.

Cheers,
Gus
Lazarus 3.99(main) FPC 3.3.1(main) Ubuntu 23.10 64b Dark Theme
Lazarus 3.0.0(stable) FPC 3.2.2(stable) Ubuntu 23.10 64b Dark Theme
http://github.com/gcarreno

dsiders

  • Hero Member
  • *****
  • Posts: 1045
Re: AnchorDocking fails using Lazarus Trunk
« Reply #9 on: June 05, 2021, 02:07:20 am »
Hey dsiders,

Thanks for that... but I'm not using Sparta. The error is in the components/anchordocking package and its interaction with the IDE.

Well it's not you that I'm worried about.

Anchor Docking uses Sparta for the form docking. At least if you install it with the default settings.

So, Lazarus, not you, is using one of Sparta's IDE components when Anchor Docking is installed and that's why I've mentioned the generics.

But I do have to say that my issues popped up while compiling, so maybe you got a source version where the Sparta component issue is already solved.

I dunno, I just thought it would be a nice thing to mention in case it could be the culprit.

Cheers,
Gus

It's not Sparta. I've deleted all of the source in components/sparta directories, and both the run-time and design-time packages in components/anchordocking still compile. They just don't work after installation. They have no dependency on Sparta.
Preview Lazarus 3.99 documentation at: https://dsiders.gitlab.io/lazdocsnext

Gustavo 'Gus' Carreno

  • Hero Member
  • *****
  • Posts: 1090
  • Professional amateur ;-P
Re: AnchorDocking fails using Lazarus Trunk
« Reply #10 on: June 05, 2021, 07:46:14 am »
Hey dsiders,

It's not Sparta. I've deleted all of the source in components/sparta directories, and both the run-time and design-time packages in components/anchordocking still compile. They just don't work after installation. They have no dependency on Sparta.

Hummm, that's news to me. Thanks for getting back with this. I was under the impression that Anchor Docking always depended on the Sparta stuff to anchor the form.
I need to re-evaluate my knowledge of this thanks to you!!

There's a new component to dock the form, but it's only available on trunk. I need to do another deep dive on this to refresh my knowledge.

Thanks, dsider, for doing the Sparta cleanup/test. I really appreciate you taking my suggestion even if it wasn't a solution at all.

Cheers,
Gus
Lazarus 3.99(main) FPC 3.3.1(main) Ubuntu 23.10 64b Dark Theme
Lazarus 3.0.0(stable) FPC 3.2.2(stable) Ubuntu 23.10 64b Dark Theme
http://github.com/gcarreno

af0815

  • Hero Member
  • *****
  • Posts: 1284
Re: AnchorDocking fails using Lazarus Trunk
« Reply #11 on: June 05, 2021, 08:17:07 am »
martin_fr made a new component without need of the sparta components and they now deprecated for newer Lazarus. You can get information about the new component her in forum and the greman forum too. I have this installed for a lot of weeks and no problem. There is a package for 'older' versions of Lazarus too.

I have no problem, if i remove all depencied to sparta and install the new package.

Quote
It's hard to believe no one else has used 2.0.12 with Lazarus trunk.
This sentence is nonsense for me. I can use Lazarus 2.0.12 with fpc 3.2.0 OR Lazarus Trunk with fpc 3.2.0. A described before, mixing of Lazarus is a no-go.

If you remove an old version of Lazarus dont forget to remove all the objectfiles too. Sometimes i have found, a 'make clean' did not found all old files and this make confusion. Normal, if i change the svn path, i remove ALL and build all from ground up. In times of OPM (and fpcupdeluxe) i am as fast as searching for problems in the installation. 

With fpcupdeluxe + OPM i have always a running system and can test other combination without sideeffects.
regards
Andreas

PascalDragon

  • Hero Member
  • *****
  • Posts: 5444
  • Compiler Developer
Re: AnchorDocking fails using Lazarus Trunk
« Reply #12 on: June 05, 2021, 10:57:05 am »
It's not Sparta. I've deleted all of the source in components/sparta directories, and both the run-time and design-time packages in components/anchordocking still compile. They just don't work after installation. They have no dependency on Sparta.

Hummm, that's news to me. Thanks for getting back with this. I was under the impression that Anchor Docking always depended on the Sparta stuff to anchor the form.
I need to re-evaluate my knowledge of this thanks to you!!

Sparta is only required for the (old) Docked Form Editor. Anchor Docking itself never required it as it's way older.

martin_fr made a new component without need of the sparta components and they now deprecated for newer Lazarus. You can get information about the new component her in forum and the greman forum too. I have this installed for a lot of weeks and no problem. There is a package for 'older' versions of Lazarus too.

It's Michl, not martin_fr who made that.

Gustavo 'Gus' Carreno

  • Hero Member
  • *****
  • Posts: 1090
  • Professional amateur ;-P
Re: AnchorDocking fails using Lazarus Trunk
« Reply #13 on: June 05, 2021, 11:12:47 am »
Hey PascalDragon,

Sparta is only required for the (old) Docked Form Editor. Anchor Docking itself never required it as it's way older.

Ahhh, that makes sense.
I guess that in my mind I made an incorrect association due to the fact that when I installed Anchor Docking, Sparta was involved.
But the fact that Anchor Docking and the Docked Form Editor are separate makes more sense.

Thanks PascalDragon, as always a trove of dis-ambiguity :)

And to be honest I've unhitched the forms in 2.0.12 and below but I'm using the new Docked Form Editor on trunk and it has behaved very well.
My main issue with the old one is the fact that it always entered in drag to select mode if I didn't do a long click on a component.
Maybe due to my computer being so crap, but it irritated me to no end...
Problem solved with the new version. If only I could figure out how to use that on 2.0.12 and below.

Cheers,
Gus
Lazarus 3.99(main) FPC 3.3.1(main) Ubuntu 23.10 64b Dark Theme
Lazarus 3.0.0(stable) FPC 3.2.2(stable) Ubuntu 23.10 64b Dark Theme
http://github.com/gcarreno

af0815

  • Hero Member
  • *****
  • Posts: 1284
Re: AnchorDocking fails using Lazarus Trunk
« Reply #14 on: June 05, 2021, 02:27:30 pm »
It's Michl, not martin_fr who made that.
Sorry for my mistake. All honor have to go to Michl.
regards
Andreas

 

TinyPortal © 2005-2018