Page 1 of 2
IDE crash when starting 3D examples
Posted: Tue May 04, 2021 2:30 pm
by Programie
Whenever I try to start one of the 3D examples using the Screen3DRequester, the IDE is crashing with a segmentation fault.
I was already able to trace down the actual issue: Whenever I open a window with a CheckBoxGadget or OptionGadget in it and include the file into another file, the IDE crashes when starting it with the integrated debugger.
Example code:
b.pb
Code: Select all
OpenWindow(0, 0, 0, 396, 100, "PureBasic - 3D Demos", #PB_Window_ScreenCentered | #PB_Window_SystemMenu)
CheckBoxGadget(1, 40, 20, 130, 20, "Test")
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
a.pb
Starting the application using a.pb without any subsystem configuration and using the integrated debugger causes the IDE to crash. Changing the subsystem to qt, disabling the debugger or using the standalone debugger does not cause the crash anymore. Also, directly starting b.pb with the integrated debugger does not cause any issues.
The same code with another Gadget like ButtonGadget instead of CheckBoxGadget or OptionGadget works fine.
OS: Ubuntu 20.10 x64
PureBasic: 5.73 x64
Re: IDE crash when starting 3D examples
Posted: Tue May 04, 2021 3:33 pm
by StarBootics
Confirmed ! Nice finding by the way this might be cause of the crash I have searched for without any success.
I don't know if it's related or not but when we launch the IDE via the terminal we got this message :
Gtk-Message: 10:39:05.609: Failed to load module "canberra-gtk-module"
Tested on Ubuntu 20.04.2 LTS x64
PureBasic 5.73 LTS x64
Best regards
StarBootics
Re: IDE crash when starting 3D examples
Posted: Tue May 04, 2021 4:16 pm
by Programie
StarBootics wrote: Tue May 04, 2021 3:33 pmI don't know if it's related or not but when we launch the IDE via the terminal we got this message :
Gtk-Message: 10:39:05.609: Failed to load module "canberra-gtk-module"
In my case, I don't get any warnings but the already said segmentation fault in the terminal:
$ compilers/purebasic
zsh: segmentation fault (core dumped) compilers/purebasic
Re: IDE crash when starting 3D examples
Posted: Tue May 04, 2021 6:17 pm
by StarBootics
Programie wrote: Tue May 04, 2021 4:16 pm
In my case, I don't get any warnings but the already said segmentation fault in the terminal:
So it's not related. I have made another test and apparently it does the exact same thing with this code :
Save this one as "File.pb"
Code: Select all
If OpenWindow(0, 200, 200, 300, 100, "Exemple GetMenuItemState")
If CreateMenu(0, WindowID(0))
MenuTitle("Projet")
MenuItem(1, "Changé")
SetMenuItemState(0,1,1) ; Affiche l'élément du menu comme étant coché.
EndIf
Repeat
Evenement = WaitWindowEvent() ; Attente d'un évenement
If Evenement = #PB_Event_Menu ; Evenement de type 'Menu'
If EventMenu() = 1 ; Le premier élément du menu a été sélectionné
If GetMenuItemState(0,1) = 1 ; Etat actuel de l'élément = coché
SetMenuItemState(0,1,0) ; On le décoche
Else ; Etat actuel de l'élément = décoché
SetMenuItemState(0,1,1) ; On le coche
EndIf
EndIf
EndIf
Until Evenement = #PB_Event_CloseWindow
EndIf
Save this one as "Main.pb"
The IDE don't crash at first but when you open the Menu it crash hard. As you can see no gadget at all are required to make the IDE to crash.
Best regards
StarBootics
Re: IDE crash when starting 3D examples
Posted: Tue May 04, 2021 6:35 pm
by mk-soft
I cannot confirm here that the IDE crashes ...
The Canberra is only an extension for the IDE, but should also run without it.
But I have installed it later.
sudo apt install libcanberra-gtk-module
HOST: Mac mini 2018 (Parallels v16.5.2)
VM Linux: Ubuntu 20.04.2 LTS (x64)
PB v5.73 (x64)
Re: IDE crash when starting 3D examples
Posted: Tue May 04, 2021 6:40 pm
by StarBootics
mk-soft wrote: Tue May 04, 2021 6:35 pm
I cannot confirm here that the IDE crashes ...
Strange, did you compile with the integrated debugger active ?
Best regards
StarBootics
Re: IDE crash when starting 3D examples
Posted: Tue May 04, 2021 6:58 pm
by mk-soft
StarBootics wrote: Tue May 04, 2021 6:40 pm
mk-soft wrote: Tue May 04, 2021 6:35 pm
I cannot confirm here that the IDE crashes ...
Strange, did you compile with the integrated debugger active ?
Best regards
StarBootics
Yes, I use the integrated debugger.
Remember, even if you are using PB version v5.70 to v5.72, take the purebasic ide from v5.73. This has some bugfixes (also from me because of autocompletion and ide crash because of the procedure browser).
Re: IDE crash when starting 3D examples
Posted: Tue May 04, 2021 7:04 pm
by StarBootics
The IDE I'm using was, according to the "About..." window :
IDE build on 11/23/2020 [09:29] by fred
Branch: master Revision: 79192e40282a
Is it the latest version ?
Re: IDE crash when starting 3D examples
Posted: Tue May 04, 2021 7:07 pm
by mk-soft
Yes, that the last version ...
E.G.
How system to used?
- Hardware direct or VM system?
Re: IDE crash when starting 3D examples
Posted: Tue May 04, 2021 7:18 pm
by StarBootics
I'm running on hardware directly. No virtual machine for me but I don't have another computer to try on beside my laptop (Acer Aspire 5534) but PureBasic is not being installed on it.
Should I try on it as well ?
Best regards
StarBootics
Re: IDE crash when starting 3D examples
Posted: Tue May 04, 2021 7:22 pm
by mk-soft
1.
There is also the possibility of setting the path to the compiler in linux. There should not be any incorrect entries there.
I do not use this path settings.
(Register.sh)
2.
Perhaps invalid purebasic.pref. Delete this file in folder [user]/.purebasic
3. I don't thing its a problem with direct hardware. Sometimes a problem on some old VM systems.
Re: IDE crash when starting 3D examples
Posted: Tue May 04, 2021 7:44 pm
by StarBootics
I have try with the default preferences setting. I have rename "purebasic.pref" to "purebasic-BAK.pref" then I have started the IDE so a new pref file was generated. No effect at all the IDE crashes anyway.
I think I will take the time to install PureBasic on my Laptop to test.
Best regards
StarBootics
Re: IDE crash when starting 3D examples
Posted: Tue May 04, 2021 7:53 pm
by mk-soft
@StarBootics
I have send a pm !
Re: IDE crash when starting 3D examples
Posted: Tue May 04, 2021 8:02 pm
by StarBootics
mk-soft wrote: Tue May 04, 2021 7:53 pm
@StarBootics
I have send a pm !
I have responded to that pm.
Best regards
StarBootics
Re: IDE crash when starting 3D examples
Posted: Tue May 04, 2021 9:57 pm
by Programie
StarBootics wrote: Tue May 04, 2021 6:17 pm
The IDE don't crash at first but when you open the Menu it crash hard. As you can see no gadget at all are required to make the IDE to crash.
I can confirm that on my setup, too.