View Single Post
  #4   Spotlight this post!  
Unread 16-03-2014, 16:26
myork myork is offline
Registered User
FRC #2928
 
Join Date: Feb 2014
Location: United States
Posts: 11
myork has a spectacular aura aboutmyork has a spectacular aura about
Re: PIDController causing code to fail silently

Harumph. The netconsole did not indicate any crashes. With a different problem we had a crash and the netconsole output something like "fatal exception at 0x00000000". This did not happen with the PIDController line.

The output we had was strange, now that I think more about it. If I remember correctly it printed:

System exit called

and nothing after that.

This is part of our boot.py:

Code:
    ...
    while True:
        rollback = RollbackImporter()
        robot = None
        try:
            print("Importing user code.")
            robot = __import__("robot")
            print("Running user code.")
            robot.run()
            #runpy.run_module("robot", run_name="__main__")
        except SystemExit:
            print("System exit called")
            pass
        except:
            print("-"*60)
            traceback.print_exc(file=sys.stdout)
            print("-"*60)

    print("User code raised SystemExit; waiting 2 seconds before restart")
    time.sleep(2)
    ...

We would expect to see "User code raised SystemExit;..." after "System exit called", but we didn't.

Hmmm.... I think we've abandoned the PIDController for this season, but I'd like to figure out this problem as soon as I get the chance.
Reply With Quote