This is very odd, the pointer in msg in line two, is passed directly as src in line 1, the fact that the address changes implies that their is some sort of stack corruption

#1  0x009f30d1 in player_map_data_t_copy (dest=0x71ce7008, src=0xffffffff)  at playerxdr.c:10745
#2  0x009f3158 in player_map_data_t_clone (msg=0xbfaa9614) at playerxdr.c:10759

I found a free that shouldnt have been there in the failed to get map case. This hopefully has fixed the mem corruption/segfault, but may not have fixed the failure to get the map. Let me know how it goes.

Toby

On 28/11/2007, Joseph Baxter <jlb@cs.nott.ac.uk> wrote:
Hello,

When I attempt to connect to the wavefront driver in the current cvs
version of player I get a segmentation fault (backtrace at end of email).

Line 1065 in wavefront.cc is always true leading to the player error
"failed to get map data". So the problem must be there somewhere :S

Ideas?

Cheers,

Joe.
~~~~~~~~
os: centos 5
player: cvs 27/11/07
stage: cvs 27/11/07
~~~~~~~~

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208154416 (LWP 21025)]
0x43d05a4c in memcpy () from /lib/libc.so.6
(gdb) backtrace
#0  0x43d05a4c in memcpy () from /lib/libc.so.6
#1  0x009f30d1 in player_map_data_t_copy (dest=0x71ce7008, src=0xffffffff)
    at playerxdr.c:10745
#2  0x009f3158 in player_map_data_t_clone (msg=0xbfaa9614) at
playerxdr.c:10759
#3  0x0011dcde in Message::CreateMessage (this=0xbfaa94a0,
    aHeader=@0xbfaa9514, data=0xbfaa9614, copy=true) at message.cc:126
#4  0x0011e7ff in Message (this=0xbfaa94a0, aHeader=@0xbfaa9514,
    data=0xbfaa9614, _queue=@0x97715a4, copy=true) at message.cc:69
#5  0x00117396 in Device::PutMsg (this=0x97714c8, resp_queue=@0x97715a4,
    hdr=0xbfaa9514, src=0xbfaa9614, copy=true) at device.cc:192
#6  0x001174c1 in Device::PutMsg (this=0x97714c8, resp_queue=@0x97715a4,
    type=3 '\003', subtype=2 '\002', src=0xbfaa9614, deprecated=0,
    timestamp=0x0) at device.cc:232
#7  0x00117bf6 in Device::Request (this=0x97714c8, resp_queue=@0x97715a4,
    type=3 '\003', subtype=2 '\002', src=0xbfaa9614, deprecated=0,
    timestamp=0x0, threaded=false) at device.cc:247
#8  0x00bb4311 in Wavefront::GetMap (this=0x9771558, threaded=false)
    at wavefront.cc:1065
#9  0x00bb600c in Wavefront::SetupMap (this=0x9771558) at wavefront.cc:1167
#10 0x00bb6180 in Wavefront::Setup (this=0x9771558) at wavefront.cc:421
#11 0x00115e58 in Driver::Subscribe (this=0x9771558, addr=
      {host = 16777343, robot = 6665, interf = 44, index = 0}) at
driver.cc:255
#12 0x001176e0 in Device::Subscribe (this=0x9771790, sub_queue=@0x9785514)
---Type <return> to continue, or q <return> to quit---
    at device.cc:139
#13 0x00ce1793 in PlayerTCP::HandlePlayerMessage (this=0x9767678, cli=0,
    msg=0x9795438) at playertcp.cc:1060
#14 0x00ce1ef8 in PlayerTCP::ParseBuffer (this=0x9767678, cli=0)
    at playertcp.cc:917
#15 0x00ce244c in PlayerTCP::ReadClient (this=0x9767678, cli=0)
    at playertcp.cc:813
#16 0x00ce26d1 in PlayerTCP::Read (this=0x9767678, timeout=100)
    at playertcp.cc:442
#17 0x08049c3f in main (argc=Cannot access memory at address 0x10cb6f7c
) at server.cc:306


This message has been checked for viruses but the contents of an attachment
may still contain software viruses, which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Playerstage-users mailing list
Playerstage-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-users



--
This email is intended for the addressee only and may contain privileged and/or confidential information