Languages and Scripting
Showing results for 
Search instead for 
Do you mean 

SEGV_MAPERR - Address not mapped to object

Occasional Visitor

SEGV_MAPERR - Address not mapped to object

Hello, I'm porting my application from PARISC2.0 to IA64.
I'm using the apache-axis distribution and allready compiled and testet parts of the package. But now when I use the axis_client lib I get this runtime error.
Here's the bt:

#0 0x60000000d6f99e10:0 in axiscpp::Call::openConnection (this=0x40012980)
at Call.cpp:403
#1 0x60000000d6f8f520:0 in axiscpp::Call::initialize (this=0x40012980,
nStyle=axiscpp::CPP_RPC_PROVIDER) at Call.cpp:172
#2 0x60000000caca3a90:0 in GeneralEvents::progress (this=0x4002ab00,
Value0=0x40022e0 "rO0ABXNyAC1vcmcuamJvc3MucHJveHkuZWpiLmhhbmRsZS5TdGF0ZWZ1bEhhbmRsZUltcGyoOsnhxOAQXAIAB0kACm9iamVjdE5hbWVMAAJpZHQAEkxqYXZhL2xhbmcvT2JqZWN0O0wAB2ludm9rZXJ0AB5Mb3JnL2pib3NzL2ludm9jYXRpb24vSW52b2tlcjtMAAlp"...,
Value1=0x4002490 "49C010AFD392120422630FA6C29E850D",
Value2=0x40024c0 "testfull", Value3=0, Value4=0x40024d0 "JUHU")
at GeneralEvents.cpp:136
#3 0x4003660:0 in main (No.Identifier_0=1, No.Identifier_1=0x7fffec00)
at test.cpp:15


info shared

Shared Object Libraries
tstart tend dstart dend
/usr/lib/hpux32/dld.so
0x60000000c0010000 0x60000000c009d6c0 0x200000007eff7000 0x200000007effbd40
.//libEventsMW.sl
0x60000000caca0000 0x60000000caca6610 0x200000007eff4000 0x200000007eff4228
/usr/lib/hpux32/libstd_v2.so.1
0x60000000c0e3c000 0x60000000c0fd2c00 0x200000007efe4000 0x200000007efefb38
/usr/lib/hpux32/libCsup.so.1
0x60000000c080f000 0x60000000c085d480 0x200000007efda000 0x200000007efdf890
/usr/lib/hpux32/libpthread.so.1
0x60000000c009e000 0x60000000c013a4d0 0x200000007efd7000 0x200000007efd95d8
/usr/lib/hpux32/libm.so.1
0x60000000c05ca000 0x60000000c071c0c0 0x200000007efd6000 0x200000007efd6c88
/usr/lib/hpux32/libunwind.so.1
0x60000000c0a61000 0x60000000c0ab4310 0x200000007efd5000 0x200000007efd59e0
/usr/lib/hpux32/libc.so.1
0x60000000c013b000 0x60000000c03c09a0 0x200000007efc1000 0x200000007efd2128
/usr/lib/hpux32/libdl.so.1
0x60000000c03c1000 0x60000000c03c4ed0 0x200000007efd4000 0x200000007efd4150
/appl/os/axis-c-1.5.0-HPUX/lib//libaxiscpp_client.so.0
0x60000000d6e38000 0x60000000d727d080 0x200000007efaf000 0x200000007efbbaa8
/usr/lib/hpux32/libuca.so.1
0x60000000c0ab5000 0x60000000c0abcaf0 0x200000007efd3000 0x200000007efd3150
/usr/lib/hpux32/libcl.so.1
0x60000000c0a60000 0x60000000c0a60304 0x200000007efc0000 0x200000007efc0018
/usr/lib/hpux32/libIO77.so.1
0x60000000c0abd000 0x60000000c0c72e70 0x200000007ef92000 0x200000007efa5bc8
/appl/os/axis-c-1.5.0-HPUX/lib/libaxis_xercesc.so
0x60000000cf44a000 0x60000000cf4bf880 0x200000007ef89000 0x200000007ef8b6b0
/appl/os/xerces-c_2_7_0-hpux_11.11-aCC/lib/libxerces-c.so
0x60000000d9168000 0x60000000d9d042a0 0x200000007ef30000 0x200000007ef88240
/usr/lib/hpux32/libnsl.so.1
0x60000000c03d5000 0x60000000c04cc2c0 0x200000007ef10000 0x200000007ef1de70
/usr/lib/hpux32/libxti.so.1
0x60000000c04cd000 0x60000000c04fb250 0x200000007ef0d000 0x200000007ef0f420
/appl/os/axis-c-1.5.0-HPUX/lib/libaxis3_transport_channel.so
0x60000000cf4c0000 0x60000000cf509390 0x200000007efac000 0x200000007efaca88
Total of 18 shared libraries.

