Recent

Author Topic: Lazarus ide crash after choosing new project  (Read 702 times)

ancamini

  • New member
  • *
  • Posts: 6
Lazarus ide crash after choosing new project
« on: May 12, 2022, 03:24:34 pm »
Have a good day,

this is the first time I write in the forum. Sorry if this is not the rigth place for the topic.
I have 2 installation of Lazarus on different machines but with the same behavior.

When I choose Project | New project | console application lazarus closes instantly.
In common, the 2 Lazarus, have the same settings for ide. Docking forms for all but object inspector.
While I am writing this I have a doubt...I try to dock Object Inspector and now the ide completes the project creation properly.

I have this configuration because I like having form designer visible when changing properties in object inspector.
If Object inspector  is docked switching to it hides form designer.

There is something I can do or try?
Thank to all for your attention...

Lazarus 2.2.0, Fpc 3.2.2 on Linux 64/Arm64

Carlo

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1969
  • Former Delphi 1-7, 10.2 user
Re: Lazarus ide crash after choosing new project
« Reply #1 on: May 13, 2022, 01:37:24 am »
Welcome to the forum!

What package(s) are you using for docking the Lazarus IDE?
Lazarus 2.3, FPC 3.3.1 macOS 12.3.1 x86_64 Xcode 13.4
Lazarus 2.3, FPC 3.3.1 macOS 12.3.1 aarch64 Xcode 13.4

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 7867
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus ide crash after choosing new project
« Reply #2 on: May 13, 2022, 03:33:47 am »
1) Please back up the entire folder
  /home/_yourname_/.lazarus

This has all the settings, and maybe one of those is causing the crash. So having a copy could later hepl.

2) Open a terminal / bash
Start lazarus from the terminal. If it crashes, see if there is any output on the terminal.

3)
gdb lazarus
r

then when the crash happens gdb will likely say some error happened, and lazarus will freeze in gdb.
Type
bt
in gdb, and report the output.

ancamini

  • New member
  • *
  • Posts: 6
Re: Lazarus ide crash after choosing new project
« Reply #3 on: May 13, 2022, 11:47:16 am »
Hi,
here are the answers at your questions:

@trev : <Item23 ID="AnchorDockingDsgn 1.0"/> this is the package as from packages list.

@Martin : launched Lazarus with Object  Inspector undocked from terminal
This is the output before and after opening the new project wizard...

carlo@cab-desk:~/.lazarus$ bin/lazarus
Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] PrimaryConfigPath="/home/carlo/.lazarus"
Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] SecondaryConfigPath="/etc/lazarus"

(lazarus:4990): Gtk-CRITICAL **: 11:34:39.598: IA__gtk_window_set_keep_above: assertion 'GTK_IS_WINDOW (window)' failed

(lazarus:4990): Gtk-CRITICAL **: 11:34:39.614: IA__gtk_window_set_keep_above: assertion 'GTK_IS_WINDOW (window)' failed

(lazarus:4990): Gtk-CRITICAL **: 11:34:39.614: IA__gtk_window_set_keep_above: assertion 'GTK_IS_WINDOW (window)' failed

(lazarus:4990): Gtk-CRITICAL **: 11:34:39.614: IA__gtk_window_set_keep_above: assertion 'GTK_IS_WINDOW (window)' failed

(lazarus:4990): Gtk-CRITICAL **: 11:34:39.614: IA__gtk_window_set_keep_above: assertion 'GTK_IS_WINDOW (window)' failed

(lazarus:4990): Gtk-CRITICAL **: 11:34:39.614: IA__gtk_window_set_keep_above: assertion 'GTK_IS_WINDOW (window)' failed
Hint: (lazarus) [TBuildManager.SetBuildTarget] Old=x86_64-linux-gtk2 New=x86_64-linux-gtk2 Changed: OS/CPU=True LCL=False
TDesigner.PrepareFreeDesigner: TheFormEditor=TFormEditor, Designer=TDesigner
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 23194 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.)

Later I will try with gdb...

Thanks for the quick feedback

Carlo

ancamini

  • New member
  • *
  • Posts: 6
Re: Lazarus ide crash after choosing new project
« Reply #4 on: May 13, 2022, 11:54:35 am »
For completeness I try starting lazarus with Object Inspector docked and making the same operations.
The output is this:

carlo@cab-desk:~/.lazarus$ bin/lazarus
Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] PrimaryConfigPath="/home/carlo/.lazarus"
Hint: (lazarus) [TMainIDE.ParseCmdLineOptions] SecondaryConfigPath="/etc/lazarus"

(lazarus:5124): Gtk-CRITICAL **: 11:50:11.717: IA__gtk_window_set_keep_above: assertion 'GTK_IS_WINDOW (window)' failed

(lazarus:5124): Gtk-CRITICAL **: 11:50:11.717: IA__gtk_window_set_keep_above: assertion 'GTK_IS_WINDOW (window)' failed

(lazarus:5124): Gtk-CRITICAL **: 11:50:11.717: IA__gtk_window_set_keep_above: assertion 'GTK_IS_WINDOW (window)' failed

(lazarus:5124): Gtk-CRITICAL **: 11:50:11.717: IA__gtk_window_set_keep_above: assertion 'GTK_IS_WINDOW (window)' failed

