Reputation: 1188
Running into an issue with some code I'm working on. This code is being run on a linux-based system and the error I receive is the following: /root/cvswork/pci_sync_card/Code/SSBSupport/src/CRCWbHfChannel/CRCWbHfMSBSimulator.cpp:447: virtual void CCRCWbHfMSBSimulator::Process(): Assertion 'pcBasebandOutput' failed.
I've tried stepping through this code to figure out why this is failing and I can't seem to figure it out. Unfortunately I have too many files to really share the code on here (stepping through the pcBasebandOutput assignment takes quite some time). I understand this is a more complex issue than can really be asked about. My primary questions are these:
Thanks!
Upvotes: 0
Views: 206
Reputation: 49986
Only you can know that
What is the type of pcBasebandOutput ? Maybe it is not properly initialized?
assert primary purpose is to allow your IDE to enter debuging session in the place where assert has hit. From there you can read all variables and see callstack/threads. Other solution (than using debugger) is to add lots of logging, which in threaded environments can cause problems on its own (logging is quite slow).
Upvotes: 1
Reputation: 24846
assert
checks a logical condition. Assertation fails if the condition is false
. So writing assert(cond)
is logically the same as writing:
if (!cond)
{
assert(false);
}
I don't suggest you to remove assert
from the code, because it is a guard telling you that something went not the way it's intended to go. And it's not a god idea just to ignore that, because it may shoot you in a leg later
Upvotes: 1