Re: Gtk::Application::get_default segfault on exit



(sorry for the spam)

On 20 June 2017 at 22:43, Daniel Boles <dboles src gmail com> wrote:

meaning that the returned Application is not referenced, and can be double-freed

specifically, if I'm right, it IS double-freed, plus you try to use it after the 1st free:
  • you instantiate an unnamed RefPtr<Application> from get_default()
  • it immediately gets destroyed and decrements the reference count
  • which, because it didn't increment upon construction, causes the Application to get destroyed
  • then, on closing the window, it calls something on the Application to say 'one of your windows is gone', but there IS no Application!
  • boom.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]