Page 1 of 1

[wxGTK] Glib-GObject warnings

Posted: Wed Feb 25, 2009 12:13 pm
by Stefan_troeger
Heh

Since a short time i have lots of these warnings in my app (with different numbers of course):

GLib-GObject-WARNING **: /build/buildd/glib2.0-2.18.2/gobject/gsignal.c:2384: instance `0x2406040' has no handler with id `51'

I had a hard time while trying to track the reason down, but now i am totaly confused: even the mimimal sample produces these warnings! I am pretty sure they appear only for some time, maybe 2 weaks now, i never saw these kind of warning before, but i have no idea what the reason could be!

This type of warning don't interfere with the programm, but it's annoying to see dozens of them every time i execute my code!

Any idea what the reason could be?


Using gcc on Ubuntu intrepid with wxGtk2.8.

Thanks, stefan

Use a debugger

Posted: Wed Feb 25, 2009 2:32 pm
by computerquip
Normally, I would be able to help you out due to my excess amounts of googling and research but I haven't really found much but a bunch of questions concerning GLib but none that really have a decent answer.

As a result, I can easily recommend that you use a debugger in order to find where the problem is. When that occurs, please post the code if your still unsure on how to handle the error.

If you already know where the problem is but you do not know how to fix it, please post a snippet of the section so we can better understand the situation you created.

Posted: Wed Feb 25, 2009 6:59 pm
by Stefan_troeger
Hello

Thanks for your answer!

Actually i don't know how to debug this kind of problem because i can't find any function-call which is emitting this warning... i show what i mean with a small example!

i stripped the wxwidgets minimal sample to the smallest possible size:

Code: Select all

class MyApp : public wxApp
{
public:
    virtual bool OnInit();
};

class MyFrame : public wxFrame
{
public:
    // ctor(s)
    MyFrame(const wxString& title);
};

// 

IMPLEMENT_APP(MyApp)

bool MyApp::OnInit()
{
    if ( !wxApp::OnInit() )
        return false;

    // create the main application window
    MyFrame *frame = new MyFrame(_T("Minimal wxWidgets App"));

}

MyFrame::MyFrame(const wxString& title)
       : wxFrame(NULL, wxID_ANY, title)
{
}

and even this code generates the GLib warning on exit (it appears in console when closing the window)! The debugger says "Program exited normally".

And this way it works all the time in my main app, everytime i close something i get lots of warnings...

Hope somebody encountered this befor!

Stefan

Posted: Wed Feb 25, 2009 9:17 pm
by computerquip
>.>... What IDE do you use?

Posted: Thu Feb 26, 2009 5:42 pm
by Stefan_troeger
Heh

I use eclipse, but same results for gedit+console!

Re: [wxGTK] Glib-GObject warnings

Posted: Tue Mar 27, 2012 5:11 pm
by kainjow
I am still getting this, using glib 2.3, and a bare bones app (I stripped as much as possible). It only happens when you init the window and then destroy it. I tried several combinations of disconnecting events, destroying the window directly through the close event. Nada.

I suppose next step will be to try building with wxWindows trunk (am using 2.9.3 now) and see if they fixed the issue there. If not, then I'll try a debug build of wxWindows and try to find the problem.