Minimal Sample Error
-
- Knows some wx things
- Posts: 29
- Joined: Sun Jan 22, 2023 10:41 pm
Minimal Sample Error
Hello!
I built the library on my new Linux laptop, and presumably everything went well. I was able to build the library and check versions and libraries successfully, and all seemed OK. When I went to run the minimal sample I received the following error:
(minimal:38262): Gtk-CRITICAL **: 18:03:08.852: gtk_container_remove: assertion 'GTK_IS_CONTAINER (container)' failed
Segmentation fault (core dumped)
Can someone help clarify what this error means? I googled it but was unabe to make sense of it.
Thanks!
I built the library on my new Linux laptop, and presumably everything went well. I was able to build the library and check versions and libraries successfully, and all seemed OK. When I went to run the minimal sample I received the following error:
(minimal:38262): Gtk-CRITICAL **: 18:03:08.852: gtk_container_remove: assertion 'GTK_IS_CONTAINER (container)' failed
Segmentation fault (core dumped)
Can someone help clarify what this error means? I googled it but was unabe to make sense of it.
Thanks!
Re: Minimal Sample Error
Hi,
1 This is not a build error but run-time one.
2 Are you really received "Segmentation fault (core dumped)" error?
3 What is you version of wxWidgets? Did you build it yourself? If yes - what configure line did you use exactly? Or even better - what process did you follow exactly (which commands did you issue)?
4 How exactly did you build and run the minimal sample?
Thank you.
1 This is not a build error but run-time one.
2 Are you really received "Segmentation fault (core dumped)" error?
3 What is you version of wxWidgets? Did you build it yourself? If yes - what configure line did you use exactly? Or even better - what process did you follow exactly (which commands did you issue)?
4 How exactly did you build and run the minimal sample?
Thank you.
-
- Knows some wx things
- Posts: 29
- Joined: Sun Jan 22, 2023 10:41 pm
Re: Minimal Sample Error
HiONEEYEMAN wrote: ↑Mon Jan 30, 2023 3:17 am Hi,
1 This is not a build error but run-time one.
2 Are you really received "Segmentation fault (core dumped)" error?
3 What is you version of wxWidgets? Did you build it yourself? If yes - what configure line did you use exactly? Or even better - what process did you follow exactly (which commands did you issue)?
4 How exactly did you build and run the minimal sample?
Thank you.
1. Sorry if I posted in the wrong place, thanks for clarifying.
2. Yes I did get the error, copied exactly.
3. version 3.2.1 and I built myself following the instructions from https://wiki.wxwidgets.org/Compiling_an ... ng_started
I used option A so I built to the shared library. I then followed instruction for building sample as explained.
I may have built from the temp folder I had extracted to. If I used option A where is the local install located?
Thanks for your time, much appreciated.
Re: Minimal Sample Error
Hi,
So you did it like this, right?
What did you do then?
Also it is always better to use "debug" build of something, especially if you are just starting with it.
So I suggest to do this at this point:
After that you should do:
If you receive a Segmentation fault at this point:
Thank you.
So you did it like this, right?
Code: Select all
cd ~/wx/wxWidgets-3.1.3
mkdir gtk-build # the name is not really relevant
cd gtk-build
../configure # builds unicode, shared lib
make -j3 # use 3 cores. Set to the number of cores your have. 'make' uses 1 core
sudo make install # some platforms require to use 'su' instead of 'sudo'
sudo ldconfig
Also it is always better to use "debug" build of something, especially if you are just starting with it.
So I suggest to do this at this point:
Code: Select all
cd ~/wx/wxWidgets-3.1.3
rm -rf gtk-build
mkdir gtk-build
cd gtk-build
../configure --enable-debug
make -j3
sudo make install
sudo ldconfig
Code: Select all
cdv samples/minimal
make
./minimal
Code: Select all
gdb minimal
run
// When the crash happens type "bt" and press Enter
// Post the backtrace here
-
- Knows some wx things
- Posts: 29
- Joined: Sun Jan 22, 2023 10:41 pm
Re: Minimal Sample Error
ONEEYEMAN wrote: ↑Mon Jan 30, 2023 4:37 am Hi,
So you did it like this, right?
What did you do then?Code: Select all
cd ~/wx/wxWidgets-3.1.3 mkdir gtk-build # the name is not really relevant cd gtk-build ../configure # builds unicode, shared lib make -j3 # use 3 cores. Set to the number of cores your have. 'make' uses 1 core sudo make install # some platforms require to use 'su' instead of 'sudo' sudo ldconfig
Also it is always better to use "debug" build of something, especially if you are just starting with it.
So I suggest to do this at this point:
After that you should do:Code: Select all
cd ~/wx/wxWidgets-3.1.3 rm -rf gtk-build mkdir gtk-build cd gtk-build ../configure --enable-debug make -j3 sudo make install sudo ldconfig
If you receive a Segmentation fault at this point:Code: Select all
cdv samples/minimal make ./minimal
Thank you.Code: Select all
gdb minimal run // When the crash happens type "bt" and press Enter // Post the backtrace here
Thanks for the reply I will try this now.
I do have a question. I think I built the sample minimal in the wxwidget folder that I extracted in a temp dir I made which Ive deleted. If I used option A, where is the wxWidget source directory I need to access to rebuild the sample? The wxWidgets-3.2.1 folder.
-
- Knows some wx things
- Posts: 29
- Joined: Sun Jan 22, 2023 10:41 pm
Re: Minimal Sample Error
Thanks your suggestion worked. Still a bit confused but learning little by little. Now Im gonna try to configure it in codeblocks, any tips or links for learning material is appreciated. Thanks again.
Re: Minimal Sample Error
Hi,
This is excellent one: viewtopic.php?f=19&t=47231.
It is for WIndows and MinGW, but the idea of configuring is the same.
You have non-monolithic shared debug wxWidgets build.
f you have any issues - let us know.
Thank you.
This is excellent one: viewtopic.php?f=19&t=47231.
It is for WIndows and MinGW, but the idea of configuring is the same.
You have non-monolithic shared debug wxWidgets build.
f you have any issues - let us know.
Thank you.
Re: Minimal Sample Error
Hi,
What is it your confused about?
Let us help and you will be amazed how easy it is to work with wxWidgets.
Thank you.
What is it your confused about?
Let us help and you will be amazed how easy it is to work with wxWidgets.
Thank you.
-
- Knows some wx things
- Posts: 29
- Joined: Sun Jan 22, 2023 10:41 pm
Re: Minimal Sample Error
Thank you for the resource, I will try it out after my morning classes.ONEEYEMAN wrote: ↑Mon Jan 30, 2023 6:13 am Hi,
This is excellent one: viewtopic.php?f=19&t=47231.
It is for WIndows and MinGW, but the idea of configuring is the same.
You have non-monolithic shared debug wxWidgets build.
f you have any issues - let us know.
Thank you.
-
- Knows some wx things
- Posts: 29
- Joined: Sun Jan 22, 2023 10:41 pm
Re: Minimal Sample Error
The confusion is more about my new and limited linux experience. Im not entirely clear on where things were installing, temp files, lib files. All so new to me, but I am learning little by little and enjoy the experience. Communities like these, with friendly help is a big reason why. I will be sure continue to ask questions!