[PolyORB-users] Backtrace from cb_client.adb [was: Re: omniORB-4.1.0-beta1/src/examples/call_back/echo_callback.idl]

Oliver Kellogg oliver.kellogg at eads.com
Tue Feb 21 14:32:32 CET 2006


Hi,

I rewrote the cb_client.cc in Ada but I get a backtrace from polyorb-1.2r,
see attachment.

Thanks,

Oliver




-------------- next part --------------
    POLYORB VERSION: 
1.2r

    HOST MACHINE and OPERATING SYSTEM:
RedHat Linux 8.0 i686 i686 i386 GNU/Linux

    COMPILER VERSION

GNATLS 3.4.3 20041008 (prerelease) Copyright 1997-2004 Free Software
Foundation, Inc.

Source Search Path:
   <Current_Directory>
   /opt/gcc3/lib/gcc/i686-pc-linux-gnu/3.4.3/adainclude/


Object Search Path:
   <Current_Directory>
   /opt/gcc3/lib/gcc/i686-pc-linux-gnu/3.4.3/adalib/

    DESCRIPTION:
I rewrote the omniORB-4.1.0-beta1/src/examples/call_back/cb_client.cc in Ada
and ran the original cb_server.cc on another machine.
Here is what happens:

$ ./cb_client IOR:010000001400000049444c3a63622f43616c6c4261636b3a312e3000020000000000000054000000010102000e0000003134392e3230372e32342e3936000b800e000000000000000000000131010deadc0d000001000000010000001c0000000100000001000100000000000001010002000000010101000201010004ffff7f30000000010100000e0000003134392e3230372e32342e39360003800e000000000000000000000131010deadc0d000000000000
cb_client: server->one_time(call_back, "Hello!")

Program received signal SIGSEGV, Segmentation fault.
polyorb.representations.cdr.giop_1_2.set_converters (r=@0x825a698,
c=0x825ae50, w=0x0)
    at polyorb-representations-cdr-giop_1_2.adb:71
71            PolyORB.GIOP_P.Code_Sets.Converters.Set_GIOP_1_2_Mode (W.all);
(gdb) bt
#0  polyorb.representations.cdr.giop_1_2.set_converters (r=@0x825a698, c=0x825ae50, w=0x0)
    at polyorb-representations-cdr-giop_1_2.adb:71
#1  0x080ead35 in polyorb.protocols.giop.giop_1_2.send_request (implem=0x82503a0, 
    s=0x825aad8, r=0x825ae08, error=(kind => no_error, member => 0x0), <implemF>=0, <sF>=0)
    at polyorb-protocols-giop-giop_1_2.adb:1068
#2  0x080e1023 in polyorb.protocols.giop.common.common_process_locate_reply (
    sess=0x825aad8, locate_request_id=1, loc_type=object_here, <sessF>=0)
    at polyorb-protocols-giop-common.adb:418
#3  0x080e8afa in polyorb.protocols.giop.giop_1_2.process_message (implem=0x82503a0, 
    s=0x825aad8, <implemF>=0, <sF>=0) at polyorb-protocols-giop-giop_1_2.adb:378
#4  0x080ee015 in polyorb.protocols.giop.handle_data_indication (sess=0x825aad8, 
    data_amount=8, <sessF>=0) at polyorb-protocols-giop.adb:258
#5  0x0814ee94 in polyorb.protocols.handle_message (sess=0x825aad8, s=@0x1, 
    <sessF>=136687080) at polyorb-protocols.adb:103
#6  0x081150ac in polyorb.components.emit (port=0x825ae48, msg=@0x825ade8)
    at polyorb-components.adb:78
#7  0x0811ece8 in polyorb.filters.slicers.handle_message (f=0x825aab0, s=@0x0, <fF>=0)
    at polyorb-filters-slicers.adb:171
#8  0x081150ac in polyorb.components.emit (port=0x825ae48, msg=@0x825ade8)
    at polyorb-components.adb:78
#9  0x08176745 in polyorb.transport.connected.handle_message (te=0x825a9e8, msg=@0x1, 
    <teF>=136687080) at polyorb-transport-connected.adb:185
#10 0x081767a0 in polyorb.transport.connected.handle_message (te=0x825a9e8, msg=@0x1, 
    <teF>=136687080) at polyorb-transport-connected.adb:122
#11 0x081150ac in polyorb.components.emit (port=0x825ae48, msg=@0x825ade8)
    at polyorb-components.adb:78
#12 0x0811ece8 in polyorb.filters.slicers.handle_message (f=0x825aab0, s=@0x0, <fF>=0)
    at polyorb-filters-slicers.adb:171
#13 0x081150ac in polyorb.components.emit (port=0x825ae48, msg=@0x825ade8)
    at polyorb-components.adb:78
