Recent

Author Topic: Lazarus 2.2.6 (and trunk) bails out at project menu selection (no error)  (Read 1952 times)

TRon

  • Hero Member
  • *****
  • Posts: 3658
Lazarus 2.2.6, linux 64-bit, gtk.

installed AnchorDockingDsgn
rebuild and startup
rearranged windows (note that the components window was mistakenly put as separate Window, no idea if that is the cause).
locked windows
turned off showheaders
Whenever I select an item from the project wizard window, Lazarus bails out on me with no (visible) error.

Running startLazarus from terminal:
Code: [Select]
/startlazarus --pcp=/home/apps/lazarus/2.2.6/.lazconfig --debug
Gtk-Message: 11:30:26.999: Failed to load module "atk-bridge"
Adding "--pcp=/home/apps/lazarus/2.2.6/.lazconfig" as a parameter
Adding "--debug" as a parameter
SetPrimaryConfigPath NewValue="/home/apps/lazarus/2.2.6/.lazconfig" -> "/home/apps/lazarus/2.2.6/.lazconfig"
Info: (startlazarus) [TLazarusManager.Run] starting /home/apps/lazarus/2.2.6/lazarus ...
Info: (startlazarus) [TLazarusManager.Run] exe/home/apps/lazarus/2.2.6/lazarus Params=[--started-by-startlazarus
--no-splash-screen
--pcp=/home/apps/lazarus/2.2.6/.lazconfig
--debug-log=/home/tron/.lazarus/debug.log
--debug
--force-new-instance
]
Gtk-Message: 11:30:27.312: Failed to load module "atk-bridge"
SetPrimaryConfigPath NewValue="/home/apps/lazarus/2.2.6/.lazconfig" -> "/home/apps/lazarus/2.2.6/.lazconfig"
Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] PrimaryConfigPath="/home/apps/lazarus/2.2.6/.lazconfig"
Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] SecondaryConfigPath="/etc/lazarus"
Looking for code tools config file:  "/home/apps/lazarus/2.2.6/.lazconfig/codetoolsoptions.xml"
NOTE: codetools config file not found - using defaults
Warning: (lazarus) fppkg not properly configured.
SearchLazarusDirectoryCandidates Value=.. File=/home/apps/lazarus/2.2.6
SearchLazarusDirectoryCandidates Value=/home/apps/lazarus/2.2.6 File=/home/apps/lazarus/2.2.6
SearchLazarusDirectoryCandidates Value=. File=/home/apps/lazarus/2.2.6/.lazconfig
SearchLazarusDirectoryCandidates Value=/usr/share/lazarus File=/usr/share/lazarus
SearchLazarusDirectoryCandidates Value=/usr/local/share/lazarus File=/usr/local/share/lazarus
SearchLazarusDirectoryCandidates Value=/usr/local/lib/lazarus File=/usr/local/lib/lazarus
SearchLazarusDirectoryCandidates Value=/usr/local/lazarus File=/usr/local/lazarus
SearchLazarusDirectoryCandidates Value=/usr/lib/lazarus File=/usr/lib/lazarus
SearchLazarusDirectoryCandidates Value=/usr/lib/lazarus/2.2.6 File=/usr/lib/lazarus/2.2.6
SearchLazarusDirectoryCandidates Value=~/pascal/lazarus File=/home/tron/pascal/lazarus
SearchLazarusDirectoryCandidates Value=~/lazarus File=/home/tron/lazarus
SearchCompilerCandidates Value=fpc File=/home/scripts/fpc
SearchCompilerCandidates Value=ppcx64 File=
TEnvironmentOptions.GetParsedValue circular macro dependency: CompPath
SearchCompilerCandidates Value=$(CompPath) File=
SearchCompilerCandidates Value=/usr/local/bin/fpc File=/usr/local/bin/fpc
SearchCompilerCandidates Value=/usr/bin/fpc File=/usr/bin/fpc
SearchCompilerCandidates Value=/opt/fpc/fpc File=/opt/fpc/fpc
SearchCompilerCandidates Value=$(LazarusDir)/fpc/3.2.2/bin/x86_64-linux/fpc File=/home/apps/lazarus/2.2.6/fpc/3.2.2/bin/x86_64-linux/fpc
SearchCompilerCandidates Value=$(LazarusDir)/fpc/bin/x86_64-linux/fpc File=/home/apps/lazarus/2.2.6/fpc/bin/x86_64-linux/fpc
SearchCompilerCandidates Value=/usr/local/bin/fpc File=/usr/local/bin/fpc
SearchCompilerCandidates Value=/usr/bin/fpc File=/usr/bin/fpc
SearchCompilerCandidates Value=/opt/fpc/fpc File=/opt/fpc/fpc
Hint: [TPCTargetConfigCache.NeedsUpdate] TargetOS="" TargetCPU="" Options="" compiler file changed "/home/scripts/fpc" FileAge=1671407636 StoredAge=0
Hint: [TPCTargetConfigCache.NeedsUpdate] /home/scripts/fpc TargetOS= TargetCPU= CompilerOptions= ExtraOptions= PATH=/home/scripts:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
Hint: (lazarus) [RunTool] "/home/scripts/fpc" "-iWTOTP"
Hint: (lazarus) [RunTool] "/home/scripts/fpc" "-va" "compilertest.pas" "-Fr/home/apps/lazarus/2.2.6/components/codetools/fpc.errore.msg"
Hint: [TPCTargetConfigCache.Update] has changed
Hint: (lazarus) [TBuildManager.SetBuildTarget] Old=x86_64-linux-gtk2 New=x86_64-linux-gtk2 Changed: OS/CPU=True LCL=False
SearchFPCSrcDirCandidates Value=/home/apps/fpc/3.2.2/source File=/home/apps/fpc/3.2.2/source/
SearchFPCSrcDirCandidates Value=$(LazarusDir)/fpc/$(FPCVer)/source File=/home/apps/lazarus/2.2.6/fpc/3.2.2/source/
SearchFPCSrcDirCandidates Value=$Path($(CompPath))/../../source File=/source/
SearchFPCSrcDirCandidates Value=/usr/share/fpcsrc/$(FPCVer) File=/usr/share/fpcsrc/3.2.2/
SearchFPCSrcDirCandidates Value=/usr/share/fpcsrc File=/usr/share/fpcsrc/
SearchFPCSrcDirCandidates Value=/usr/local/share/fpcsrc File=/usr/local/share/fpcsrc/
SearchFPCSrcDirCandidates Value=/usr/fpcsrc File=/usr/fpcsrc/
SearchFPCSrcDirCandidates Value=/usr/share/fpc/src File=/usr/share/fpc/src/
SearchFPCSrcDirCandidates Value=/usr/fpc/src File=/usr/fpc/src/
SearchFPCSrcDirCandidates Value=/usr/local/fpc/src File=/usr/local/fpc/src/
SearchFPCSrcDirCandidates Value=/usr/local/share/fpc/src File=/usr/local/share/fpc/src/
SearchFPCSrcDirCandidates Value=/usr/local/src/fpc File=/usr/local/src/fpc/
SearchFPCSrcDirCandidates Value=/usr/lib/fpc/src File=/usr/lib/fpc/src/
SearchFPCSrcDirCandidates Value=/usr/local/lib/fpc/src File=/usr/local/lib/fpc/src/
SearchFPCSrcDirCandidates Value=/vol/fpc/src File=/vol/fpc/src/
SearchFPCSrcDirCandidates Value=/vol/lib/fpc/src File=/vol/lib/fpc/src/
SearchFPCSrcDirCandidates Value=/usr/src/fpc File=/usr/src/fpc/
SearchFPCSrcDirCandidates Value=/vol/src/fpc File=/vol/src/fpc/
SearchMakeExeCandidates Value=make File=/usr/bin/make
SearchDebuggerCandidates Value=gdb File=/usr/bin/gdb
SearchDebuggerCandidates Value=/usr/bin/gdb File=/usr/bin/gdb
SearchDebuggerCandidates Value=/usr/local/bin/gdb File=/usr/local/bin/gdb
SearchDebuggerCandidates Value=/opt/fpc/gdb File=/opt/fpc/gdb
NOTE: help options config file not found - using defaults

