Re: Help with map driver
aneves <[email protected]>
| Newsgroups | gmane.science.robotics.playerstage |
|---|---|
| Message-ID | <[email protected]> |
Rich Mattes-2 wrote:
>
> Have you tried using gdb on your driver? make sure that your plugin is
> compiled with the -g option, then run
>
now is my client program that's faulting here's the gdb output from him:
neves@neves:~/code/driver/test_client$ gdb ./loa
GNU gdb (GDB) 7.1-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Lendo símbolos de /home/neves/code/driver/test_client/loa...concluído.
(gdb) run
Starting program: /home/neves/code/driver/test_client/loa
[Thread debugging using libthread_db enabled]
calling connect
done
minR: 1e+09 minL: 1e+09
Program received signal SIGSEGV, Segmentation fault.
0x080498d3 in PlayerCc::ClientProxy::GetVar<char> (argc=1, argv=0xbffff3a4)
at /usr/include/player-2.0/libplayerc++/clientproxy.h:116
116 T v = aV;
(gdb) bt
#0 0x080498d3 in PlayerCc::ClientProxy::GetVar<char> (argc=1,
argv=0xbffff3a4) at /usr/include/player-2.0/libplayerc++/clientproxy.h:116
#1 PlayerCc::MapProxy::GetCell (argc=1, argv=0xbffff3a4) at
/usr/include/player-2.0/libplayerc++/playerc++.h:1219
#2 main (argc=1, argv=0xbffff3a4) at laserobstacleavoid.cc:80
(gdb) list
111 // c library to make sure the data access is thread safe.
112 template<typename T>
113 T GetVar(const T &aV) const
114 { // these have to be defined here since they're templates
115 scoped_lock_t lock(mPc->mMutex);
116 T v = aV;
117 return v;
118 }
119
120 // @brief Get a variable from the client by reference
> Once the program segfaults, use the 'bt' and 'list' commands to determine
> where your program was when it crashed. The below code snippet isn't
> enough
> to tell the whole story, but are you allocating map_data.data before you
> attempt to write to it? You should allocate it with the "new" keyword or
> with "malloc".
>
> Rich
>
I'm not using "malloc" nor "new". I just copied this part from the gridmap
driver and it too doesn't use "malloc" or "new".
I'm really lost!
thanks for your help ,
andré
--
View this message in context: http://old.nabble.com/Help-with-map-driver-tp29571142p29572784.html
Sent from the playerstage-developers mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users
worldwide. Take advantage of special opportunities to increase revenue and
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
Playerstage-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/playerstage-developers