Quantcast
Channel: Adobe Community : Popular Discussions - InDesign SDK
Viewing all articles
Browse latest Browse all 78596

CS4 TreeView assert

$
0
0

I'm randomly getting the following assert messages when working with TreeViews:

 

"We're adding an item '<node id description>' to the sorted list that already exists. Item will not be added."

"Adding a child with too high an index. If you're adding multiple children at once, use NodesAdded()"

 

When I hit continue I get a crash log. What's interesting is that the crash occurs when I derive the InterfacePtr to the ITreeViewMgr for the tree view widget, and call the ChangeRoot() method.

 

Exception Type: EXC_BAD_ACCESS (SIGSEGV)

Exception Codes: KERN_INVALID_ADDRESS at 0x0000000055555591

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Thread 0 Crashed: Dispatch queue: com.apple.main-thread

 

0 WidgetBinLib.dylib 0x03a8a465 TreeNodeTraverser::TreeNodeTraverser(NodeID const&, ITreeViewMgr const*, short, TreeNodeTraverser::Direction) + 659

1 WidgetBinLib.dylib 0x03c27571 XTreeViewMgr::XTreeViewMgr(IPMUnknown*) + 1221

2 WidgetBinLib.dylib 0x03c1fefb XTreeViewMgr::Purge(long) + 589

3 WidgetBinLib.dylib 0x03c22503 XTreeViewMgr::AboveOrBelow(ITreeViewHierarchyAdapter*, NodeID const&, NodeID const&) + 5641

4 WidgetBinLib.dylib 0x03c227e6 XTreeViewMgr::AboveOrBelow(ITreeViewHierarchyAdapter*, NodeID const&, NodeID const&) + 6380

5 WidgetBinLib.dylib 0x03c22ac0 XTreeViewMgr::AboveOrBelow(ITreeViewHierarchyAdapter*, NodeID const&, NodeID const&) + 7110

6 WidgetBinLib.dylib 0x03c22b91 XTreeViewMgr::AboveOrBelow(ITreeViewHierarchyAdapter*, NodeID const&, NodeID const&) + 7319

7 WidgetBinLib.dylib 0x03c26cac XTreeViewMgr::ChangeRoot(short) + 1452

 

The problem seems to occur about one in ten times when I empty the TreeView and refill it again. Which I trigger using:

 

InterfacePtr<IPanelControlData> spPanelControlData(this, UseDefaultIID());
if (spPanelControlData == nil) break;

InterfacePtr<IControlView> spControlViewTreeView(spPanelControlData->FindWidget(kMyTreeViewWidgetID), UseDefaultIID());
if (spControlViewTreeView == nil) break;

InterfacePtr<ITreeViewMgr> spTreeViewMgr(spControlViewTreeView, IID_ITREEVIEWMGR);
if(spTreeViewMgr == nil) break;
 
spTreeViewMgr->ClearTree(kTrue);
spTreeViewMgr->ChangeRoot();

 

I'd like to provide more info about this but I'm not sure where to start looking as it seems to work most of the time. The only vague pattern I see is that I empty a tree view and then fill it.

 

Has anyone seen something like this before? Any hints about where to look?


Viewing all articles
Browse latest Browse all 78596

Trending Articles