Page 5 of 5

Re: How do I troubleshoot traps without a line number?

Posted: Thu Feb 27, 2014 3:32 pm
by tod
I understand not wanting to complicate things at this juncture. My paranoid nature makes me suggest you always check those error return values. If OSSemPend returns an error you're assuming it granted you access to the semaphore and deprecated the count (which it probably did not - at least if the NB implementation is anything like the uCOS-II implementation). At any rate it seems like a pretty simple thing to add.

Re: How do I troubleshoot traps without a line number?

Posted: Fri Feb 28, 2014 9:32 am
by rnixon
You code is using: OSSemPend(&MySemaphore, 0); which will block forever. If locking up is a problem, why not use a timeout and print out some diagnostics? And like Tod said, I always check return values for everything I can if I am having odd behavior.

Re: How do I troubleshoot traps without a line number?

Posted: Tue Mar 04, 2014 9:45 am
by mx270a
Update: This project has taken a bizarre turn, the bug has apparently vanished. Last time I saw a lockup was 3 days ago. I even rolled back to the old code, and I cannot get it throw any traps or lockup now. I'm happy that it's working normally, but I'm also perplexed about what happened.