VisualFBEditor - IDE for FreeBasic

User projects written in or related to FreeBASIC.
Post Reply
Wawavoun
Posts: 18
Joined: Jun 19, 2023 8:30

Re: VisualFBEditor - IDE for FreeBasic

Post by Wawavoun »

Thread 32 "VisualFBEditor6" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff464a640 (LWP 15275)]
0x00000000005ad134 in LOADFUNCTIONS (PATH$1=<error reading variable: Cannot access memory at address 0x7ffff4640188>, LOADPARAMETER$1=<error reading variable: Cannot access memory at address 0x7ffff4640180>, TYPES$1=<error reading variable: Cannot access memory at address 0x7ffff4640178>, ENUMS$1=<error reading variable: Cannot access memory at address 0x7ffff4640170>, FUNCTIONS$1=<error reading variable: Cannot access memory at address 0x7ffff4640168>, TYPEPROCEDURES$1=<error reading variable: Cannot access memory at address 0x7ffff4640160>, ARGS$1=0x7bd960 <MY::SYS::FORMS::GLOBALS$+576>, EC$1=0x0, CTLLIBRARY$1=0x0, CURFILEITEM$1=0x0, OLDFILEITEM$1=0x0) at /home/philippe/Program/VFBEDITOR/VisualFBEditor/src/Main.bas:3489
3489 Sub LoadFunctions(ByRef Path As WString, LoadParameter As LoadParam = FilePathAndIncludeFiles, ByRef Types As WStringOrStringList, ByRef Enums As WStringOrStringList, ByRef Functions As WStringOrStringList, ByRef TypeProcedures As WStringOrStringList, ByRef Args As WStringOrStringList, ec As Control Ptr = 0, CtlLibrary As Library Ptr = 0, CurFileItem As Any Ptr = 0, OldFileItem As Any Ptr = 0)
(gdb) bt
#0 0x00000000005ad134 in LOADFUNCTIONSPython Exception <class 'gdb.MemoryError'>: Cannot access memory at address 0x7ffff4640188
(PATH$1=#1 0x00000000005bf876 in LOADONLYFILEPATH (PARAM$1=0x60d0430)
at /home/philippe/Program/VFBEDITOR/VisualFBEditor/src/Main.bas:4552
#2 0x000000000074e74d in threadproc ()
#3 0x0000000000000000 in ()
Xusinboy Bekchanov
Posts: 877
Joined: Jul 26, 2018 18:28

Re: VisualFBEditor - IDE for FreeBasic

Post by Xusinboy Bekchanov »

Wawavoun wrote: Jun 26, 2023 16:37 I try to go a little bit deeper with the tool (1.09 compiled version).

This is what I have see now :
- I see always a segfault at program exit
- I cant change editor font size (I can change into the settings but this has no influence on the editor windows)
We fix these.
Wawavoun wrote: Jun 26, 2023 16:37 - no cursor or invisible cursor into the editing windows which is annoying
It should be:
Image
Wawavoun wrote: Jun 26, 2023 16:37 - the gtk lib setting work, check mark is ok but this setting is not saved with the project
These temporary settings (not setted - gui - console, 32 - 64, uses), for projects can be added in project properties -> Compile -> Compilation Arguments -> -d __USE_GTK3__
And for files, you can use #cmdline "-d __USE_GTK3__"
Wawavoun wrote: Jun 26, 2023 16:37 I have not find how to use "make". Should I create the Makefile myself ?
Yes, you have to create it yourself.
Wawavoun
Posts: 18
Joined: Jun 19, 2023 8:30

Re: VisualFBEditor - IDE for FreeBasic

Post by Wawavoun »

This what I get when leaving the ide :
Thread 1 "VisualFBEditor6" received signal SIGSEGV, Segmentation fault.
_ZN4LIST11ITEM__get__El (THIS$1=0x7b9950 <TABPANELS$>, INDEX$1=0) at /home/philippe/Program/VFBEDITOR/VisualFBEditor/Controls/MyFbFramework/mff/List.bas:23
23 Return Items[Index]
(gdb) bt
#0 _ZN4LIST11ITEM__get__El (THIS$1=0x7b9950 <TABPANELS$>, INDEX$1=0)
at /home/philippe/Program/VFBEDITOR/VisualFBEditor/Controls/MyFbFramework/mff/List.bas:23
#1 0x00000000006003fd in ONPROGRAMQUIT () at /home/philippe/Program/VFBEDITOR/VisualFBEditor/src/Main.bas:9116
#2 0x00007ffff7fc924e in _dl_fini () at ./elf/dl-fini.c:142
#3 0x00007ffff6df9495 in __run_exit_handlers
(status=0, listp=0x7ffff6fcd838 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true) at ./stdlib/exit.c:113
#4 0x00007ffff6df9610 in __GI_exit (status=<optimized out>) at ./stdlib/exit.c:143
#5 0x0000000000741e2f in ()
#6 0x0000000005ef5a30 in ()
#7 0x00000000007a0c20 in VISUALFBEDITORAPP$ ()
#8 0x00007fffffffdce0 in ()
#9 0x00000000006172ae in main (__FB_ARGC__$0=1, __FB_ARGV__$0=0x7fffffffddf8)
at /home/philippe/Program/VFBEDITOR/VisualFBEditor/src/VisualFBEditor.bas:814
Font and font size change in editor still not working...

I found the cursor, it is black on a black background... I have to use a theme with a white background.
Xusinboy Bekchanov
Posts: 877
Joined: Jul 26, 2018 18:28

Re: VisualFBEditor - IDE for FreeBasic

Post by Xusinboy Bekchanov »

Wawavoun wrote: Jun 25, 2023 7:09 GridExample.bas --> open in IDE (but segfault at compile, I set 32 and 64 bits compilers to "local" and "local" to "/usr/local/bin/fbc")
Also "Find compiler" give a segfault...
Fixed: Application FileName property in Linux
https://github.com/XusinboyBekchanov/My ... 8e25fa09bc

Added: Find Compilers in Linux, Fixed: Compiling crash in Linux
https://github.com/XusinboyBekchanov/Vi ... d6c4bd026b

But, GridExample.bas doesn't compile on Linux yet, we need to work on it.
Wawavoun wrote: Jun 26, 2023 18:51 This what I get when leaving the ide :
I have this too. I will fix it.
Wawavoun wrote: Jun 26, 2023 18:51 Font and font size change in editor still not working...
It's still in line.
Wawavoun wrote: Jun 26, 2023 18:51 I found the cursor, it is black on a black background... I have to use a theme with a white background.
I'll take a look at this too.
Xusinboy Bekchanov
Posts: 877
Joined: Jul 26, 2018 18:28

Re: VisualFBEditor - IDE for FreeBasic

Post by Xusinboy Bekchanov »

Wawavoun wrote: Jun 26, 2023 18:51 Font and font size change in editor still not working...
Added: Edit Control Font changing in Linux:
https://github.com/XusinboyBekchanov/Vi ... ed8fd8b250
Wawavoun
Posts: 18
Joined: Jun 19, 2023 8:30

Re: VisualFBEditor - IDE for FreeBasic

Post by Wawavoun »

I confirm, GridExample.bas now compile fine.
Wawavoun
Posts: 18
Joined: Jun 19, 2023 8:30

Re: VisualFBEditor - IDE for FreeBasic

Post by Wawavoun »

Font selection and size also ok !

It seems the tool can be used now.

I will go deeper into my project and keep you informed in case of...

Great thanks for your prompt help and support.

Regards.
Philippe
Xusinboy Bekchanov
Posts: 877
Joined: Jul 26, 2018 18:28

Re: VisualFBEditor - IDE for FreeBasic

Post by Xusinboy Bekchanov »

Wawavoun wrote: Jun 26, 2023 18:51 This what I get when leaving the ide :
Thread 1 "VisualFBEditor6" received signal SIGSEGV, Segmentation fault.
_ZN4LIST11ITEM__get__El (THIS$1=0x7b9950 <TABPANELS$>, INDEX$1=0) at /home/philippe/Program/VFBEDITOR/VisualFBEditor/Controls/MyFbFramework/mff/List.bas:23
23 Return Items[Index]
(gdb) bt
#0 _ZN4LIST11ITEM__get__El (THIS$1=0x7b9950 <TABPANELS$>, INDEX$1=0)
at /home/philippe/Program/VFBEDITOR/VisualFBEditor/Controls/MyFbFramework/mff/List.bas:23
#1 0x00000000006003fd in ONPROGRAMQUIT () at /home/philippe/Program/VFBEDITOR/VisualFBEditor/src/Main.bas:9116
#2 0x00007ffff7fc924e in _dl_fini () at ./elf/dl-fini.c:142
#3 0x00007ffff6df9495 in __run_exit_handlers
(status=0, listp=0x7ffff6fcd838 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true) at ./stdlib/exit.c:113
#4 0x00007ffff6df9610 in __GI_exit (status=<optimized out>) at ./stdlib/exit.c:143
#5 0x0000000000741e2f in ()
#6 0x0000000005ef5a30 in ()
#7 0x00000000007a0c20 in VISUALFBEDITORAPP$ ()
#8 0x00007fffffffdce0 in ()
#9 0x00000000006172ae in main (__FB_ARGC__$0=1, __FB_ARGV__$0=0x7fffffffddf8)
at /home/philippe/Program/VFBEDITOR/VisualFBEditor/src/VisualFBEditor.bas:814
Fixed: Quit IDE in Linux:
https://github.com/XusinboyBekchanov/Vi ... 0261db60e3
Xusinboy Bekchanov
Posts: 877
Joined: Jul 26, 2018 18:28

Re: VisualFBEditor - IDE for FreeBasic

Post by Xusinboy Bekchanov »

Wawavoun wrote: Jun 26, 2023 16:37 - no cursor or invisible cursor into the editing windows which is annoying
Improved: Edit Control caret in Linux:
https://github.com/XusinboyBekchanov/Vi ... 2b785dbf7c

Now the caret will be visible in the various settings of the Code Editor and the theme (Dark and Light).
Wawavoun
Posts: 18
Joined: Jun 19, 2023 8:30

Re: VisualFBEditor - IDE for FreeBasic

Post by Wawavoun »

Thanks a lot for all the improvements !

I have try to compile the graphics example "CanvasDraw.bas".
Its a very interesting example for me because close from what I try to do.

Again Works well under windows but I get errors at compile under Linux.

CanvasDraw.bas(226) error 99: No matching overloaded function, STYLE()
CanvasDraw.bas(289) error 99: No matching overloaded function, STYLE()
CanvasDraw.bas(339) error 14: Expected identifier, found 'Point'
CanvasDraw.bas(342) error 42: Variable not declared, pt
CanvasDraw.bas(343) error 99: No matching overloaded function, RECTANGLE()
CanvasDraw.bas(350) error 1: Argument count mismatch, found 'pt'
CanvasDraw.bas(351) error 1: Argument count mismatch, found 'pt'
CanvasDraw.bas(352) error 1: Argument count mismatch, found 'pt'
CanvasDraw.bas(353) error 1: Argument count mismatch, found 'pt'

The two first ones are not a concern. They come also under windows and comment out the lines and the example run well.

Regards.
Philippe
Xusinboy Bekchanov
Posts: 877
Joined: Jul 26, 2018 18:28

Re: VisualFBEditor - IDE for FreeBasic

Post by Xusinboy Bekchanov »

Wawavoun wrote: Jun 28, 2023 18:42 Thanks a lot for all the improvements !
Not worth it.
Wawavoun wrote: Jun 28, 2023 18:42 I have try to compile the graphics example "CanvasDraw.bas".
Its a very interesting example for me because close from what I try to do.

Again Works well under windows but I get errors at compile under Linux.

CanvasDraw.bas(226) error 99: No matching overloaded function, STYLE()
CanvasDraw.bas(289) error 99: No matching overloaded function, STYLE()
CanvasDraw.bas(339) error 14: Expected identifier, found 'Point'
CanvasDraw.bas(342) error 42: Variable not declared, pt
CanvasDraw.bas(343) error 99: No matching overloaded function, RECTANGLE()
CanvasDraw.bas(350) error 1: Argument count mismatch, found 'pt'
CanvasDraw.bas(351) error 1: Argument count mismatch, found 'pt'
CanvasDraw.bas(352) error 1: Argument count mismatch, found 'pt'
CanvasDraw.bas(353) error 1: Argument count mismatch, found 'pt'

The two first ones are not a concern. They come also under windows and comment out the lines and the example run well.
Added: Canvas Cls method in Linux:
https://github.com/XusinboyBekchanov/My ... a4f2489985

Fixed: Compiling CanvasDraw Example in Linux:
https://github.com/XusinboyBekchanov/Vi ... e04657c67b
Wawavoun
Posts: 18
Joined: Jun 19, 2023 8:30

Re: VisualFBEditor - IDE for FreeBasic

Post by Wawavoun »

I have try to compile some basic gui code under windows but with GTK3 option not Win32.
This code is ok if compiling with Win32 option...
I assume my GTK3 installation is correct because I can use it with Glade + GladetoBac + FBC.

This seems conduct the compiler to use some Linux include file and then I got errors...
10:03:33: Compilation: "C:\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\fbc64.exe" -b "Form1.frm" -exx -v -s console -d __USE_GTK__ -d __USE_GTK3__ -i "C:\Users\xxxx\Downloads\Freebasic\VisualFBEdit\VisualFBEditor\Controls\MyFbFramework" -i ".\Controls\MyFbFramework\inc" -p ".\Controls\MyFbFramework\Lib" -d _DebugWindow_=657784

10:03:33: FreeBASIC Compiler - Version 1.10.0 (2023-05-14), built for win64 (64bit)
10:03:33: Copyright (C) 2004-2023 The FreeBASIC development team.
10:03:33: standalone
10:03:33: target : win64, x86-64, 64bit
10:03:33: backend : gcc
10:03:33: compiling : Form1.frm -o Form1.c (main module)
C:\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\inc\crt\linux\unistd.bi(79) error 59: Illegal specification, at parameter 2 (__offset) of lseek() in 'declare function lseek (byval __fd as long, byval __offset as __off_t, byval __whence as long) as __off_t'
C:\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\inc\crt\linux\unistd.bi(81) error 59: Illegal specification, at parameter 1 (__value) of ualarm() in 'declare function ualarm (byval __value as __useconds_t, byval __interval as __useconds_t) as __useconds_t'
C:\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\inc\crt\linux\unistd.bi(82) error 59: Illegal specification, at parameter 1 (__useconds) of usleep() in 'declare function usleep (byval __useconds as __useconds_t) as long'
C:\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\inc\crt\linux\unistd.bi(84) error 59: Illegal specification, at parameter 2 (__owner) of chown() in 'declare function chown (byval __file as zstring ptr, byval __owner as __uid_t, byval __group as __gid_t) as long'
C:\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\inc\crt\linux\unistd.bi(85) error 59: Illegal specification, at parameter 2 (__owner) of fchown() in 'declare function fchown (byval __fd as long, byval __owner as __uid_t, byval __group as __gid_t) as long'
C:\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\inc\crt\linux\unistd.bi(86) error 59: Illegal specification, at parameter 2 (__owner) of lchown() in 'declare function lchown (byval __file as zstring ptr, byval __owner as __uid_t, byval __group as __gid_t) as long'
C:\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\inc\crt\linux\unistd.bi(104) error 14: Expected identifier, found '__pid_t' in 'declare function getpid () as __pid_t'
C:\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\inc\crt\linux\unistd.bi(105) error 14: Expected identifier, found '__pid_t' in 'declare function getppid () as __pid_t'
C:\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\inc\crt\linux\unistd.bi(106) error 14: Expected identifier, found '__pid_t' in 'declare function getpgrp () as __pid_t'
C:\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\inc\crt\linux\unistd.bi(107) error 59: Illegal specification, at parameter 1 (__pid) of __getpgid() in 'declare function __getpgid (byval __pid as __pid_t) as __pid_t'
C:\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\inc\crt\linux\unistd.bi(107) error 133: Too many errors, exiting

10:03:34: Found Errors (11 Pos)
10:03:34: Do not build file. Elapsed Time: 1,37 Seconds


I dont know if this come from VisualFBEditor or FB compiler behaviour ?

Is that normal ? Is the GTK3 option forbidden under Windows and exclusively reserved to Linux ?

Regards.
Philippe
Xusinboy Bekchanov
Posts: 877
Joined: Jul 26, 2018 18:28

Re: VisualFBEditor - IDE for FreeBasic

Post by Xusinboy Bekchanov »

Wawavoun wrote: Jun 29, 2023 8:17 I have try to compile some basic gui code under windows but with GTK3 option not Win32.
This code is ok if compiling with Win32 option...
I assume my GTK3 installation is correct because I can use it with Glade + GladetoBac + FBC.

This seems conduct the compiler to use some Linux include file and then I got errors...
Fixed: Compiling with GTK in Windows, Fixed: Canvas functions in Linux:
https://github.com/XusinboyBekchanov/My ... 1d6e5c7dff
Wawavoun
Posts: 18
Joined: Jun 19, 2023 8:30

Re: VisualFBEditor - IDE for FreeBasic

Post by Wawavoun »

Always one error when compiling CanvasDraw.bas with GTK3 under windows :
13:18:08: Compilation: "C:\FreeBASIC-1.10.0-winlibs-gcc-9.3.0\fbc64.exe" -b "CanvasDraw.bas" -exx -v -s console -d __USE_GTK__ -d __USE_GTK3__ -i "C:\Users\roehr\Downloads\Freebasic\VisualFBEdit\VisualFBEditor\Controls\MariaDBBox" -i "C:\Users\roehr\Downloads\Freebasic\VisualFBEdit\VisualFBEditor\Controls\MyFbFramework" -i "C:\Users\roehr\Downloads\Freebasic\VisualFBEdit\VisualFBEditor\Controls\SQLite3" -i ".\Controls\MyFbFramework\inc" -p ".\Controls\MyFbFramework\Lib" -d _DebugWindow_=68134

13:18:08: FreeBASIC Compiler - Version 1.10.0 (2023-05-14), built for win64 (64bit)
13:18:08: Copyright (C) 2004-2023 The FreeBASIC development team.
13:18:08: standalone
13:18:08: target : win64, x86-64, 64bit
13:18:08: backend : gcc
13:18:08: compiling : CanvasDraw.bas -o CanvasDraw.c (main module)
C:\Users\roehr\Downloads\Freebasic\VisualFBEdit\VisualFBEditor\Controls\MyFbFramework\mff\Picture.bas(92) error 42: Variable not declared, InvalidateRect

13:18:10: Found Errors (1 Pos)
13:18:10: Do not build file. Elapsed Time: 2,61 Seconds
Regards.
Philippe
Post Reply