Hello - I've reproduced this on 4 computers (1 running Win7 pro, 1 running Win10 home, 2 running Win10 pro) with the #631 production release of TC. Whenever I insert a design as a symbol, the parts generator crashes the program and I lose all work done so far. The design has 12 instances of a circuit block that is identical.
Thinking that a different number would work, I tried this down to 2 identical blocks - no luck, still the crash. That's when I tried all my computers running different versions of Windows.
My workaround was to copy & paste the blocks 12 times - which is a step backwards.
It seems that BOM Generator tries to assign the reference context of an empty parent, but tries to access an invalid index of an empty collection.
Workaround:
@ Net.h :: const T& getObjectWithDefault(const T& defaultValue) const
add:
if (collection->size() == 0) {
return NULL;
}
before return (*collection)[index];
Thank you Niccola Torres for your solution to this bug. It will be incorporated in release 1.90 and is in the trunk of the repository now.
Why return NULL and not defaultValue?
I already changed it to return defaultValue.
Returning NULL generated warnings about returning the address of a local variable.
You're always welcome! It was suposed to return defaultValue, though.
I have generated a release for my friend (which asked me to take a look on this issue) because it was really important for him. And on this release I generated it was returning defaultValue. lol
My mistake guys, sorry!
For more elegance, I did the following:
P.S.: I must say that the project is compiling nicely on VS2017, just saying fyk.
Last edit: Niccola Torres 2017-04-24