Re: orbit examples on FreeBSD
- From: Frank Rehberger <Frank Rehberger web de>
- To: Gernot Hueber <hueber riic at>
- Cc: "orbit-list gnome org" <orbit-list gnome org>
- Subject: Re: orbit examples on FreeBSD
- Date: Mon, 31 May 2004 15:18:10 +0200
Gernot Hueber wrote:
Hello,
I have tried to run the orbit examples on FreeBSD without success yet.
Actually the server part is running whereas the client core dumps :-(
Have a look at the gdb session appended.
sorry, I never tested on BSD :/
Probably this relates to command
fscanf (stream, "%as", &objref);
in function "etk_import_object_from_stream()"
it seems, format '%as' is not supported, in consequence returned string
pointer is undefined.
The following is a fast hack to solve compatibility problems:
/**
*
*/
CORBA_Object
etk_import_object_from_stream (CORBA_ORB orb,
FILE *stream,
CORBA_Environment *ev)
{
CORBA_Object obj = CORBA_OBJECT_NIL;
gchar objref[(32*1024)+1];
fscanf (stream, "%32768s", objref); /* FIXME, handle input error */
obj = (CORBA_Object) CORBA_ORB_string_to_object (orb,
objref,
ev);
return obj;
}
Regards, Frank
Any clues?
Thanks in advance.
Gernot
Program received signal SIGSEGV, Segmentation fault.
0x280990fa in CORBA_ORB_string_to_object () from /usr/local/lib/
libORBit-2.so.0
(gdb) st
Ambiguous command "st": stack, status, step, stepi, stepping, stop.
(gdb) bt
#0 0x280990fa in CORBA_ORB_string_to_object () from /usr/local/lib/
libORBit-2.so.0
#1 0x0804970c in etk_import_object_from_stream (orb=0x807e400,
stream=0x282b8220, ev=0xbfbfeb48)
at examples-toolkit.c:111
#2 0x0804977d in etk_import_object_from_file (orb=0x807e400,
filename=0xbfbfeb78 "calculator.ref",
ev=0xbfbfeb48) at examples-toolkit.c:135
#3 0x0804934a in main (argc=1, argv=0xbfbfebb8) at calculator-client.
c:120
#4 0x08049092 in _start ()
(gdb) up
#1 0x0804970c in etk_import_object_from_stream (orb=0x807e400,
stream=0x282b8220, ev=0xbfbfeb48)
at examples-toolkit.c:111
111 obj = (CORBA_Object) CORBA_ORB_string_to_object (orb,
(gdb) list
106 CORBA_Object obj = CORBA_OBJECT_NIL;
107 gchar *objref=NULL;
108
109 fscanf (stream, "%as", &objref); /* FIXME, handle
input error */
110
111 obj = (CORBA_Object) CORBA_ORB_string_to_object (orb,
112 objref,
113 ev);
114 free (objref);
115
(gdb) print *orb
$1 = <incomplete type>
(gdb) print orb
$2 = 0x807e400
(gdb) print objref
$3 = (gchar *) 0x0
(gdb) print *objref
Error accessing memory address 0x0: Bad address.
(gdb) print *ev
$4 = {_id = 0x0, _major = 0, _any = {_type = 0x0, _value = 0x0,
_release = 0 '\0'}}
(gdb)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]