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:
- Is my assert(pcBasebandOutput); line of code necessary? I only ask because when running this code on Visual Studio, the results from my program were desirable.
- When it is evaluating my pcBasebandOutput variable, why would it evaluate it as false? Is this saying that no value is actually assigned to pcBasebandOutput? Or that a value may be assigned to it, but it is not of the right type (pointer to a struct of two variables, both of which are doubles)?
Thanks!
assertchecks a logical condition. Assertation fails if the condition isfalse. So writingassert(cond)is logically the same as writing:I don’t suggest you to remove
assertfrom 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