OCCRA
Go to Post I dont compete to win prizes, I compete to win Pride. - CircularLogic [more]
Home
Go Back   Chief Delphi > Technical > Programming > WindRiver C++
CD-Events   CD-Media   CD-Spy   FRC-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 03-27-2012, 03:16 PM
ss9090 ss9090 is offline
Registered User
AKA: Stewart Smith
FRC #4367 (Streetbots)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2012
Location: ON, Canada
Posts: 6
ss9090 is an unknown quantity at this point
cRIO FRC_RobotTask error

Hey guys. I don't have much time before my competition and I just got this error from the NetConsole;

0x28bffe8 (FRC_RobotTask): task 0x28bffe8 has had a failure and has stopped.

A search brings up no hits. Does anybody have any idea about what causes this task error and what I can do to solve this?

Will post code if necessary.
Quick replies would be lovely.

EDIT:
Got rid of my Initial error by fixing up my pointers, however I now get a new error upon clicking 'Enable' on the driver station:

0x28c00e0 (FRC_RobotTask): task 0x28c00e0 has had a failure and has stopped.
0x28c00e0 (FRC_RobotTask): fatal kernel task-level exception!

Again, help is much appreciated.
__________________
FRC 4736 Streetbots
2012 Streetsville Secondary's pioneering FRC team

Thanks to our mentor team, 1241 Theory6, for all of their help! I wish everybody there the best in their futures.

-Lead Programmer (Wind River C++)
-Lead Electrical
-Lead Controls
-Part-time Build

2012 - 17th seed (GTR West)

Last edited by ss9090 : 03-27-2012 at 04:50 PM.
Reply With Quote
  #2   Spotlight this post!  
Unread 03-27-2012, 03:29 PM
Bharat Nain's Avatar
Bharat Nain Bharat Nain is offline
Registered User
no team
Team Role: Alumni
 
Join Date: Jan 2004
Rookie Year: 2003
Location: New York
Posts: 1,999
Bharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond reputeBharat Nain has a reputation beyond repute
Send a message via AIM to Bharat Nain Send a message via MSN to Bharat Nain
Re: cRIO FRC_RobotTask error

I saw an issue in Orlando where we were trying to gather input from the Analog Input on the DS Software. Sometimes, it returned a null and caused a null-pointer exception. I can't say if that is your issue but it is possible. Thanks to Andrew Schreiber for helping me track that bug down.
__________________
-= Bharat Nain =-

Whatever you do, you need courage. Whatever course you decide upon, there is always someone to tell you that you are wrong. There are always difficulties arising that tempt you to believe your critics are right. To map out a course of action and follow it to an end requires some of the same courage that a soldier needs. Peace has its victories, but it takes brave men and women to win them. - Ralph Waldo Emerson
Reply With Quote
  #3   Spotlight this post!  
Unread 03-27-2012, 03:43 PM
ss9090 ss9090 is offline
Registered User
AKA: Stewart Smith
FRC #4367 (Streetbots)
Team Role: Programmer
 
Join Date: Jan 2012
Rookie Year: 2012
Location: ON, Canada
Posts: 6
ss9090 is an unknown quantity at this point
Re: cRIO FRC_RobotTask error

Thanks Bharat. I'm currently going through looking for a similar issue. Figured it must be a an improper pointer assignment, so I'm scouring through the lines hehe. Glad to know I'm on the right track.
__________________
FRC 4736 Streetbots
2012 Streetsville Secondary's pioneering FRC team

Thanks to our mentor team, 1241 Theory6, for all of their help! I wish everybody there the best in their futures.

-Lead Programmer (Wind River C++)
-Lead Electrical
-Lead Controls
-Part-time Build

2012 - 17th seed (GTR West)
Reply With Quote
  #4   Spotlight this post!  
Unread 03-27-2012, 07:59 PM
bob.wolff68's Avatar
bob.wolff68 bob.wolff68 is offline
Da' Mentor Man
FRC #1967
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2007
Location: United States
Posts: 117
bob.wolff68 is just really nicebob.wolff68 is just really nicebob.wolff68 is just really nicebob.wolff68 is just really nicebob.wolff68 is just really nice
Re: cRIO FRC_RobotTask error

I agree - most likely the use of a null pointer. As a general rule of C/C++ programming, this is a MUST -- check all pointers before using them. **ALSO** if you 'delete' a pointer, set that pointer to NULL afterwards as well. The programming is a little more 'verbose', but it is SAFER. Crashing in a real-time robot is the PITS.

For instance: (Writing a sample that should be rather 'real' but is from memory so may come with issues...this is intended to show the use of pointer checking -- not syntax and running code)

Code:
ColorImage* pImage;
pImage = NULL;
AxisCamera& cam=AxisCamera::GetInstance();
BinaryImage* pBin;
pBin = NULL;

while(IsOperatorControl())
{
  if (cam.IsFreshImage())
  {
    pImage = cam.GetImage();
    if (pImage)
    {
      pBin = pImage->ThresholdHSL(x,y,z,zz,p,d,NULL);
      if (pBin)
      {
        // Do something using pBin like particle report ...
      }
      else
        printf("ERROR: ThresholdHSL() failed.\n");
    }
    else
      printf("ERROR: GetImage() failed.\n");

    // Done with the image -- must dispose of it.
    // But *SHOULD* also reset it to NULL so it doesn't get used accidentally.
    if (pImage)
    {
      delete pImage;
      pImage = NULL;
    }

    // Done with the image -- must dispose of it.
    // But *SHOULD* also reset it to NULL so it doesn't get used accidentally.
    if (pBin)
    {
      delete pBin;
      pBin = NULL;
    }
  }
}
__________________
~~~~~~~~~~~~~~~~~~~
Bob Wolff - Software from the old-school
Mentor / C / C++ guy
Team 1967 - The Janksters - San Jose, CA
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 07:44 PM.

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


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