i couldn't produce a trivial sample to reproduce but in my app I get a panic: sv_upgrade to unknown type 18670848 at lib/Wx/Docular.pm line 63.
when $treectrl->GetCount is called by Wx::Event::EVT_TREE_SEL_CHANGED with wxTR_HIDE_ROOT|wxTR_HAS_BUTTONS|wxTR_SINGLE the problem is that the even will be called very lately when destructing the app and then i get the error that looks like some XS bug. hope it helps best herbert