Project

General

Profile

Actions

Bug #1791

closed
СS KD

Segfault on deleting WPopupMenu in a widget destructor

Bug #1791: Segfault on deleting WPopupMenu in a widget destructor

Added by Стойчо Стефанов Stoycho Stefanov over 13 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
03/27/2013
Due date:
% Done:

0%

Estimated time:

Description

Hey,

I'm using the WPopupMenu exactly as in Treeview example shown and get segmentation fault when I try to delete a widget using its popup menu (see attachment: Widget.cpp line 144). With earlier wt versions this was ok (the last wt where I saw it works was 3.2.1). When I call the destructor (Widget.cpp line 144) and try to delete the popup in it, it seems that the popup is already deleted. If I do not delete the popup in the destructor it would be a memory leak, moreover, a segmentation fault occur on application destructor call.

I tried to use a boost::scoped_ptr (actually it was my original intention, in order not to forget to delete the popup in the destructor and was ok with wt-3.2.1) instead of a "simple" pointer, but with any success.

Regards,
Stoycho

s.: tested with Wt-3.3.0RC4


Files

Panel_popup.zip (11.8 KB) Panel_popup.zip test-example WMenuPopup clean up Стойчо Стефанов Stoycho Stefanov, 03/27/2013 03:06 PM

KD Updated by Koen Deforche over 13 years ago Actions #1

  • Status changed from New to InProgress
  • Assignee set to Koen Deforche

KD Updated by Koen Deforche over 13 years ago Actions #2

  • Status changed from InProgress to Resolved

Hey,

Thanks for the updated test case. I've fixed this in latest git.

Regards,
koen

СS Updated by Стойчо Стефанов Stoycho Stefanov over 13 years ago Actions #3

Hey,
thanks for the fix. Now it's good.

regards,
stoycho

KD Updated by Koen Deforche over 13 years ago Actions #4

  • Status changed from Resolved to Closed
Actions

Also available in: PDF Atom