Skip to content
This repository has been archived by the owner on Dec 1, 2020. It is now read-only.

Removing ofxUIDropDownList causes malloc error #211

Open
genekogan opened this issue Jun 30, 2014 · 0 comments
Open

Removing ofxUIDropDownList causes malloc error #211

genekogan opened this issue Jun 30, 2014 · 0 comments

Comments

@genekogan
Copy link

Trying to remove toggles from an ofxUIDropDownList or removing the DropDownList itself causes application to crash. For example:

gui = new ofxUICanvas("canvas");
gui->setWidth(300);

vector<string> items;
items.push_back("this");
items.push_back("that");

ofxUIDropDownList *dd = gui->addDropDownList("dropdown", items);

dd->removeToggle("this");

The stack trace starts with an attempt to delete pointer rect inside the destructor ofxUIWidget::~ofxUIWidget() and gives the following:

mySketchDebug(23104,0xac89c2c0) malloc: *** error for object 0xd347b0: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
(lldb)

Same thing happens when trying to remove all toggles at same time, e.g. dd->removeToggles() or trying to just delete the whole widget from gui altogether, e.g. gui->removeWidget("dropdown" or gui->removeWidget(dd).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant