Minimal Sample Error

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
nixyhustle
Knows some wx things
Knows some wx things
Posts: 29
Joined: Sun Jan 22, 2023 10:41 pm

Minimal Sample Error

Post by nixyhustle »

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!
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Minimal Sample Error

Post by ONEEYEMAN »

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.
nixyhustle
Knows some wx things
Knows some wx things
Posts: 29
Joined: Sun Jan 22, 2023 10:41 pm

Re: Minimal Sample Error

Post by nixyhustle »

ONEEYEMAN 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.
Hi

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.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Minimal Sample Error

Post by ONEEYEMAN »

Hi,
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 
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:

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
After that you should do:

Code: Select all

cdv samples/minimal
make
./minimal
If you receive a Segmentation fault at this point:

Code: Select all

gdb minimal
run
// When the crash happens type "bt" and press Enter
// Post the backtrace here
Thank you.
nixyhustle
Knows some wx things
Knows some wx things
Posts: 29
Joined: Sun Jan 22, 2023 10:41 pm

Re: Minimal Sample Error

Post by nixyhustle »

ONEEYEMAN wrote: Mon Jan 30, 2023 4:37 am Hi,
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 
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:

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
After that you should do:

Code: Select all

cdv samples/minimal
make
./minimal
If you receive a Segmentation fault at this point:

Code: Select all

gdb minimal
run
// When the crash happens type "bt" and press Enter
// Post the backtrace here
Thank you.

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.
nixyhustle
Knows some wx things
Knows some wx things
Posts: 29
Joined: Sun Jan 22, 2023 10:41 pm

Re: Minimal Sample Error

Post by nixyhustle »

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.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Minimal Sample Error

Post by ONEEYEMAN »

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.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7459
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Minimal Sample Error

Post by ONEEYEMAN »

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.
nixyhustle
Knows some wx things
Knows some wx things
Posts: 29
Joined: Sun Jan 22, 2023 10:41 pm

Re: Minimal Sample Error

Post by nixyhustle »

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.
Thank you for the resource, I will try it out after my morning classes.
nixyhustle
Knows some wx things
Knows some wx things
Posts: 29
Joined: Sun Jan 22, 2023 10:41 pm

Re: Minimal Sample Error

Post by nixyhustle »

ONEEYEMAN wrote: Mon Jan 30, 2023 6:16 am 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.
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! :)
Post Reply