Hello. It's with a strong headache that I knock here. Well, reporting the random error (~20%) is perhaps too complex, so let me start with a simple request: does someone have an example of how to make a new instance of an object through POA? I'm not sure mine is good:
use CORBA::MICO; my $orb = CORBA::ORB_init("mico-local-orb"); # Initialize CORBA and the Portable Object Adapter my $poa = $orb->resolve_initial_references("RootPOA"); $poa->_get_the_POAManager->activate(); # Create a MyNmsSession object and register it with CORBA my $myNmsSession = new MyNmsSession; my $objNms = $poa->servant_to_reference($myNmsSession); ... rest of the app ... package MyNmsSession; @MyNmsSession::ISA = qw(POA_nmsSession::NmsSession_I); sub new { my $self = bless {}; } sub associatedSession {} sub endSession {} sub ping {} sub eventLossOccurred {} sub eventLossCleared {}
Is it the right way to use POA? Should I free something before closing the app? BTW, this is the trace generated by running perl <myScript> on gdb:
Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -1218563424 (LWP 5501)] 0x01238565 in MICOPOA::POACurrent_impl::CurrentState::CurrentState () +from /usr/local/lib/libmico2.3.11.so (gdb) bt #0 0x01238565 in MICOPOA::POACurrent_impl::CurrentState::CurrentState + () from /usr/local/lib/libmico2.3.11.so #1 0x01238deb in MICOPOA::POACurrent_impl::set () from /usr/local/lib +/libmico2.3.11.so #2 0x012466db in MICOPOA::POA_impl::perform_invoke () from /usr/local +/lib/libmico2.3.11.so #3 0x01245e28 in MICOPOA::POA_impl::local_invoke () from /usr/local/l +ib/libmico2.3.11.so #4 0x0124560e in MICOPOA::POA_impl::invoke () from /usr/local/lib/lib +mico2.3.11.so #5 0x01197f51 in CORBA::ORB::invoke_async () from /usr/local/lib/libm +ico2.3.11.so #6 0x011c6574 in MICO::IIOPServer::exec_invoke_request () from /usr/l +ocal/lib/libmico2.3.11.so #7 0x011c689a in MICO::IIOPServer::handle_invoke_request () from /usr +/local/lib/libmico2.3.11.so #8 0x011c5dd7 in MICO::IIOPServer::handle_input () from /usr/local/li +b/libmico2.3.11.so #9 0x011c80eb in MICO::IIOPServer::input_callback () from /usr/local/ +lib/libmico2.3.11.so #10 0x011bd0a2 in MICO::GIOPConn::do_read () from /usr/local/lib/libmi +co2.3.11.so #11 0x011be18c in MICO::GIOPConn::callback () from /usr/local/lib/libm +ico2.3.11.so #12 0x011b0cc5 in MICO::SocketTransport::callback () from /usr/local/l +ib/libmico2.3.11.so #13 0x01179e9f in MICO::SelectDispatcher::handle_fevents () from /usr/ +local/lib/libmico2.3.11.so #14 0x0117a8ed in MICO::SelectDispatcher::run () from /usr/local/lib/l +ibmico2.3.11.so #15 0x0119882c in CORBA::ORB::wait () from /usr/local/lib/libmico2.3.1 +1.so #16 0x0114af01 in CORBA::Request::get_response () from /usr/local/lib/ +libmico2.3.11.so #17 0x0114aa59 in CORBA::Request::invoke () from /usr/local/lib/libmic +o2.3.11.so #18 0x006a0d74 in _pmico_callStub (my_perl=0x8cdf008, cv=0x96a1124) at + /usr/local/include/mico/template.h:102 #19 0x009140a5 in Perl_pp_entersub () from /usr/lib/perl5/5.8.0/i386-l +inux-thread-multi/CORE/libperl.so #20 0x008f782a in Perl_runops_debug () from /usr/lib/perl5/5.8.0/i386- +linux-thread-multi/CORE/libperl.so #21 0x008ab9fb in perl_run () from /usr/lib/perl5/5.8.0/i386-linux-thr +ead-multi/CORE/libperl.so #22 0x008ab685 in perl_run () from /usr/lib/perl5/5.8.0/i386-linux-thr +ead-multi/CORE/libperl.so #23 0x08049413 in main ()
Thanks, Enrico

Edit: g0n - added readmore tags.


In reply to CORBA, MICO and segfault by enriirne

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.