Go to Post When we stop asking ourselves the hard questions, whether as team leaders or in life, then we are failing. - Al Skierkiewicz [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 15-02-2016, 13:09
1452-Leo 1452-Leo is offline
Registered User
FRC #1452 (Omnicats)
Team Role: Alumni
 
Join Date: Dec 2014
Rookie Year: 2014
Location: Los Angeles
Posts: 44
1452-Leo is an unknown quantity at this point
Can anyone figure out what is wrong?

Every minute or so of teleop, my code crashes and spews this out in the debugger:
Code:
0xb6fd7d40 in ?? () from f:\frc/lib/ld-linux.so.3
warning: Could not load shared library symbols for 20 libraries, e.g. /usr/local/frc/lib/libFRC_NetworkCommunication.so.16.
Use the "info sharedlibrary" command to see the complete listing.
Do you need "set solib-search-path" or "set sysroot"?
warning: Could not load shared library symbols for /usr/local/natinst/lib/libniu3v.so.
Do you need "set solib-search-path" or "set sysroot"?
[New Thread 3312]
warning: Could not load shared library symbols for /usr/local/natinst/lib/libnimdnsResponder.so.
Do you need "set solib-search-path" or "set sysroot"?
[New Thread 3323]
warning: Could not load shared library symbols for /lib/libnss_mdns4_minimal.so.2.
Do you need "set solib-search-path" or "set sysroot"?
[New Thread 3308]
[New Thread 3309]
[New Thread 3310]
[New Thread 3311]
[New Thread 3313]
[New Thread 3314]
[New Thread 3318]
[New Thread 3319]
[New Thread 3320]
[New Thread 3321]
[New Thread 3322]
[New Thread 3326]
[New Thread 3327]
[New Thread 3328]
[New Thread 3329]
[New Thread 3330]
[New Thread 3331]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 3323]
0xb59e2e10 in strstr () from f:\frc/lib/libc.so.6
Does anyone know what is wrong? Thanks!
Reply With Quote
  #2   Spotlight this post!  
Unread 15-02-2016, 13:21
Ozuru's Avatar
Ozuru Ozuru is offline
It's always the programmer's fault.
no team
 
Join Date: May 2013
Rookie Year: 2010
Location: Earth
Posts: 268
Ozuru is a splendid one to beholdOzuru is a splendid one to beholdOzuru is a splendid one to beholdOzuru is a splendid one to beholdOzuru is a splendid one to beholdOzuru is a splendid one to beholdOzuru is a splendid one to behold
Re: Can anyone figure out what is wrong?

It looks like it's having trouble accessing your libraries. Have you tried reformatting the roboRIO?
Reply With Quote
  #3   Spotlight this post!  
Unread 15-02-2016, 18:23
cantdecide cantdecide is offline
Registered User
FRC #5773 (YAFL Mechatronics)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2016
Location: Turkey
Posts: 31
cantdecide is an unknown quantity at this point
Re: Can anyone figure out what is wrong?

Can you check if you have a memory leak? Monitoring the free RAM display on the driver station will work. If you want more insight, you can try running FRCUserProgram using valgrind, which diagnoses common memory leaks and errors. However, I'm not sure if this has been attempted on a roboRIO before, so you might have some trouble setting it up. If you could post your code, that would be great.
Reply With Quote
  #4   Spotlight this post!  
Unread 15-02-2016, 21:19
euhlmann's Avatar
euhlmann euhlmann is offline
CTO, Programmer
AKA: Erik Uhlmann
FRC #2877 (LigerBots)
Team Role: Leadership
 
Join Date: Dec 2015
Rookie Year: 2015
Location: United States
Posts: 361
euhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud ofeuhlmann has much to be proud of
Re: Can anyone figure out what is wrong?

Quote:
Originally Posted by cantdecide View Post
Can you check if you have a memory leak? Monitoring the free RAM display on the driver station will work. If you want more insight, you can try running FRCUserProgram using valgrind, which diagnoses common memory leaks and errors. However, I'm not sure if this has been attempted on a roboRIO before, so you might have some trouble setting it up. If you could post your code, that would be great.
I've attempted to compile valgrind using the frc toolchain with little success. Kudos to anyone who pulls it off
Reply With Quote
  #5   Spotlight this post!  
Unread 15-02-2016, 23:20
kylelanman's Avatar
kylelanman kylelanman is offline
Programming Mentor
AKA: Kyle
FRC #2481 (Roboteers)
Team Role: Mentor
 
Join Date: Feb 2008
Rookie Year: 2007
Location: Tremont Il
Posts: 189
kylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to allkylelanman is a name known to all
Re: Can anyone figure out what is wrong?

Have you tried running in debug to get a more complete stack trace?
__________________
"May the coms be with you"

Is this a "programming error" or a "programmer error"?

Reply With Quote
  #6   Spotlight this post!  
Unread 16-02-2016, 05:31
codedr codedr is offline
Registered User
FRC #0537
Team Role: Mentor
 
Join Date: Mar 2010
Rookie Year: 2009
Location: Wisconsin
Posts: 71
codedr will become famous soon enoughcodedr will become famous soon enough
Re: Can anyone figure out what is wrong?

It looks like your program or some other function (perhaps on your behalf) is calling strstr() to find a substring in a larger string. Are your processing strings in your code?

If you are, I would guess that some assumption you've made about the string always having that value is not true, or your code is not finding the ending condition and is continuing past the end of the string searching for the value.

Are you able to get a full traceback of the stack when the failure occurs?

I would try and find out what the last thing you are doing in your code before it crashes.
Using printf() or logging to narrow the location down might help.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 14:10.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi