codekiddy - can you try the above example and let us know if you also see a
hang at that line?  Tomorrow I'll try rebuilding (this time with
GTKMM_ATKMM_ENABLED #undef'd) just to confirm that it doesn't then fail.

OK, I've rebuilt the gtkmm with *#define **GTKMM_ATKMM_ENABLED 1 , *compiled
the code you provided, set the breakpoints and run the application.

The result is the same as yours:



*The code:*




* int main (int argc, char *argv[])    {        Gtk::Main       *app = new
Gtk::Main (&argc, &argv);        Gtk::Window  *mainWnd = new Gtk::Window;*

*             delete mainWnd;*  // indirectly calls Atk::~implementor and
application crashes.




*       delete app;       return 0;    }*

Exception thrown (atkmm.dll) in gtkmm.exe: Access violation writing location

On Tue, Nov 17, 2015 at 7:28 PM, John Emmas <[email protected]> wrote:

> On 17/11/2015 15:54, Kjell Ahlstedt wrote:
>
>
> The question now is: Why is pCppObject_->unreference() called in the
> RefPtr destructor when gtkmm,
> atkmm and glibmm are built with MSVC? Who sets pCppObject_ to something !=
> nullptr? Or isn't RefPtr's default constructor executed when the
> Gtk::Window is created?
>
>
> RefPtr is proving tricky to debug into (maybe because it's a template -
> and inline?)  However while trying it, I discovered something slightly more
> worrying.  Even this fails when GTKMM_ATKMM_ENABLED is #defined:-
>
>     int main (int argc, char *argv[])
>     {
>         Gtk::Main       *app = new Gtk::Main (&argc, &argv);
>         Gtk::Window  *mainWnd = new Gtk::Window;
>
>         delete mainWnd;  // <-- hangs here !!
>         delete app;
>
>         return 0;
>     }
>
> codekiddy - can you try the above example and let us know if you also see
> a hang at that line?  Tomorrow I'll try rebuilding (this time with
> GTKMM_ATKMM_ENABLED #undef'd) just to confirm that it doesn't then fail.
>
> John
>
>
>
> _______________________________________________
> gtkmm-list mailing list
> [email protected]
> https://mail.gnome.org/mailman/listinfo/gtkmm-list
>
>
_______________________________________________
gtkmm-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to