(lazarus:5124): Gtk-CRITICAL **: 11:50:11.717: IA__gtk_window_set_keep_above: assertion 'GTK_IS_WINDOW (window)' failed

(lazarus:5124): Gtk-CRITICAL **: 11:50:11.717: IA__gtk_window_set_keep_above: assertion 'GTK_IS_WINDOW (window)' failed

(lazarus:5124): Gtk-CRITICAL **: 11:50:11.717: IA__gtk_window_set_keep_above: assertion 'GTK_IS_WINDOW (window)' failed
Hint: (lazarus) [TBuildManager.SetBuildTarget] Old=x86_64-linux-gtk2 New=x86_64-linux-gtk2 Changed: OS/CPU=True LCL=False
TDesigner.PrepareFreeDesigner: TheFormEditor=TFormEditor, Designer=TDesigner

(lazarus:5124): Gtk-CRITICAL **: 11:50:42.582: IA__gtk_window_set_keep_above: assertion 'GTK_IS_WINDOW (window)' failed
LAZARUS END - cleaning up ...

(lazarus:5124): Gtk-CRITICAL **: 11:50:42.584: IA__gtk_window_set_keep_above: assertion 'GTK_IS_WINDOW (window)' failed

(lazarus:5124): Gtk-CRITICAL **: 11:50:42.587: IA__gtk_window_set_keep_above: assertion 'GTK_IS_WINDOW (window)' failed

(lazarus:5124): Gtk-CRITICAL **: 11:50:42.591: IA__gtk_window_set_keep_above: assertion 'GTK_IS_WINDOW (window)' failed
FreeFormEditor: FormEditor1=TFormEditor
Hint: (lazarus) [TMainIDE.Destroy] B  -> inherited Destroy... TMainIDE
Hint: (lazarus) [TMainIDE.Destroy] END

Carlo

ancamini

  • New member
  • *
  • Posts: 6
Re: Lazarus ide crash after choosing new project
« Reply #5 on: May 13, 2022, 12:04:16 pm »
Sorry for posting another message...reading the output about  'GTK_IS_WINDOW (window)' failed
I am asking myself  if this is a consequence of my  normal layout.

Attached a screenshot of my layout while I am writing code.

Carlo

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 7867
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus ide crash after choosing new project
« Reply #6 on: May 14, 2022, 12:43:43 pm »
1) To be save:

The designer form is not docked? (according to your image that is a "yes it is not docked"...)
- So you do not use any ...SPARTA... package?
- You also do not use the new "DockedFormEditor" package? (which actually should be ok)

2)
(lazarus:5124): Gtk-CRITICAL **: 11:50:11.717: IA__gtk_window_set_keep_above: assertion 'GTK_IS_WINDOW (window)' failed

Taking a guess here.
Could your "code inspector" be set to "stay on top" ?

From the error I would think that some window wants to be "stay on top" => but because the window is docked, that is not possible.


Of course, AnchorDocking should catch that and prevent the error. But if it doesn't yet...

ancamini

  • New member
  • *
  • Posts: 6
Re: Lazarus ide crash after choosing new project
« Reply #7 on: May 14, 2022, 06:33:16 pm »
As you say form designer is not docked.
No Sparta package, attached my packages list.
No DockedFormEditor...found in packages that can be installed.
I do not see any option for setting code explorer to stay on top ( screenshot, switched ide to english for clarity )

If DockedFormEditor is ok i can try it. I presume that I should add it...no need to remove any other packages rigth?

Carlo

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 7867
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus ide crash after choosing new project
« Reply #8 on: May 14, 2022, 09:47:51 pm »
I do not see any option for setting code explorer to stay on top ( screenshot, switched ide to english for clarity )
Ok, seems I was mistaken... Haven't used the code explore in a long while...
Maybe some other window, maybe it's something else.


Quote
If DockedFormEditor is ok i can try it. I presume that I should add it...no need to remove any other packages rigth?

I should say that I do not use any Docking myself. So I have no personal experience.
But DockedFormEditor was made to replace the sparta packages.
And afaik (from what I read) DockedFormEditor  should be use-able.




just searched for fsStayOnTop

- The message window has an option.
- LeakView
- LazReport

But AnchorDocking itself also accesses it. Well it has to remove it, but not sure what else it does.

Then again, maybe my guess is entirely wrong. And maybe it has nothing to do with stay on top at all.

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 7867
  • Debugger - SynEdit - and more
    • wiki
Re: Lazarus ide crash after choosing new project
« Reply #9 on: May 14, 2022, 09:50:24 pm »
Maybe it is "floating windows on top" => if a window is temporary floating, and the flag is not cleared in time...

ancamini

  • New member
  • *
  • Posts: 6
Re: Lazarus ide crash after choosing new project
« Reply #10 on: May 15, 2022, 12:14:43 pm »
Well, i installed DockedFormEditor and it seems to be fine.
This fixes having both the form and ObjectInspector visible at the same time.
Not thoroughly tested ... I'll try with forms with lots of widgets.

The most annoying thing about having ObjectInspector not docked is that when I am in code and press Ctrl-space for hints or code completion, after hitting enter the focus doesn't stay on code but switch to ObjectInspector...

Thanks Martin for your time and suggestions.

Carlo




 

TinyPortal © 2005-2018