(lazarus:11049): Gtk-CRITICAL **: 11:30:37.205: IA__gtk_window_set_keep_above: assertion 'GTK_IS_WINDOW (window)' failed

(lazarus:11049): Gtk-CRITICAL **: 11:30:37.263: IA__gtk_window_set_keep_above: assertion 'GTK_IS_WINDOW (window)' failed

(lazarus:11049): Gtk-CRITICAL **: 11:30:37.264: IA__gtk_window_set_keep_above: assertion 'GTK_IS_WINDOW (window)' failed

(lazarus:11049): Gtk-CRITICAL **: 11:30:37.264: IA__gtk_window_set_keep_above: assertion 'GTK_IS_WINDOW (window)' failed

(lazarus:11049): Gtk-CRITICAL **: 11:30:37.264: IA__gtk_window_set_keep_above: assertion 'GTK_IS_WINDOW (window)' failed

(lazarus:11049): Gtk-CRITICAL **: 11:30:37.264: IA__gtk_window_set_keep_above: assertion 'GTK_IS_WINDOW (window)' failed

(lazarus:11049): Gtk-CRITICAL **: 11:30:37.264: IA__gtk_window_set_keep_above: assertion 'GTK_IS_WINDOW (window)' failed

(lazarus:11049): Gtk-CRITICAL **: 11:30:37.264: IA__gtk_window_set_keep_above: assertion 'GTK_IS_WINDOW (window)' failed
----------------
The program 'lazarus' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
  (Details: serial 13888 error_code 3 request_code 12 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)

