<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>Hi Yumin,</div><div><br></div><div>You're right, without any debug information like a line number, the stack trace doesn't tell me anything. I'll try building CMBv4 again today but if you get a debug build of CGM going, that would be great, too.</div><div><br></div><div>    David<br><br>Sent from my iPad</div><div><br>On Nov 11, 2014, at 19:20, Yumin Yuan <<a href="mailto:yumin.yuan@kitware.com">yumin.yuan@kitware.com</a>> wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr">Dave,<div><br></div><div>I have something working, and also have something "crashing" inside cgm.</div><div><br></div><div>Things work for:</div><div>* one bridge session with multiple read operators: each model from "read" will show as children of  the same "bridge session". This works for both cgm and discrete bridges.</div><div>* For cgm bridge, after "read", the "create prism/sphere" will work ONLY if I start a new bridge-session, which means the "prism/sphere" model will show as children of the New session.</div><div><br></div><div>The following will crash inside cgm:</div><div><div>* For cgm bridge, after "read", the "create prism/sphere" will crash inside cgm if I use the same bridge-session of "read", and I verified that GeometryModifyTool::instance() was NOT null. Here is the trace of crash ... (It doesn't seem to help)</div></div><div><br></div><div><div>Exception Type:  EXC_BAD_ACCESS (SIGSEGV)</div><div>Exception Codes: EXC_I386_GPFLT</div><div><br></div><div>Thread 0 Crashed:: Dispatch queue: com.apple.main-thread</div><div>0   libcgm.0.dylib                <span class="" style="white-space:pre">        </span>0x000000011ec78754 GeometryModifyTool::prism(double, int, double, double) + 214</div><div>1   libcgmSMTK.dylib              <span class="" style="white-space:pre">  </span>0x000000011e992972 smtk::bridge::cgm::CreatePrismOperator::operateInternal() + 1730 (CreatePrismOperator.cxx:81)</div><div>2   libSMTKCore.dylib             <span class="" style="white-space:pre">      </span>0x00000001074b9229 smtk::model::Operator::operate() + 137 (Operator.cxx:74)</div><div>3   libModelBridge_Plugin.dylib   <span class="" style="white-space:pre">    </span>0x0000000107b6677a vtkModelManagerWrapper::ProcessJSONRequest() + 6522 </div></div><div><br></div><div>Thanks,</div><div>Yumin</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 7, 2014 at 9:30 PM, David Thompson <span dir="ltr"><<a href="mailto:david.thompson@kitware.com" target="_blank">david.thompson@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Yumin,<br>
<br>
I've merged in some code that goes a little further than what we talked about as far as displaying bridge sessions in the Qt tree view. Instead of just adding a new subclass of DescriptivePhrase, I made bridges entities just like ModelEntity, Face, Edge, etc.<br>
<br>
There is a new class, smtk::model::BridgeSession, that is a Cursor subclass. You can get an array of all the bridge sesssion in a Manager with<br>
<br>
    smtk::model::Manager::Ptr mgr;<br>
    BridgeSessions sessions = mgr->allSessions();<br>
<br>
and it will list models assigned to it:<br>
<br>
    ModelEntities models = sessions[0].models();<br>
<br>
This is used to present models as children of bridge sessions in DescriptivePhrase hierarchies. The BridgeSession class also provides some convenience methods for accessing bridge information. See smtk/bridge/cgm/testing/python for some examples.<br>
<br>
Please let me know if you have any problems using this to present bridges in the Qt tree view in ModelBuilder.<br>
<span class="HOEnZb"><font color="#888888"><br>
        David</font></span></blockquote></div><br></div>
</div></blockquote></body></html>