VisualFBEditor - IDE for FreeBasic

User projects written in or related to FreeBASIC.
Post Reply
Cretin Ho
Posts: 182
Joined: Feb 04, 2021 13:01

Re: VisualFBEditor - IDE for FreeBasic

Post by Cretin Ho »

Xusinboy Bekchanov wrote:
Cretin Ho wrote:Good news. You can close like this:
Clicking on the image in the splash form will close the splash form.
https://github.com/XusinboyBekchanov/Vi ... af2ef4539a
After this commit, the splash screen closed normally like on Linux. But this is the bad news: when I choose File/Command prompt or when I created a new project, regardless of project type, when I hit OK the IDE will crash immediately and core dumped.

This is the error printed on the terminal:

Code: Select all

$ ./VisualFBEditor64_gtk3

(<unknown>:1177): Gtk-WARNING **: 22:01:22.762: Negative content width -6 (allocation 1, extents 3x4) while allocating gadget (node button, owner GtkToggleButton)

(<unknown>:1177): Gtk-WARNING **: 22:01:22.762: Negative content height -4 (allocation 1, extents 2x3) while allocating gadget (node button, owner GtkToggleButton)

(<unknown>:1177): Gtk-WARNING **: 22:01:22.773: Negative content width -6 (allocation 1, extents 3x4) while allocating gadget (node button, owner GtkToggleButton)

(<unknown>:1177): Gtk-WARNING **: 22:01:22.773: Negative content height -4 (allocation 1, extents 2x3) while allocating gadget (node button, owner GtkToggleButton)
Illegal instruction (core dumped)
Cretin Ho
Posts: 182
Joined: Feb 04, 2021 13:01

Re: VisualFBEditor - IDE for FreeBasic

Post by Cretin Ho »

This is when I quit the IDE without saving the project, also core dumped:

Code: Select all

$ ./VisualFBEditor64_gtk3

(<unknown>:1210): Gtk-WARNING **: 22:11:45.137: Negative content width -6 (allocation 1, extents 3x4) while allocating gadget (node button, owner GtkToggleButton)

(<unknown>:1210): Gtk-WARNING **: 22:11:45.138: Negative content height -4 (allocation 1, extents 2x3) while allocating gadget (node button, owner GtkToggleButton)

(<unknown>:1210): Gtk-WARNING **: 22:11:45.150: Negative content width -6 (allocation 1, extents 3x4) while allocating gadget (node button, owner GtkToggleButton)

(<unknown>:1210): Gtk-WARNING **: 22:11:45.150: Negative content height -4 (allocation 1, extents 2x3) while allocating gadget (node button, owner GtkToggleButton)
Bus error (core dumped)
Cretin Ho
Posts: 182
Joined: Feb 04, 2021 13:01

Re: VisualFBEditor - IDE for FreeBasic

Post by Cretin Ho »

This error is printed on the terminal regardless of it crashed or not:

Code: Select all

$ ./VisualFBEditor64_gtk3

(<unknown>:1211): Gtk-WARNING **: 22:14:04.366: Negative content width -6 (allocation 1, extents 3x4) while allocating gadget (node button, owner GtkToggleButton)

(<unknown>:1211): Gtk-WARNING **: 22:14:04.366: Negative content height -4 (allocation 1, extents 2x3) while allocating gadget (node button, owner GtkToggleButton)

(<unknown>:1211): Gtk-WARNING **: 22:14:04.378: Negative content width -6 (allocation 1, extents 3x4) while allocating gadget (node button, owner GtkToggleButton)

(<unknown>:1211): Gtk-WARNING **: 22:14:04.379: Negative content height -4 (allocation 1, extents 2x3) while allocating gadget (node button, owner GtkToggleButton)
I recorded it when I just launch then quit the IDE. It didn't core dump.

p/s: they got printed on the terminal immediately after the IDE start.
Last edited by Cretin Ho on Mar 21, 2021 15:21, edited 1 time in total.
Cretin Ho
Posts: 182
Joined: Feb 04, 2021 13:01

Re: VisualFBEditor - IDE for FreeBasic

Post by Cretin Ho »

I could change the Compiler path, Terminal Emulator,... on Service/Options without any problems, though.
lenoil98
Posts: 15
Joined: Feb 16, 2021 0:13
Location: USA

Re: VisualFBEditor - IDE for FreeBasic

Post by lenoil98 »