fwiw, I used the same procedure (except for the separate components window) for Lazarus 2.2.4 with no issues.

Is someone able to replicate ? and can it be solved ? (e.g. how to get Lazarus 2.2.6 working again (*) )

(*) edit: I am aware of the existence of the old build and the fact that I can rebuild Lazarus from source or in worse case scenario do a new install. That is besides the point as an end user should be able to fix this problem within Lazarus itself, by means of editing one of the options/configuration files or providing an option. All of which I am not aware off how to do it as I was unable to find any relevant information on that.



btw: In the terminal output it reads:
Quote
--debug-log=/home/tron/.lazarus/debug.log
The wiki reads:
Quote
--debug
    if given, startlazarus calls the IDE with "--debug-log=<primaryconfigpath>/debug.log".
Which one is (or should be)  the correct one ?

fwiw: There is no debug.log file for me in either of the two mentioned locations.

edit: added trunk to topic
« Last Edit: June 18, 2023, 03:35:14 pm by TRon »
This tagline is powered by AI (AI advertisement: Free Pascal the only programming language that matters)

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4541
  • I like bugs.
Re: Lazarus 2.2.6 bails out at project menu selection (no error)
« Reply #1 on: June 18, 2023, 11:45:57 am »
Code: [Select]
The program 'lazarus' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
That is typical for GTK2. Its events happen in a different order compared to other widgetsets and cause weird problems. Very difficult to spot what causes it in LCL code.

Quote

btw: In the terminal output it reads:
Quote
--debug-log=/home/tron/.lazarus/debug.log
The wiki reads:
Quote
--debug
    if given, startlazarus calls the IDE with "--debug-log=<primaryconfigpath>/debug.log".
Which one is (or should be)  the correct one ?
They are equal. Primary config path is "/home/tron/.lazarus/".

