<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial,helvetica,sans-serif;font-size:10pt"><div style="font-family: arial,helvetica,sans-serif; font-size: 10pt;">Hello again,<br><br>Thanks a lot for the suggestions :-) And a good day!<br><br>I tracked down the problem on Sunday night :-)! It was one of those compatibility <br>issues between ParaView 2.4.x, and ParaView 3.x.x. I was basically trying to port <br>a plugin from ParaView 2.4.4 to ParaView 3.x.x.<br><br>In the original code, the following line of code was sufficient, in the reader's constructor:<br><br>this->SetNumberOfOutputPorts(0);<br><br>But in ParaView 3.x.x, it looks like that does not work... I had to modify that line to:<br><br>this->SetNumberOfOutputPorts(1);<br><br>And in addition, I had to explicitly define a "FillOutputPortInformation" function, and <br>declare exactly what data was going to be sent out via this port.
<br><br>Once these changes were made, things worked out fine!<br><br>Have a nice day!<br><br>Philippose<br><br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Original Message ----<br>From: Sean Ziegeler (Contractor) <sean.ziegeler@nrlssc.navy.mil><br>To: Philippose Rajan <sarith@rocketmail.com><br>Cc: paraview@paraview.org<br>Sent: Monday, August 20, 2007 6:49:59 PM<br>Subject: Re: [Paraview] Paraview3 External plugin - call sequence<br><br><div>I recommend using a debugger as well. Make sure you compile all of <br>ParaView and your plugin with -g. It should catch the Seg Fault and <br>show you precisely where it happens. And you can do a backtrace <br>yourself to really want to, but it may not be necessary.<br><br>The only thing I don't like about the debugger, at least with gdb on <br>Linux, is that break points in the plugin code itself don't get <br>triggered if
you load the plugin at run time. I guess its hard for the <br>debugger to track address space from a dlopen(). Anyway, won't need to <br>set a break point to make the debugger stop at the seg fault, but you <br>may need it to step through code _before_ the seg fault. One work <br>around is to set the break point in the ParaView code (e.g., one of the <br>methods in the previous post). If you really need to set a break point <br>in the plugin code, another work around is to compile the code into <br>ParaView either statically or dynamically.<br><br>One other work-around that works for a run-time loaded plugin, is to <br>send a signal to itself. The following works for me in Linux:<br>#if 1<br>#include <signal.h><br>#include <unistd.h><br>signal(1, SIG_IGN); kill(getpid(), 1);<br>#endif<br><br>The #if is so you can change the 1 to 0 to temporarily disable it. <br>Anyway, it will
force the debugger to stop at that line of code but <br>without killing the process or interrupting it if the debugger is not <br>running.<br><br>Hope that helps,<br>Sean<br><br>clinton@elemtech.com wrote:<br>> If you're ok with debugging...<br>> <br>> Try setting a breakpoint in<br>> pqReaderFactory::loadFileTypes<br>> which should be called at start up, and again when your plugin loads.<br>> You can follow that to make sure it reads the xml file included in your plugin <br>> which defines the reader's file extention(s) among other stuff.<br>> <br>> pqReaderFactory::createReader should be called when trying to make your <br>> reader.<br>> <br>> Clint<br>> <br>> On Sunday 19 August 2007 9:51:28 am Philippose Rajan wrote:<br>>> Hello,<br>>><br>>> Could someone give me a brief overview of the sequence of events (functions<br>>> called for example), when I load an external "Reader" plugin, a
"GUI"<br>>> plugin (which allows me to load specific file types), and then open a file<br>>> which is meant to be handled by this custom reader?<br>>><br>>> A plugin which worked in Paraview 3.1.0 (July snapshot) does not work<br>>> anymore after I compiled Paraview 3.1.1 (from CVS), and I would like to<br>>> trace the possible reason for the error which says:<br>>><br>>> Invalid output port : 0 . Available number of output ports : 0<br>>> Segmentation Fault<br>>><br>>> Regards,<br>>><br>>> Philippose<br>>><br>>><br>>><br>>><br>>><br>>> <br>>> ___________________________________________________________________________<br>>> _________ Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s<br>>> user panel and lay it on us.<br>>> <a target="_blank"
href="http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7">http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7</a><br>> <br>> <br>> _______________________________________________<br>> ParaView mailing list<br>> ParaView@paraview.org<br>> <a target="_blank" href="http://www.paraview.org/mailman/listinfo/paraview">http://www.paraview.org/mailman/listinfo/paraview</a><br>> <br><br></div></div><br></div></div><br>
<hr size=1>Shape Yahoo! in your own image.
<a href="http://us.rd.yahoo.com/evt=48517/*http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7">Join our Network Research Panel today!</a>
</body></html>