Xusinboy Bekchanov wrote:
You require all strings to be inside WStr() (What makes it so? String with quotation marks considers String and does not combine with WString???).
Only in this case where C came from, I don't know. In my code, quotation marks ("") stand together with it.
Putting strings inside WStr() works and allows the build to complete. It took some time to do it. Is there a way to determine which strings needs to go inside WStr()? Putting some strings caused build errors, so I removed the WStr() on those?

Don’t know where the”C” came from either. May have been caused by the tool I used to remove the uft8-bom from the files.
lenoil98
Posts: 15
Joined: Feb 16, 2021 0:13
Location: USA

Re: VisualFBEditor - IDE for FreeBasic

Post by lenoil98 »

Cretin Ho wrote:
lenoil98 wrote:
Cretin Ho wrote:Can you provide the details on what changes you made and to what macros? Thanks in advance.
Here is my crt directory, you could use it as a reference: https://ufile.io/zvkbotwx
This is just a random free file upload service I found on the internet. Too bad, this forum doesn't allow attachment. Attachment is very handy when sharing such a small file like this.
Thanks for sharing the headers. I noticed you made some changes that I didn’t. I hope you don’t mind if I use them in my fb repository on GitHub.
Xusinboy Bekchanov
Posts: 789
Joined: Jul 26, 2018 18:28

Re: VisualFBEditor - IDE for FreeBasic

Post by Xusinboy Bekchanov »

lenoil98 wrote: Putting strings inside WStr() works and allows the build to complete. It took some time to do it. Is there a way to determine which strings needs to go inside WStr()? Putting some strings caused build errors, so I removed the WStr() on those?
Maybe you are asking for WStr() when combining String and WString.
lenoil98 wrote: Don’t know where the”C” came from either. May have been caused by the tool I used to remove the uft8-bom from the files.
Does it not work with uft8-bom? Maybe because of this you will have to add WStr().
Last edited by Xusinboy Bekchanov on Mar 22, 2021 4:07, edited 1 time in total.
Xusinboy Bekchanov
Posts: 789
Joined: Jul 26, 2018 18:28

Re: VisualFBEditor - IDE for FreeBasic

Post by Xusinboy Bekchanov »

Cretin Ho wrote:
Xusinboy Bekchanov wrote:
Cretin Ho wrote:Good news. You can close like this:
Clicking on the image in the splash form will close the splash form.
https://github.com/XusinboyBekchanov/Vi ... af2ef4539a
After this commit, the splash screen closed normally like on Linux. But this is the bad news: when I choose File/Command prompt or when I created a new project, regardless of project type, when I hit OK the IDE will crash immediately and core dumped.
Maybe this is a fix for the situation:
https://github.com/XusinboyBekchanov/Vi ... 831731df91
Cretin Ho
Posts: 182
Joined: Feb 04, 2021 13:01

Re: VisualFBEditor - IDE for FreeBasic

Post by Cretin Ho »

Xusinboy Bekchanov wrote:
Cretin Ho wrote:
Xusinboy Bekchanov wrote:
After this commit, the splash screen closed normally like on Linux. But this is the bad news: when I choose File/Command prompt or when I created a new project, regardless of project type, when I hit OK the IDE will crash immediately and core dumped.
Maybe this is a fix for the situation:
https://github.com/XusinboyBekchanov/Vi ... 831731df91
Unfortunately, no. The same error:

Code: Select all

$ ./VisualFBEditor64_gtk3

(<unknown>:1144): Gtk-WARNING **: 12:33:22.948: Negative content width -6 (allocation 1, extents 3x4) while allocating gadget (node button, owner GtkToggleButton)

(<unknown>:1144): Gtk-WARNING **: 12:33:22.949: Negative content height -4 (allocation 1, extents 2x3) while allocating gadget (node button, owner GtkToggleButton)

(<unknown>:1144): Gtk-WARNING **: 12:33:22.960: Negative content width -6 (allocation 1, extents 3x4) while allocating gadget (node button, owner GtkToggleButton)

(<unknown>:1144): Gtk-WARNING **: 12:33:22.960: Negative content height -4 (allocation 1, extents 2x3) while allocating gadget (node button, owner GtkToggleButton)
Illegal instruction (core dumped)
Please note the part "Illegal instruction (core dumped)". I think it's a bug of the compiler itself and we can't do anything. So FreeBASIC remains to be matured only on Windows and Linux (and maybe DOS, I have never used fbc on DOS), one has to use these platforms to have the best experience. Users using other ports of fbc to other platforms better stick with Geany or CudaText.