Quote
fwiw: There is no debug.log file for me in either of the two mentioned locations.
Maybe the GTK2 crash prevented saving it.

The "main" development branch is much ahead of 2.2.6 now. The issue should be tested there and reported if you find steps to reproduce.
A new major version will be forked soon into its own "fixes" branch which then goes into a bug fixing mode.
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

TRon

  • Hero Member
  • *****
  • Posts: 3658
Re: Lazarus 2.2.6 bails out at project menu selection (no error)
« Reply #2 on: June 18, 2023, 12:28:45 pm »
That is typical for GTK2. Its events happen in a different order compared to other widgetsets and cause weird problems. Very difficult to spot what causes it in LCL code.
Understandable but the current Lazarus configuration makes the issue 100% reproducible. Each and every time I start up Lazarus and select any of the options in the project module wizard it crashes in the same manner which itself has a strong indication that something in the configuration is causing (leads up to) the crash. Whether that be Lazarus itself the AnchorDockingDsgn package and/or the interaction with gtk.

You have already stated your opinion with regards to the (short) future (and to which I agree) but mention the above just in case it is worthwhile to pursue.

Quote
They are equal. Primary config path is "/home/tron/.lazarus/".
Except for the minor detail that I invoke(d) Lazarus with "/startlazarus --pcp=/home/apps/lazarus/2.2.6/.lazconfig" thus I expect the primary path to have changed to that location. So I have to conclude that either the wiki is wrong or the functionality is not implemented as advertised ? (I am aware that wiki <> documentation so that statement can be argued)

Same pursue note applies.

Quote
Maybe the GTK2 crash prevented saving it.
If worthwhile pursuing then additional hints would be appreciated with regards to how that could be used to gain more information that might be helpful.

Quote
The "main" development branch is much ahead of 2.2.6 now. The issue should be tested there and reported if you find steps to reproduce.
Even though I ran into several issues sometimes leading to current described report I have unfortunately not found a 100% reliable method of re-producing. What I can say for sure is that it seems related to AnchorDockingDsgn because especially the crashes happen when something went amiss with re-organizing the docked windows (it is possible to inadvertently create very strange layouts).

Quote
A new major version will be forked soon into its own "fixes" branch which then goes into a bug fixing mode.
Noted. Can't hardly wait  :)

Thank you for your time.
This tagline is powered by AI (AI advertisement: Free Pascal the only programming language that matters)

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4541
  • I like bugs.
Re: Lazarus 2.2.6 bails out at project menu selection (no error)
« Reply #3 on: June 18, 2023, 12:46:09 pm »
Understandable but the current Lazarus configuration makes the issue 100% reproducible. Each and every time I start up Lazarus and select any of the options in the project module wizard it crashes in the same manner which itself has a strong indication that something in the configuration is causing (leads up to) the crash. Whether that be Lazarus itself the AnchorDockingDsgn package and/or the interaction with gtk.
Two questions:
1. Does it happen with Lazarus trunk ("main" branch)?
2. Does it happen with a new clean configuration?
Sometimes updating a configuration for a new version does not work perfectly although it should backwards compatible.

Quote
Except for the minor detail that I invoke(d) Lazarus with "/startlazarus --pcp=/home/apps/lazarus/2.2.6/.lazconfig" thus I expect the primary path to have changed to that location. So I have to conclude that either the wiki is wrong or the functionality is not implemented as advertised ? (I am aware that wiki <> documentation so that statement can be argued)
OK. Again test with trunk. It may be fixed already.

Quote
Noted. Can't hardly wait  :)
You don't need to wait. :)
Just use trunk which is very close to the coming new branch. At the moment of forking they will be identical.
In another thread I added a reminder of how to do it, in case people don't know :
 https://forum.lazarus.freepascal.org/index.php/topic,63676.msg482983/topicseen.html#new
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

TRon

  • Hero Member
  • *****
  • Posts: 3658
