Re: Segfault in _this()



Hi Johan,

Please try upgrading to a later version of orbitcpp either 1.3.6 or better yet the latest version from CVS and cofirm whether the problem still exists. The generated code is now much simpler and hopefully easier to debug. While you are debugging you want to compile orbitcpp with CXXFLAGS=-g so that you can debug into the library as well as the generated stub/skel code.

As for where to look, please try and determine which memory reference caused the seg. fault. Was the rootPOA pointer null? Was the method invoked on a null pointer (null this pointer)? Was the object the method was invoked on deleted prior to the method call? Was the seg. fault inside one the calls to activate_object or servant_to_id?

Johan Cronje wrote:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all

I am trying to build a CORBA app with orbitcpp 1.3.5 and g++ 3.3.

In the following (generated) method (in sdr_corba-cpp-skels.cpp)
::sdr_corba::sdr_subcontroller_ptr POA_sdr_corba::sdr_subcontroller::_this()

the following line causes a segfault:
PortableServer::ObjectId_var oid = activated ? rootPOA->servant_to_id (this) : rootPOA->activate_object (this);

Where must I go look for the error? My server is a modified version of the
server.cc file in the orbitcpp-examples tarball (modified only to fit my
method names).

Thank You

Regards
Johan
- --
- --------------------------------------------------------------------------------
"There is beauty in simplicity"		-- Johan Cronje
- --------------------------------------------------------------------------------
Johan Cronje
Digital Signal Processing / Telecommunications Group
Electrical and Electronic Engineering Department
University of Stellenbosch
http://www.dsp.sun.ac.za/~jcronje
GNUPG Key: http://www.dsp.sun.ac.za/~jcronje/jcronje.asc
- --------------------------------------------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)

iQEVAwUBPykG8eEeclgONaRbAQLj5wf9ERHk4Olp32kst1UIU68g0RHeiJkk8Lyb
EMYD1MpD5ryikZdiwjRoGqWpe/QSfnjEee5LR4XC1NzpWZdtEW5DZyIXMBZjTaCZ
beeZaEpL0a+9afACBPzmAkcHPMU3TM/egxozzzFORzIS8vr2rirPNkekmbfMsoIB
xXpGo4J7pwYnrImqJJEyVXlbA2JSWdENsB87P4nOCw2t3x43q3F6WxdfacNsH4XQ
P1rtjE2/kEejA7XDrBMDR/J6FhjT1VZQ1M3ktRqAZ2zu/R31twdm3Tdvct74AAKy
PHoxG5jbqoxwP/gy4V3JpCjS6PuFgqNUhIChHH8bbZ5n2gBOsOO22Q==
=5Cd6
-----END PGP SIGNATURE-----

_______________________________________________
orbitcpp-list mailing list
orbitcpp-list gnome org
http://mail.gnome.org/mailman/listinfo/orbitcpp-list


--
Bowie Owens

CSIRO Mathematical & Information Sciences
phone  : +61 3 9545 8055
fax    : +61 3 9545 8080
mobile : 0425 729 875
email  : Bowie Owens csiro au






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]