<br><div class="gmail_quote">On Thu, May 13, 2010 at 3:59 PM, Caleb Johnston <span dir="ltr"><<a href="mailto:cjj37@cornell.edu">cjj37@cornell.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
I only get a SIGSEGV signal from the OS. However, I do get some other strange behavior that I don't fully understand. I have included it below.<div><br></div><div>When I start the program in the debugger, I get this:</div>
<div><div>** (<unknown>:15767): CRITICAL **: atk_object_set_name: assertion `name != NULL' failed</div><div><br></div></div></blockquote><div>I believe this is gtk / gnome issue. I used to see this when I was using Ubuntu 9.04 not anymore with 10.04 </div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div></div><div>And when the seg fault happens, I see this:</div><div><div>(Internal error: pc 0x3b4adb in read in psymtab, but not in symtab.)</div>
<div>(Internal error: pc 0x3b4ada in read in psymtab, but not in symtab.)</div><div>(Internal error: pc 0x3b4ada in read in psymtab, but not in symtab.)</div><div>(Internal error: pc 0x3b4ada in read in psymtab, but not in symtab.)</div>
<div>(Internal error: pc 0x3b4a80 in read in psymtab, but not in symtab.)</div><div>(Internal error: pc 0x3c25a7 in read in psymtab, but not in symtab.)</div><div>(Internal error: pc 0x3c25a6 in read in psymtab, but not in symtab.)</div>
<div>(Internal error: pc 0x3c25a6 in read in psymtab, but not in symtab.)</div><div>(Internal error: pc 0x3c25a6 in read in psymtab, but not in symtab.)</div><div>(Internal error: pc 0x3c2390 in read in psymtab, but not in symtab.)</div>
</div><div><br></div></div></blockquote><div>I just did a quick google search .. looks like this is more or less gdb issue </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div><br></div><div>On windows, I just get error code 3 at the same point. The only reason I tried to perform the Update call is because I thought it might alleviate this problem. But it didn't. If its of use, here is some more system info:</div>
<div><br></div><div>Linux: Ubuntu 9.10</div><div>Windows: XP SP3</div><div><br></div><div>Linux runs in VMware Fusion but i get the same problem in windows without the VM. And the Windows machine has over 3GB of Ram, so I doubt that its out of memory in this case.</div>
<div><br></div></div></blockquote><div>Does your program crash in release mode (release build) ? </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div>
<div></div><div>thanks,</div><div>Caleb</div><div><div></div><div class="h5"><div><br></div><br><div class="gmail_quote">On Thu, May 13, 2010 at 3:45 PM, Aashish Chaudhary <span dir="ltr"><<a href="mailto:aashish.chaudhary@kitware.com" target="_blank">aashish.chaudhary@kitware.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">normally a push on vector should not result in crash. Something else is wrong somewhere. <div><br></div><div>Also are you getting std::bad_alloc exception? <div>
<div></div><div><br><br><div class="gmail_quote">On Thu, May 13, 2010 at 3:41 PM, Caleb Johnston <span dir="ltr"><<a href="mailto:cjj37@cornell.edu" target="_blank">cjj37@cornell.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">If I comment out the code, it does not crash. But I also have to end the whole control flow at that point because everything after it depends upon that data. But there is no crash.<div>
<br></div><font color="#888888"><div>Caleb</div></font><div><div></div><div><div><br><br>
<div class="gmail_quote">On Thu, May 13, 2010 at 3:25 PM, Aashish Chaudhary <span dir="ltr"><<a href="mailto:aashish.chaudhary@kitware.com" target="_blank">aashish.chaudhary@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Can you try this.. <div><br></div><div>Can you comment the code where you are loading volume data? And see if you can replicate the crash?</div><div><br><br><div class="gmail_quote"><div><div></div><div>On Thu, May 13, 2010 at 3:17 PM, Caleb Johnston <span dir="ltr"><<a href="mailto:cjj37@cornell.edu" target="_blank">cjj37@cornell.edu</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div>The code is not that compilable without Qt, VTK, ITK, and Cmake installed. It is publicly hosted at SourceForge:<div>
<a href="http://sourceforge.net/projects/glassbrain/" target="_blank">http://sourceforge.net/projects/glassbrain/</a></div>
<div><br></div><div>And the stack trace shows the problem arrises from the AddVertex call.<div><div></div><div><br><br><div class="gmail_quote">On Thu, May 13, 2010 at 2:25 PM, David Doria <span dir="ltr"><<a href="mailto:daviddoria%2Bvtk@gmail.com" target="_blank">daviddoria+vtk@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div>On Thu, May 13, 2010 at 2:16 PM, Caleb Johnston <<a href="mailto:cjj37@cornell.edu" target="_blank">cjj37@cornell.edu</a>> wrote:<br>
> I'm getting a segfault when calling vtkMutableUndirectedGraph::AddVertex.<br>
> However, it does not always occur at the same vertex. Sometimes it is after<br>
> the 2nd vertex. Sometimes it won't happen at all (though rarely). I'm only<br>
> adding about 120 vertices. And the program is not consuming large amounts of<br>
> data so I don't understand why this is happening. Also, this only happens in<br>
> Linux and Windows but not MacOS X. Below, I have included my algorithm for<br>
> adding vertices.<br>
> thanks,<br>
> Caleb<br>
> ...<br>
> int len = 0;<br>
> double X,Y,Z,Count;<br>
> for(i=0, j=0; j<numberOfLabels; i+=3, j++){<br>
> X = (double)coords[i];<br>
> Y = (double)coords[i+1];<br>
> Z = (double)coords[i+2];<br>
> Count = (double)centroids[j];<br>
> if(Count>0.0){<br>
> X = X / Count;<br>
> Y = Y / Count;<br>
> Z = Z / Count;<br>
> len++;<br>
> graph->AddVertex(); // crashes here.<br>
> graph->Update();<br>
> points->InsertNextPoint(X, Y, Z);<br>
> }<br>
> }<br>
> ...<br>
<br>
</div></div>I've used this in Linux plenty of times with no problems. If you post<br>
some compilable code I can see if it works on my machine. My initial<br>
bet is that something is going wrong around there, like accessing out<br>
of bounds elements in coords or centroids.<br>
<br>
Thanks,<br>
<font color="#888888"><br>
David<br>
</font></blockquote></div><br></div></div></div>
<br></div></div><div>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></div></blockquote></div><div><br><br clear="all"><br>-- <br>| Aashish Chaudhary <br>| R&D Engineer <br>| Kitware Inc. <br>| <a href="http://www.kitware.com" target="_blank">www.kitware.com</a> <br>
</div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>| Aashish Chaudhary <br>| R&D Engineer <br>| Kitware Inc. <br>| <a href="http://www.kitware.com" target="_blank">www.kitware.com</a> <br>
</div></div></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br><br clear="all"><br>-- <br>| Aashish Chaudhary <br>| R&D Engineer <br>| Kitware Inc. <br>| <a href="http://www.kitware.com">www.kitware.com</a> <br>