Re: Lazarus 2.2.6 bails out at project menu selection (no error)
« Reply #4 on: June 18, 2023, 01:14:02 pm »
Simple things first so I'll answer in successive posts (as I am not sure how far I am able to progress today. Apologies for any inconvenience).

Quote
Except for the minor detail that I invoke(d) Lazarus with "/startlazarus --pcp=/home/apps/lazarus/2.2.6/.lazconfig" thus I expect the primary path to have changed to that location. So I have to conclude that either the wiki is wrong or the functionality is not implemented as advertised ? (I am aware that wiki <> documentation so that statement can be argued)
OK. Again test with trunk. It may be fixed already.

Trunk from 5-10 minutes ago outputs for me:

Code: [Select]
./startlazarus --pcp=/media/ramdisk/lazarus/trunk/.lazconfig --debug
Adding "--pcp=/media/ramdisk/lazarus/trunk/.lazconfig" as a parameter
Adding "--debug" as a parameter
SetPrimaryConfigPath NewValue="/media/ramdisk/lazarus/trunk/.lazconfig" -> "/media/ramdisk/lazarus/trunk/.lazconfig"
Info: (startlazarus) [TLazarusManager.Run] starting /media/ramdisk/lazarus/trunk/lazarus ...
Info: (startlazarus) [TLazarusManager.Run] exe=/media/ramdisk/lazarus/trunk/lazarus Params=[--started-by-startlazarus
--no-splash-screen
--pcp=/media/ramdisk/lazarus/trunk/.lazconfig
--debug-log=/home/tron/.lazarus/debug.log
--debug
--force-new-instance
]

Thus Lazarus does take the provided pcp option but the debug-log seems to ignore it and defaults to user home directory.

edit:
I have some nuance to add. The debug.log file is stored in the user home directory when the .lazarus directory exists there (even when using the pcp option as shown in my output) (*). On the second run that I tested with, I removed that .lazarus directory in users home and then it defaults to the location provided in the pcp option.

I have no idea if that (nuanced) behavior is as intended.

(*) I forgot that I manually added the .lazarus directory in user home in the hope it would generate the debug.log file when testing with the crashing 2.2.6 installation.
« Last Edit: June 18, 2023, 01:33:44 pm by TRon »
This tagline is powered by AI (AI advertisement: Free Pascal the only programming language that matters)

paweld

  • Hero Member
  • *****
  • Posts: 1268
Re: Lazarus 2.2.6 bails out at project menu selection (no error)
« Reply #5 on: June 18, 2023, 02:31:27 pm »
try this:
Code: [Select]
./startlazarus --pcp=/media/ramdisk/lazarus/trunk/.lazconfig --debug-log=/media/ramdisk/lazarus/trunk/.lazconfig/debug.log
Best regards / Pozdrawiam
paweld

TRon

  • Hero Member
  • *****
  • Posts: 3658
Re: Lazarus 2.2.6 bails out at project menu selection (no error)
« Reply #6 on: June 18, 2023, 02:31:36 pm »
Understandable but the current Lazarus configuration makes the issue 100% reproducible. Each and every time I start up Lazarus and select any of the options in the project module wizard it crashes in the same manner which itself has a strong indication that something in the configuration is causing (leads up to) the crash. Whether that be Lazarus itself the AnchorDockingDsgn package and/or the interaction with gtk.
Two questions:
Short answers follow. Long description of events below those.

Quote
1. Does it happen with Lazarus trunk ("main" branch)?
When using the old Lazarus 2.2.6 configuration, yes exactly the same.

Quote
2. Does it happen with a new clean configuration?
No. Yes. But do note that I do not know what triggers this particular issue so that part, I can unfortunately not reproduce atm. edit: reproducible steps in post below.

Quote
Sometimes updating a configuration for a new version does not work perfectly although it should backwards compatible.
That is why I never update an existing Lazarus configuration but create a new one from scratch. Each one of my individual Lazarus installations has its own configuration directory and uses its own pcp option. Though having said that, I do slack on occasion with trunk version of Lazarus  :)



