Project

General

Profile

Actions

Bug #1791

closed

Segfault on deleting WPopupMenu in a widget destructor

Added by Стойчо Стефанов Stoycho Stefanov over 11 years ago. Updated over 11 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
Actions #1

Updated by Koen Deforche over 11 years ago

  • Status changed from New to InProgress
  • Assignee set to Koen Deforche
Actions #2

Updated by Koen Deforche over 11 years ago

  • Status changed from InProgress to Resolved

Hey,

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

Regards,

koen

Actions #3

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

Hey,

thanks for the fix. Now it's good.

regards,

stoycho

Actions #4

Updated by Koen Deforche over 11 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF