Vague Resource Exception: Code works but only works once.

All technical discussions and projects around startKIT
Post Reply
jfrankl8
New User
Posts: 2
Joined: Wed Feb 10, 2016 10:49 pm

Vague Resource Exception: Code works but only works once.

Post by jfrankl8 »

Hey all. I am using the startkit and the GitHub SD card repository to implement simple logging within a program that is actively monitoring streaming channels. The code works very well in almost all aspects. The code is set to log data to the SD card only when the data to be logged changes. Currently it is just 3 counter variables that increment when certain conditions are met. The issues is that as soon as it finishes logging the data (which works perfectly) the program (which should continue to monitor the streaming channels) crashes and gives the error below.

Code: Select all

xrun: Program received signal ET_ILLEGAL_RESOURCE, Resource exception.
      [Switching to tile[0] core[2]]
Unlike previous resources exception errors that I have run into (like using the same clock block for 3 different ports or something) this error gives me zero information. Whats more confusing is that the code executed perfectly so I can't even tell what has happened.

The logging functions are in a C file and are linked to the channel monitoring xc file code by using extern. The channel monitoring functions run in parallel and the primary channel processing function calls the logging function (which only takes action if it detects the data has changed).

Now the logging functions use a lot of print statements to provide information such as device memory, file structure, and statements to let the user know where it is in the open, read/write, close process. Following the advice of this thread: https://www.xcore.com/forum/viewtopic.php?f=44&t=2956, I thought to remove the print statements out right but that had no noticeable effect.

If anyone has any thoughts, advice, or suggestions on how to debug and solve this issue I would greatly appreciate it. I wish the composer studio was more specific with it's feedback... Thanks in advance.


User avatar
Ross
XCore Expert
Posts: 962
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

Firstly lets figure out where the exception is raised.. can you post the result of the command xrun --dumpstate your_binary_here.xe

Also, could you post the binary.
Post Reply