#14 0x0811517a in polyorb.components.emit_no_reply (port=0x825ade8, msg=@0x825ade8)
    at polyorb-components.adb:95
#15 0x080ee0e9 in polyorb.protocols.giop.handle_data_indication (sess=0x825aad8, 
    data_amount=12, <sessF>=0) at polyorb-protocols-giop.adb:249
#16 0x0814ee94 in polyorb.protocols.handle_message (sess=0x825aad8, s=@0x1, 
    <sessF>=136687080) at polyorb-protocols.adb:103
#17 0x081150ac in polyorb.components.emit (port=0x825ae48, msg=@0x825ade8)
    at polyorb-components.adb:78
#18 0x0811ece8 in polyorb.filters.slicers.handle_message (f=0x825aab0, s=@0x0, <fF>=0)
    at polyorb-filters-slicers.adb:171
#19 0x081150ac in polyorb.components.emit (port=0x825ae48, msg=@0x825ade8)
    at polyorb-components.adb:78
#20 0x08176745 in polyorb.transport.connected.handle_message (te=0x825a9e8, msg=@0x1, 
    <teF>=136687080) at polyorb-transport-connected.adb:185
#21 0x081150ac in polyorb.components.emit (port=0x825ae48, msg=@0x825ade8)
    at polyorb-components.adb:78
#22 0x0817951b in polyorb.transport.handlers.handle_event (h=0x825aa2c, <hF>=0)
    at polyorb-transport-handlers.adb:55
#23 0x0812d17b in polyorb.orb.run (orb=0x0, exit_condition=
      (condition => 0x825a960, task_info => 0x825a964), <orbF>=1)
    at polyorb-task_info.adb:292
#24 0x08169276 in polyorb.requests.invoke (self=0x1, invoke_flags=0)
    at polyorb-requests.adb:176
#25 0x080905c2 in corba.request.default_invoke (request=0x825a898, flags=0)
    at corba-request.adb:136
#26 0x0804e711 in cb.server.one_time (self=@0xbfffee70, c=@0xbfffee60, mesg=@0x8247508)
    at cb-server.adb:86
#27 0x08052365 in cb_client.do_single () at cb_client.adb:69
#28 0x080528cc in cb_client () at cb_client.adb:96
#29 0x0804b101 in main (argc=2, argv=(system.address) 0xbfffef44, 
    envp=(system.address) 0xbfffef50) at b~cb_client.adb:789
#30 0x420158d4 in __libc_start_main () from /lib/i686/libc.so.6


    REPEAT BY:
-- file: cb_client.adb
with CB.Server, CB.CallBack.Impl;

with CORBA;
with CORBA.Object;
with CORBA.ORB;

with PolyORB.Setup.No_Tasking_Server;
pragma Elaborate_All (PolyORB.Setup.No_Tasking_Server);
pragma Warnings (Off, PolyORB.Setup.No_Tasking_Server);

with PolyORB.CORBA_P.Server_Tools;
with PolyORB.Setup.Client;
pragma Warnings (Off, PolyORB.Setup.Client);

with Ada.Command_Line;
with Text_IO;

procedure CB_Client is

   use PolyORB.CORBA_P.Server_Tools;

   IOR : CORBA.String;
   Ref : CORBA.Object.Ref;

   Server : CB.Server.Ref;
   Client : CB.CallBack.Ref;

   procedure do_single is
   begin
      if CB.Server.Is_Nil(Server) then
         Text_IO.Put_Line ("cb_client: The server reference is nil!");
         return;
      end if;

      Text_IO.Put_Line ("cb_client: server->one_time(call_back, ""Hello!"")");
      CB.Server.one_time(Server, Client, CORBA.To_CORBA_String ("Hello!"));
      Text_IO.Put_Line ("cb_client: Returned.");
   end do_single;

begin
   CORBA.ORB.Initialize ("ORB");
   if Ada.Command_Line.Argument_Count < 1 then
      Text_IO.Put_Line ("usage : client <IOR_string_from_server>");
      return;
   end if;

   IOR := CORBA.To_CORBA_String (Ada.Command_Line.Argument (1));

   -- Get the reference to the server.
   CORBA.ORB.String_To_Object (IOR, Server);

   --  checking if it worked
   if CB.Server.Is_Nil (Server) then
      Text_IO.Put_Line ("main : cannot invoke on a nil reference");
      return;
   end if;

   Initiate_Servant (new CB.CallBack.Impl.Object, Client);
   Text_IO.Put_Line
     ("'" & CORBA.To_Standard_String (CORBA.Object.Object_To_String (Client)) &
      "'");
   do_single;

end CB_Client;


    SAMPLE FIX/WORKAROUND:
[If available ]



More information about the PolyORB-users mailing list