I found out that m_pTransport was initialized by the Call::Call, but after that, then there's a Call::openConnection and if I print the m_pTransport Object I get:
m_pTransport= (class axiscpp::SOAPTransport *) 0x4002ab50
(gdb) print *m_pTransport
Error accessing memory address 0x2000000068747460: Bad address.

Any Ideas?
5 REPLIES
Acclaimed Contributor Acclaimed Contributor

Re: SEGV_MAPERR - Address not mapped to object

What is m_pTransport? A member of Call?

Where is this print: m_pTransport= 0x4002ab50
Where is this print: print *m_pTransport

You can put a hardware watchpoint on m_pTransport to see who changes it.
Occasional Visitor

Re: SEGV_MAPERR - Address not mapped to object

I'll try to explain:

I create a Object called GeneralEvents which is inherited from Stub.

Stub has a Member from type Call *m_pCall

when I generate GeneralEvents:

GeneralEvents *proxy = new GeneralEvents("http://xxx/webserviceurl", APTHTTP1_1);

the constructor calls the Stub constructor:

GeneralEvents::GeneralEvents(const char* pchEndpointUri, AXIS_PROTOCOL_TYPE eProtocol)
:Stub(pchEndpointUri, eProtocol)
{
}

thats the Stub constructor

Stub::Stub (const char *pcEndPointUri, AXIS_PROTOCOL_TYPE eProtocol):
m_pcUsername (NULL),
m_pcPassword (NULL)
{
m_pCall = new Call ();
m_pCall->setProtocol (eProtocol);
m_pCall->setEndpointURI (pcEndPointUri);
m_pTransport = m_pCall->getTransport ();

// Initialise m_viCurrentSOAPMethodAttribute to something sensible
// in case getFirstSOAPMethodAttribute isn't called first.
m_viCurrentSOAPMethodAttribute = m_vSOAPMethodAttributes.begin ();
}

The Stub Class holds a pointer of m_pTransport too.
Let's see what m_pCall->getTransport (); returns:
the Call constructor generates the m_pTransport Object:

m_pTransport = NULL;
m_nTransportType = APTHTTP1_1;
m_pTransport = SOAPTransportFactory::getTransportObject(m_nTransportType);

that's getTransportObject:

SOAPTransport* SOAPTransportFactory::getTransportObject(AXIS_PROTOCOL_TYPE eProtocol)
{
SOAPTransport* pTpt = NULL;
m_Create(&pTpt);
pTpt->setProtocol(eProtocol);
return pTpt;
}

and now there's this mysterios m_Create which takes a SOAPTransport **

m_Create is defined like this:

static CREATE_OBJECT1 m_Create;

and I only found out this typedef about CREATE_OBJECT1

typedef int (* CREATE_OBJECT1) (SOAPTransport** inst);


Anyway, after starting this testprogramm, and after generating GeneralEvents I get This for m_pTransport (both in the Call, and in the Stub class):

(gdb) print proxy->m_pTransport
$1 = (class axiscpp::SOAPTransport *) 0x4002ab50
(gdb) print *proxy->m_pTransport
Error accessing memory address 0x2000000068747460: Bad address.
(gdb) print *proxy->m_pCall->m_pTransport
Error accessing memory address 0x2000000068747460: Bad address.
(gdb) print proxy->m_pCall->m_pTransport
$2 = (class axiscpp::SOAPTransport *) 0x4002ab50

This works on PARISC2.0 but not on Itanium

Hope someone can understand what I mean...


Occasional Visitor

Re: SEGV_MAPERR - Address not mapped to object

ok, found it out for myself:
the Factory class generates a Object and calls a method which is'nt in the generatees Object, causes to call the destructor.... (there's a little mess with function ptr in the code...) but I used the axis3 library for this (which was the buggy one) now I use the axis2 libs and it works fine... nevermind my panic-call ;-)
Occasional Visitor

Re: SEGV_MAPERR - Address not mapped to object

I use the old lib
Highlighted
Acclaimed Contributor Acclaimed Contributor

Re: SEGV_MAPERR - Address not mapped to object

(gdb) print proxy->m_pTransport
$1 = (class axiscpp::SOAPTransport*) 0x4002ab50
(gdb) print *proxy->m_pTransport
Error accessing memory address 0x2000000068747460: Bad address.

Hmm. I would expect the second print to mention that 0x4002ab50 has a bad address, not 0x2000000068747460. Though perhaps it is trying to format the class? You may find it with:
x /20x 0x4002ab50

What versions of aCC6 and gdb are you using?