Recent

Author Topic: a small window appears  (Read 1338 times)

atell

  • New member
  • *
  • Posts: 9
a small window appears
« on: November 06, 2024, 05:54:00 am »
Hi ,all.
I'm Japanese Developer. I am using of Lazarus 4.0RC1 and fpc 3.2.3 on Raspberry Pi 400(Raspberry Pi OS 64bit).

Code: Pascal  [Select][+][-]
  1. (test001:4940): Gtk-CRITICAL **: --:--:--.---: IA__gtk_widget_hide: assertion 'GTK_IS_WIDGET (widget)' failed
  2. (test001:4940): Gtk-CRITICAL **: --:--:--.---: IA__gtk_widget_destroy: assertion 'GTK_IS_WIDGET (widget)' failed

Firstly, a small window appears when the program is executed. The main program won't start unless I close that window. After closing it, the above widget message appears. In fact, it also appears when you start the Lazarus IDE.

How can I fix this widget error and prevent the small window from appearing before the main program starts?

Please  O:-)

Regard,
Thank you.

atell at Sapporo City, Hokkaido, Japan.

TRon

  • Hero Member
  • *****
  • Posts: 3623
Re: a small window appears
« Reply #1 on: November 06, 2024, 06:03:15 am »
The issue is related to Wayland and an report has already been filed here.

In the ticket itself is an explanation what conditions have to be met to cause this issue thus also indicates what can be done to circumvent it.

fwiw: Wayland is not a finished product.
This tagline is powered by AI (AI advertisement: Free Pascal the only programming language that matters)

atell

  • New member
  • *
  • Posts: 9
Re: a small window appears
« Reply #2 on: November 06, 2024, 06:59:33 am »
Thank you very much. :D

For now, I would like to use the '-disableaccurateframe' option.

I see, 'The Empty Window'...

Thank you again.

Thaddy

  • Hero Member
  • *****
  • Posts: 16178
  • Censorship about opinions does not belong here.
Re: a small window appears
« Reply #3 on: November 06, 2024, 07:57:56 am »
An important side note: Yes, Wayland is something of a moving target, which in my opinion means that it is better to use the work-arounds rather than trying to "fix" code from the Freepascal side. The latter will almost certainly cause more problems once Wayland either supports it properly or denies its use properly as deprecated.
This remark stems from extensive work on Raspberry Pi's in Wayland mode and all the changes that regularly appear when updating the OS.
Only a couple of months ago I used to switch to X, but note that is no longer necessary in most cases and Wayland is definitely an improvement over X. At least it should be, based on the design model. It also means you need to regularly update your OS.
If it bothers you you can still switch to X of course.
If I smell bad code it usually is bad code and that includes my own code.

atell

  • New member
  • *
  • Posts: 9
Re: a small window appears
« Reply #4 on: November 07, 2024, 09:11:23 am »
Thank you, TRon-san, Thaddy-san.  :)

Thank you for your insightful explanation. I also believe that using the options will be beneficial in the long run. However, it is inconvenient that the option settings cannot be automated and are left to the user. Is there perhaps a way to automate the option specification?

Atell.  :)


Thaddy

  • Hero Member
  • *****
  • Posts: 16178
  • Censorship about opinions does not belong here.
Re: a small window appears
« Reply #5 on: November 07, 2024, 09:53:54 am »
@atell
I am firmly stuck in GTK2, but I received some valuable input - by an old collegue that I trust blindly - that switching to Qt 5 as widget set improves things considerably, so maybe that is an option for you? I - finally - decided to test that, but have no reports yet.
Otherwise it is a bit like "caught between a rock and a hard place" if that will translate into Japanese.
« Last Edit: November 07, 2024, 10:01:04 am by Thaddy »
If I smell bad code it usually is bad code and that includes my own code.

TRon

  • Hero Member
  • *****
  • Posts: 3623
Re: a small window appears
« Reply #6 on: November 07, 2024, 01:06:15 pm »
However, it is inconvenient that the option settings cannot be automated and are left to the user. Is there perhaps a way to automate the option specification?
Not that I am aware off.

Because we are talking about a GUI application there is the possibility add the option argument to the menu shortcut (desktop entry) so that it only has to be done once (could perhaps even be automated by an installer of some kind).
This tagline is powered by AI (AI advertisement: Free Pascal the only programming language that matters)

atell

  • New member
  • *
  • Posts: 9
Re: a small window appears
« Reply #7 on: November 08, 2024, 12:54:19 am »
Thank you!  :)

To Thaddy-san:
I have also been interested in Qt and more. :D
 
To TRon-san:
>> could perhaps even be automated by an installer of some kind
The installer, indeed! Exactly right! :P


TRon

  • Hero Member
  • *****
  • Posts: 3623
Re: a small window appears
« Reply #8 on: November 08, 2024, 01:03:54 am »
The installer, indeed! Exactly right! :P
:D

Ofc when for Linux you create a proper package and on windows something similar with msi  ;D

But on a more serious note a 'simple' batch file will usually be able to do the job.
This tagline is powered by AI (AI advertisement: Free Pascal the only programming language that matters)

zeljko

  • Hero Member
  • *****
  • Posts: 1668
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: a small window appears
« Reply #9 on: November 08, 2024, 01:03:57 pm »
Check with commit https://gitlab.com/freepascal.org/lazarus/lazarus/-/commit/54ba042fb2748c71be4506a5735ed3b1db06ce3f , I've added small function to get XDG_SESSION_TYPE, so if it's  wayland small window won't be created/shown.

TRon

  • Hero Member
  • *****
  • Posts: 3623
Re: a small window appears
« Reply #10 on: November 08, 2024, 06:56:19 pm »
Thank you zeljko  👍
This tagline is powered by AI (AI advertisement: Free Pascal the only programming language that matters)

zeljko

  • Hero Member
  • *****
  • Posts: 1668
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: a small window appears
« Reply #11 on: November 08, 2024, 09:02:02 pm »
Write some feedback so I can merge to fixes_4 if it's ok.

atell

  • New member
  • *
  • Posts: 9
Re: a small window appears
« Reply #12 on: November 09, 2024, 09:01:31 am »
Thank you !  :D

zeljko-san, TRon-san, Thaddy-san...

Thank you for the fix.

Thank you for all.   O:-)
« Last Edit: November 09, 2024, 10:07:27 am by atell »

 

TinyPortal © 2005-2018