I started trunk build Lazarus (./startlazarus --pcp=/media/ramdisk/lazarus/trunk/.lazconfig) and installed package AnchorDockingDsgn.

After the rebuild, I closed Lazarus and started it again in order to see if the anchor docking worked as intended (no modifications to the anchordocking windows were made) and then closed Lazarus again.

Then, copied the contents of my Lazarus 2.2.6 configuration directory to /media/ramdisk/lazarus/trunk/.lazconfig226 and started Lazarus with (./startlazarus --pcp=/media/ramdisk/lazarus/trunk/.lazconfig226)

I got presented with a dialog titled "Incorrect configuration directory found" with a lot of contents explaining that the configuration was previously used by another installation of Lazarus etc.

There are 3 buttons (as also explained by the dialog contents): Update Info, Ignore and Abort. I chose the Ignore option.
Another dialog appears telling that the old configuration will be updated. I can abort and upgrade. I chose the latter.

The 'normal' Lazarus setup dialog appears. Some issue with the debugger back-end that I ignore and start the IDE.

I get another dialog telling me that debugging will be disappointing (ha, when using default debug option fpDebug  :P ). I press ignore.

IDE appears just as with the crashing 2.2.6 installation (anchordocked windows) with presenting the project wizard. I select "new project" which results in a crash just as with Lazarus 2.2.6.
The terminal output:
Code: [Select]
The program 'lazarus' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
  (Details: serial 111963 error_code 3 request_code 12 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)


Then I remove the contents of the lazconfig226 directory and start Lazarus again (./startlazarus --pcp=/media/ramdisk/lazarus/trunk/.lazconfig226)
I go through the IDE setup dialog again and start the IDE.

I do note (just as the first time when starting Lazarus with anchordocking) that the docked IDE window stays 'empty' for a while though in the lower left corner there seem to be some sort of drawing/flickering activity which disappears only then I activate the window by clicking on it and try to move it around. I mention it because that is new behavior to me.

But it does provide me with the initial anchor docked setup just as it appeared when I started Lazarus the first time after the build/installation of the anchordesign package.

In the hope it was useful.

At least I am able to reproduce with using the specific configuration files (I did not think of that). That at least would allow me to (re)build the IDE with debug and try see if that is able to provide more answers.

« Last Edit: June 18, 2023, 03:34:32 pm by TRon »
This tagline is powered by AI (AI advertisement: Free Pascal the only programming language that matters)

TRon

  • Hero Member
  • *****
  • Posts: 3658
Re: Lazarus 2.2.6 bails out at project menu selection (no error)
« Reply #7 on: June 18, 2023, 03:29:15 pm »
Ah, I finally managed to create 100% reproducible steps (at least on my setup)
1. Start fresh Lazarus trunk (bigide in case it matters)
2. at project wizard, create a new (empty) Lazarus project
3. install package AnchorDockingDsgn (Lazarus will rebuild and restart)
4. at the code explorer window, select the components tab and drag it out of the main IDE window so that it becomes a standalone window (on the desktop)
5. Close the project.
6. Close Lazarus
7. Start Lazarus again
8. at the project wizard, create new project (or press any of the other options)
9. crash happens
This tagline is powered by AI (AI advertisement: Free Pascal the only programming language that matters)

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4541
  • I like bugs.
Re: Lazarus 2.2.6 bails out at project menu selection (no error)
« Reply #8 on: June 18, 2023, 03:43:09 pm »
Thus Lazarus does take the provided pcp option but the debug-log seems to ignore it and defaults to user home directory.

edit:
I have some nuance to add. The debug.log file is stored in the user home directory when the .lazarus directory exists there (even when using the pcp option as shown in my output) (*). On the second run that I tested with, I removed that .lazarus directory in users home and then it defaults to the location provided in the pcp option.

