Recent

Author Topic: GTK3 - Division by zero at startup  (Read 1465 times)

Dibo

  • Hero Member
  • *****
  • Posts: 1057
GTK3 - Division by zero at startup
« on: May 06, 2025, 08:53:11 pm »
Hi,
I have project which I must write using at least GTK3. So far I'm successfully writting it using wxWidgets and C++. From time to time I'm giving a try to Lazarus. Few months ago I tried with Lazarus 3.6. IDE compiled but didn't look good and empty project had some weird artifacts in empty form.
Now with Lazarus 4.0 I tried again. When running startlazarus and config wizard is showing I'm getting division by zero. Config window is also strangely small. When I ignore this error and try to setup path to fpc bin and source, whole configurator is freezing and I must to kill it.
Tried also with trunk git. Config window (and also fonts) is now in normal size (I'm using 4k monitor with 200% scale and 120Hz refreshing) but I'm still getting division by zero error.
I'm building lazarus with command:
Code: Pascal  [Select][+][-]
  1. #!/bin/bash
  2. PATH="/home/dibo/programowanie/lazarus/fpc/bin/:$PATH"
  3. make clean
  4. make all LCL_PLATFORM=gtk3 FPC="/home/dibo/programowanie/lazarus/fpc/bin/fpc"
Same with "bigide".
Linux Mint 22.1 Cinnamon, X11
AMD Ryzen 7 8840U w/ Radeon 780M Graphics × 8

zeljko

  • Hero Member
  • *****
  • Posts: 1813
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: GTK3 - Division by zero at startup
« Reply #1 on: May 07, 2025, 07:43:21 am »
Forget gtk3 with lazarus 4.0. gtk3 is significantly improved in trunk only, so lazarus 5.0 should contain that improvements.

dbannon

  • Hero Member
  • *****
  • Posts: 3620
    • tomboy-ng, a rewrite of the classic Tomboy
Re: GTK3 - Division by zero at startup
« Reply #2 on: May 07, 2025, 12:07:13 pm »
Another point Dibo, you can build a gtk3 app with a gtk2 version of Lazarus, you do not have to build a gtk3 version of Lazarus.

Indeed, I'd expect even a gtk3 Lazarus to default to making gtk2 apps.

Project -> Project_Options -> Additions_and_Overrides.  That will let you set your project to build a GTK3 version.

Davo

P.S. but no point in playing with GTK3 in anywhere else than lazarus main !
« Last Edit: May 07, 2025, 12:50:44 pm by dbannon »
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

Dibo

  • Hero Member
  • *****
  • Posts: 1057
Re: GTK3 - Division by zero at startup
« Reply #3 on: May 07, 2025, 08:18:21 pm »
Another point Dibo, you can build a gtk3 app with a gtk2 version of Lazarus, you do not have to build a gtk3 version of Lazarus.
Yes I know, but when I see that simple wizard window is crashing then I guess that this widgetset is not production ready yet, but I agree that this is good point to start playing with it. I'll give a try.
Anyway, personally I'm big fan of Qt and I remember that zeljko is doing amazing job for decades porting its headers, I'm suprised that we have already Qt6. Zeljko since you are here. Are we able even write Qt Quick (QML) apps using libqt6pas?

zeljko

  • Hero Member
  • *****
  • Posts: 1813
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: GTK3 - Division by zero at startup
« Reply #4 on: May 07, 2025, 08:24:05 pm »
No, I haven't even looked into QML core translation to C, but I guess it's possible.

Thaddy

  • Hero Member
  • *****
  • Posts: 18529
  • Here stood a man who saw the Elbe and jumped it.
Re: GTK3 - Division by zero at startup
« Reply #5 on: May 07, 2025, 08:32:31 pm »
Says the one man band... ::) :-[
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

 

TinyPortal © 2005-2018