I think this also means we have to stick with procedural FreeBASIC. OOP FreeBASIC definitely requires an working IDE, more powerful than Geany or CudaText.
Xusinboy Bekchanov
Posts: 789
Joined: Jul 26, 2018 18:28

Re: VisualFBEditor - IDE for FreeBasic

Post by Xusinboy Bekchanov »

Cretin Ho wrote: Please note the part "Illegal instruction (core dumped)". I think it's a bug of the compiler itself and we can't do anything. So FreeBASIC remains to be matured only on Windows and Linux (and maybe DOS, I have never used fbc on DOS), one has to use these platforms to have the best experience. Users using other ports of fbc to other platforms better stick with Geany or CudaText.

I think this also means we have to stick with procedural FreeBASIC. OOP FreeBASIC definitely requires an working IDE, more powerful than Geany or CudaText.
The error can be found with debugging, there is Gede and VisualStudioCode.
I think crt libraries cannot be obtained for FreeBSD by simple copying. This may be the reason for the error.
These four warnings on GtkToggleButton are not a big problem (they don't interfere with your work). Just need to find the Illegal instruction (core dumped).
Cretin Ho
Posts: 182
Joined: Feb 04, 2021 13:01

Re: VisualFBEditor - IDE for FreeBasic

Post by Cretin Ho »

I tried the same trick on OpenIndiana and it worked, partially. I could build VisualFBEditor64_gtk3 but can't build libmff64_gtk3.so. The compilation seemed to be fine, but the linking failed with this error:

Code: Select all

ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.1764 (illumos)
ld: fatal: unrecognized option '--export-dynamic'
ld: fatal: use the -z help option for usage information
I only tried to compile binaries on OpenIndiana and never tried with shared library. My Solaris port is not really complete at all.
Cretin Ho
Posts: 182
Joined: Feb 04, 2021 13:01

Re: VisualFBEditor - IDE for FreeBasic

Post by Cretin Ho »

Cretin Ho wrote:I tried the same trick on OpenIndiana and it worked, partially. I could build VisualFBEditor64_gtk3 but can't build libmff64_gtk3.so. The compilation seemed to be fine, but the linking failed with this error:

Code: Select all

ld: Software Generation Utilities - Solaris Link Editors: 5.11-1.1764 (illumos)
ld: fatal: unrecognized option '--export-dynamic'
ld: fatal: use the -z help option for usage information
I only tried to compile binaries on OpenIndiana and never tried with shared library. My Solaris port is not really complete at all.
OK I fixed the compilation of shared library, now have both VisualFBEditor64_gtk3 and libmff64_gtk3.so but when I execute ./VisualFBEditor64_gtk3 on the terminal the IDE doesn't launch. It just stuck there. This again seemed to be the side effect of the trick copying Linux crt headers.
Xusinboy Bekchanov
Posts: 789
Joined: Jul 26, 2018 18:28

Re: VisualFBEditor - IDE for FreeBasic

Post by Xusinboy Bekchanov »

Cretin Ho wrote: OK I fixed the compilation of shared library, now have both VisualFBEditor64_gtk3 and libmff64_gtk3.so but when I execute ./VisualFBEditor64_gtk3 on the terminal the IDE doesn't launch. It just stuck there. This again seemed to be the side effect of the trick copying Linux crt headers.
To find out, you can try the debugger in VisualStudioCode. Only you need to install the C/C++ plugin for debugging.
lenoil98
Posts: 15
Joined: Feb 16, 2021 0:13
Location: USA

Re: VisualFBEditor - IDE for FreeBasic

Post by lenoil98 »

Xusinboy Bekchanov wrote:
Does it not work with uft8-bom? Maybe because of this you will have to add WStr().
That is the reason I've been having problems building, I was attempting to build on FreeBSD/PowerPC64BE. I just successfully built VisualFBEditor on FreeBSD/PowerPC64LE. Didn't need to add WStr().

However, the app is unstable. Will continue to work at it and report back.
Xusinboy Bekchanov
Posts: 789
Joined: Jul 26, 2018 18:28

Re: VisualFBEditor - IDE for FreeBasic

Post by Xusinboy Bekchanov »

lenoil98 wrote: That is the reason I've been having problems building, I was attempting to build on FreeBSD/PowerPC64BE. I just successfully built VisualFBEditor on FreeBSD/PowerPC64LE. Didn't need to add WStr().

However, the app is unstable. Will continue to work at it and report back.
I'm glad to hear that. You can try it with the debugger (then it will be clear in which places it happens).
Post Reply