Go to Post Isn't that the connector used on the F.L.U.X. Capacitor? - Ed Sparks [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 07-03-2011, 20:19
Travis Hoffman's Avatar Unsung FIRST Hero
Travis Hoffman Travis Hoffman is offline
O-H
FRC #0048 (Delphi E.L.I.T.E.)
Team Role: Engineer
 
Join Date: Sep 2001
Rookie Year: 2001
Location: Warren, Ohio USA
Posts: 4,047
Travis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond repute
Help Requested - "Fatal Task-Level Kernel Exception"

Keeping in mind I am not an experienced C++ programmer....

I have recently been having issues where, upon startup, when watching NetConsole, the robot will report the errors shown in the attached screenshot...the key statement seemingly is "fatal task-level kernel exception". Sounds pretty bad, no?

The Driver Station is communicating with the robot throughout...I can enable/disable...but there is no response from the pump, motors, etc.

When the robot does avoid reporting this error, the robot seems to perform just fine.

I would appreciate it if someone would help me figure out where the problem lies. If you request debug information or other specifics, you will likely have to provide instructions on how to get me to produce that info - I am not very familiar with the debugging environment of WindRiver (and yes, I've reviewed the FIRSTForge documents Brad Miller provided).

I will email code to anyone knowledgeable enough to review it and help me decipher and repair the root cause of this problem.

I am running the latest version of WPILib, v28 of the firmware, the v3.2 LabVIEW update, and the latest Driver Station.

Thanks in advance.
Attached Thumbnails
Click image for larger version

Name:	Program Error Debug 3-7-11.JPG
Views:	66
Size:	124.2 KB
ID:	10358  
__________________

Travis Hoffman, Enginerd, FRC Team 48 Delphi E.L.I.T.E.
Encouraging Learning in Technology and Engineering - www.delphielite.com
NEOFRA - Northeast Ohio FIRST Robotics Alliance - www.neofra.com
NEOFRA / Delphi E.L.I.T.E. FLL Regional Partner

Last edited by Travis Hoffman : 07-03-2011 at 20:22.
Reply With Quote
  #2   Spotlight this post!  
Unread 07-03-2011, 20:38
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: Help Requested - "Fatal Task-Level Kernel Exception"

You say labview 3.2, but the screenshot shows you are using C++, no need to update labview

anhow, the data access exception (which leads to the fatal error) is caused by a pointer error, which are nasty, often hard to find errors due to memory alotment. I try to avoid pointers where they are not needed, there are none in our 2011 code. Try replacing all the pointers with stack variables or references.
From
Code:
type *name = new type()
name->member
to
Code:
type name = type()
name.member
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
Reply With Quote
  #3   Spotlight this post!  
Unread 07-03-2011, 21:38
Radical Pi Radical Pi is offline
Putting the Jumper in the Bumper
AKA: Ian Thompson
FRC #0639 (Code Red Robotics)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: New York
Posts: 655
Radical Pi has a spectacular aura aboutRadical Pi has a spectacular aura aboutRadical Pi has a spectacular aura about
Re: Help Requested - "Fatal Task-Level Kernel Exception"

Looking at the screenshot, it appears that you are referencing a NULL pointer somewhere within the constructor for your robot classes. If you're having trouble tracking it down, something I occasionally do is place printfs in key places in the code. If it appears on the screen at all, you can forget about the area above the printf. Make sure to comment them out later though.
__________________

"To have no errors would be life without meaning. No strugle, no joy"
"A network is only as strong as it's weakest linksys"
Reply With Quote
  #4   Spotlight this post!  
Unread 08-03-2011, 01:00
Travis Hoffman's Avatar Unsung FIRST Hero
Travis Hoffman Travis Hoffman is offline
O-H
FRC #0048 (Delphi E.L.I.T.E.)
Team Role: Engineer
 
Join Date: Sep 2001
Rookie Year: 2001
Location: Warren, Ohio USA
Posts: 4,047
Travis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond repute
Re: Help Requested - "Fatal Task-Level Kernel Exception"

Thanks to both of you who've replied.

Quote:
Originally Posted by byteit101 View Post
You say labview 3.2, but the screenshot shows you are using C++, no need to update labview
I update everything!

Quote:
anhow, the data access exception (which leads to the fatal error) is caused by a pointer error, which are nasty, often hard to find errors due to memory alotment. I try to avoid pointers where they are not needed, there are none in our 2011 code. Try replacing all the pointers with stack variables or references.
From
Code:
type *name = new type()
name->member
to
Code:
type name = type()
name.member
I *might* have found the problem in my robot class constructor, per Radical Pi's suggestion. The code in question did use the "->" to call members of a custom PID class though.

I use one of the 2009 control system beta tester teams' code projects as the basis for my code. They use pointers all over the place, and I've not had any issue with the code in this manner until the other day.

I'll keep checking tomorrow to see if the problem returns.
__________________

Travis Hoffman, Enginerd, FRC Team 48 Delphi E.L.I.T.E.
Encouraging Learning in Technology and Engineering - www.delphielite.com
NEOFRA - Northeast Ohio FIRST Robotics Alliance - www.neofra.com
NEOFRA / Delphi E.L.I.T.E. FLL Regional Partner
Reply With Quote
  #5   Spotlight this post!  
Unread 08-03-2011, 20:18
Travis Hoffman's Avatar Unsung FIRST Hero
Travis Hoffman Travis Hoffman is offline
O-H
FRC #0048 (Delphi E.L.I.T.E.)
Team Role: Engineer
 
Join Date: Sep 2001
Rookie Year: 2001
Location: Warren, Ohio USA
Posts: 4,047
Travis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond repute
Re: Help Requested - "Fatal Task-Level Kernel Exception"

OK next fun issue for the practice robot. I believe the one stated earlier has been resolved.

This next one is very puzzling.

All my speed controllers and pneumatic devices work fine except one - the one (Victor) that controls the arm motor.
  • Symptom - manually attempting to move the arm up with one of the gamepad joysticks causes the arm to jerk upward quickly.
  • Symptom - manually attempting to move the arm down with the same joystick causes a rapid flashing of the yellow Victor LED, and the Victor makes a rapid clicking noise. If the pump happens to be running when this happens, the pump stutters in step with this flashing when this happens (sounds like some kind of short).
  • Originally the controller was a black Jag. Now it's a Victor. Does the same thing.
  • Found the arm Vic's PWM cable's male pins were coming loose from their housing. Changed the cable. Still does the same thing.
  • Moved the Vic from PWM7 to PWM8, with corresponding code change. The problem moved with it.
  • Loaded v27 of the firmware - same thing. Loaded v28 back in - same thing.
  • Loaded a known good version of code from a few days back - same thing.
  • Restarted Driver Station - same thing.
  • Replugged control gamepad - same thing.
  • Frame is isolated from ground.
This sounds like some kind of hardware issue, but I sure as heck am stumped. Any thoughts? All ideas appreciated.

I'm going to check the wiring from the Vic to the motor for some kind of short or anomaly....
__________________

Travis Hoffman, Enginerd, FRC Team 48 Delphi E.L.I.T.E.
Encouraging Learning in Technology and Engineering - www.delphielite.com
NEOFRA - Northeast Ohio FIRST Robotics Alliance - www.neofra.com
NEOFRA / Delphi E.L.I.T.E. FLL Regional Partner
Reply With Quote
  #6   Spotlight this post!  
Unread 08-03-2011, 21:20
Unsung FIRST Hero
Mike Betts Mike Betts is offline
Electrical Engineer
no team
Team Role: Engineer
 
Join Date: Dec 2001
Rookie Year: 1995
Location: Homosassa, FL
Posts: 1,442
Mike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond repute
Re: Help Requested - "Fatal Task-Level Kernel Exception"

Travis,

Is the motor a 775?

Mike
__________________
Mike Betts

Alumnus, Team 3518, Panthrobots, 2011
Alumnus, Team 177, Bobcat Robotics, 1995 - 2010
LRI, Connecticut Regional, 2007-2010
LRI, WPI Regional, 2009 - 2010
RI, South Florida Regional, 2012 - 2013

As easy as 355/113...
Reply With Quote
  #7   Spotlight this post!  
Unread 08-03-2011, 21:29
Travis Hoffman's Avatar Unsung FIRST Hero
Travis Hoffman Travis Hoffman is offline
O-H
FRC #0048 (Delphi E.L.I.T.E.)
Team Role: Engineer
 
Join Date: Sep 2001
Rookie Year: 2001
Location: Warren, Ohio USA
Posts: 4,047
Travis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond repute
Re: Help Requested - "Fatal Task-Level Kernel Exception"

Quote:
Originally Posted by Mike Betts View Post
Travis,

Is the motor a 775?

Mike
RS-550, freshly installed.

This motor was tested fine, on robot, just prior to this anomaly and worked swimmingly. It still moves in the upward direction really fast whenever I move the stick anywhere north of neutral. The Vic seems to just output max voltage regardless of input. When I move the stick down, even though the variable in the code is changing per NetConsole, there is no movement out of the arm, but the Vic clicks real fast. If the pump is running, it stutters to the same beat as the clicking. Thing is, I can still drive while the clicking is going on - drive motors are not seemingly affected.

I can't see the digital sidecar being the issue - all other outputs and inputs are working fine, and the problem moved to PWM8 when I moved the cable and changed the code.

I will say that right before the problem occurred, I changed one constant in the code and redownloaded, then poof. I do not know if this is a coincidence or code-related. I won't rule out this problem being code related

Is it possible for the WPILib source code C++ stuff I can't change to be corrupted, while my custom code is still good?

Maybe I'll reinstall the latest WPILib update and do a clean recompile.

At this point, I'm completely stumped.
__________________

Travis Hoffman, Enginerd, FRC Team 48 Delphi E.L.I.T.E.
Encouraging Learning in Technology and Engineering - www.delphielite.com
NEOFRA - Northeast Ohio FIRST Robotics Alliance - www.neofra.com
NEOFRA / Delphi E.L.I.T.E. FLL Regional Partner
Reply With Quote
  #8   Spotlight this post!  
Unread 09-03-2011, 06:54
Unsung FIRST Hero
Mike Betts Mike Betts is offline
Electrical Engineer
no team
Team Role: Engineer
 
Join Date: Dec 2001
Rookie Year: 1995
Location: Homosassa, FL
Posts: 1,442
Mike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond repute
Re: Help Requested - "Fatal Task-Level Kernel Exception"

Travis,

You might want to focus on the compressor. When it is intermittent, is the DSC LED for that relay channel steady or intermittent? If the former, then software is probably not at fault. If the latter, then the DSC is being commanded to intermittently run the compressor by the CRIO and software is highly suspected.

If the above indicates software is OK, you might want to temporarily disconnect the spike to the compressor. Does the 550 operate smoothly? If so, you may have a circular path somehow in your frame...

Good Luck,

Mike
__________________
Mike Betts

Alumnus, Team 3518, Panthrobots, 2011
Alumnus, Team 177, Bobcat Robotics, 1995 - 2010
LRI, Connecticut Regional, 2007-2010
LRI, WPI Regional, 2009 - 2010
RI, South Florida Regional, 2012 - 2013

As easy as 355/113...
Reply With Quote
  #9   Spotlight this post!  
Unread 09-03-2011, 13:06
Matt Krass's Avatar
Matt Krass Matt Krass is offline
"Old" and Cranky. Get off my lawn!
AKA: Dark Ages
FRC #0263 (Sachem Aftershock)
Team Role: Mentor
 
Join Date: Oct 2002
Rookie Year: 2002
Location: Long Island, NY
Posts: 1,187
Matt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond repute
Send a message via AIM to Matt Krass
Re: Help Requested - "Fatal Task-Level Kernel Exception"

When you swapped out the Jaguar for the Victor, did you change the code? The Jaguar PWMs update faster and might be causing the Victor to trip over itself trying to keep up.
__________________
Matt Krass
If I suggest something to try and fix a problem, and you don't understand what I mean, please PM me!

I'm a FIRST relic of sorts, I remember when we used PBASIC and we got CH Flightsticks in the KoP. In my day we didn't have motorized carts, we pushed our robots uphill, both ways! (Houston 2003!)
Reply With Quote
  #10   Spotlight this post!  
Unread 09-03-2011, 23:19
Travis Hoffman's Avatar Unsung FIRST Hero
Travis Hoffman Travis Hoffman is offline
O-H
FRC #0048 (Delphi E.L.I.T.E.)
Team Role: Engineer
 
Join Date: Sep 2001
Rookie Year: 2001
Location: Warren, Ohio USA
Posts: 4,047
Travis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond reputeTravis Hoffman has a reputation beyond repute
Re: Help Requested - "Fatal Task-Level Kernel Exception"

Quote:
Originally Posted by Matt Krass View Post
When you swapped out the Jaguar for the Victor, did you change the code? The Jaguar PWMs update faster and might be causing the Victor to trip over itself trying to keep up.
Sorry I didn't respond sooner to you guys - I was very busy all day prepping for Pittsburgh.

Yes, I changed the code when I switched the controller. It turns out the problem was tracked to a bad 10 AWG zip cord power cable running to the controller.

I am not a fan of large-gauge zip cord (red/black wires joined together into a single cord). It is far too easy to tear the insulation during lead separation and expose the copper in those things. There was a small tear in both of them that was causing an intermittent short. I swapped out the cable to independent red and black wires, and the problem disappeared. I enjoyed hacking the zip cord into little pieces before disposing of it!

For smaller gauges like 18, zip cord is great - the two wires readily separate. For large gauges, I'm going with indivdual wires from now on.

Thanks to all who suggested ideas.
__________________

Travis Hoffman, Enginerd, FRC Team 48 Delphi E.L.I.T.E.
Encouraging Learning in Technology and Engineering - www.delphielite.com
NEOFRA - Northeast Ohio FIRST Robotics Alliance - www.neofra.com
NEOFRA / Delphi E.L.I.T.E. FLL Regional Partner
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 03:05.

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