I have no idea if that (nuanced) behavior is as intended.
Maybe it is meant to be a feature but it sounds like a bug. Should be reported.

Ah, I finally managed to create 100% reproducible steps (at least on my setup)
1. Start fresh Lazarus trunk (bigide in case it matters)
2. at project wizard, create a new (empty) Lazarus project
3. install package AnchorDockingDsgn (Lazarus will rebuild and restart)
4. at the code explorer window, select the components tab and drag it out of the main IDE window so that it becomes a standalone window (on the desktop)
5. Close the project.
6. Close Lazarus
7. Start Lazarus again
8. at the project wizard, create new project (or press any of the other options)
9. crash happens
This "5. Close the project." is unusual. Maybe the bug was not noticed because it is so seldom used. Normally a project closes when another one is opened or created.
Should be reported!
Mostly Lazarus trunk and FPC 3.2 on Manjaro Linux 64-bit.

TRon

  • Hero Member
  • *****
  • Posts: 3658
Re: Lazarus 2.2.6 bails out at project menu selection (no error)
« Reply #9 on: June 18, 2023, 03:50:07 pm »
try this:
Code: [Select]
./startlazarus --pcp=/media/ramdisk/lazarus/trunk/.lazconfig --debug-log=/media/ramdisk/lazarus/trunk/.lazconfig/debug.log
Thank you for the suggestion paweld.

using...
Code: [Select]
./startlazarus --pcp=/media/ramdisk/lazarus/trunk/.lazconfig --debug-log=/media/ramdisk/lazarus/trunk/.lazconfig/somedebuglog.log... does indeed create the debug file at the location and the name as provided with the --debug-log option.

contents of somedebuglog.log reads:
Code: [Select]
Adding "--pcp=/media/ramdisk/lazarus/trunk/.lazconfig" as a parameter
Adding "--debug-log=/media/ramdisk/lazarus/trunk/.lazconfig/somedebuglog.log" as a parameter
SetPrimaryConfigPath NewValue="/media/ramdisk/lazarus/trunk/.lazconfig" -> "/media/ramdisk/lazarus/trunk/.lazconfig"
Info: (startlazarus) [TLazarusManager.Run] starting /media/ramdisk/lazarus/trunk/lazarus ...
Info: (startlazarus) [TLazarusManager.Run] exe=/media/ramdisk/lazarus/trunk/lazarus Params=[--started-by-startlazarus
--no-splash-screen
--pcp=/media/ramdisk/lazarus/trunk/.lazconfig
--debug-log=/media/ramdisk/lazarus/trunk/.lazconfig/somedebuglog.log
--force-new-instance
]
ns] PrimaryConfigPath="/media/ramdisk/lazarus/trunk/.lazconfig"
Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] SecondaryConfigPath="/etc/lazarus"
Looking for code tools config file:  "/media/ramdisk/lazarus/trunk/.lazconfig/codetoolsoptions.xml"
NOTE: codetools config file not found - using defaults
NOTE: help options config file not found - using defaults
----------------
LAZARUS END - cleaning up ...
FreeFormEditor: FormEditor1=TFormEditor
Hint: (lazarus) [TMainIDE.Destroy] B  -> inherited Destroy... TMainIDE
Hint: (lazarus) [TMainIDE.Destroy] END

But although that does work that was not exactly the issue.

The issue is that Lazarus seem to default to using the user home directory  (if the .lazarus directory exist) even when user overrides the (default) pcp directory.
 
Either the documentation is not correct or the implementation does not follow the documentation.
 
Both options can be considered a bug, the one less evil than the other  ;D

edit: also note that when you provide both --debug and --debug-log to the command that you can see that Lazarus tries to "set" the log directory twice.
« Last Edit: June 18, 2023, 03:59:23 pm by TRon »
This tagline is powered by AI (AI advertisement: Free Pascal the only programming language that matters)

 

TinyPortal © 2005-2018