Go to Post Wow! Can I be wrong too? Please! - dlavery [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, 21:19
euhlmann's Avatar
euhlmann euhlmann is online now
CTO, Programmer
AKA: Erik Uhlmann
FRC #2877 (LigerBots)
Team Role: Leadership
 
Join Date: Dec 2015
Rookie Year: 2015
Location: United States
Posts: 322
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
  #2   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: 186
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
  #3   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: 70
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 12:12.

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