as-pect: High Rtrace values causing test errors?
Hello! This might be more of a discussion point, than a bug in as-pect. Iโm not too sure, but Iโll create a repro case if you think this might be a bug ๐
So Iโm working on a unit test of an object with a complex constructor. Iโm testing a case I expect to throw, and at the end of the test I get: RTrace: +16
. And this was causing a really weird behavior, where the test would fail, which appeared to be a runtime error. And as-pect would also output:
And for geenral google and github search:
[Error]: rtrace: Block: 8940 => shadow region mismatch: 0 != 8940
[Stack]: at Rtrace.unmarkShadow
...
So Iโm not too sure what this means, but looking at the docs for RTrace, it meantions is might be a memory leak? https://tenner-joshua.gitbook.io/as-pect/as-api/rtrace-and-memory-leaks
However, the constructor is definitely creating a lot of objects on the runtime, and even runs through a few loops. If I understand the docs correctly, the Rtrace is a report of the number of object that were alive when the function had an error. So, a high Rtrace value (if itโs not being cleaned up like the docs mentions), makes sense for this test.
To fix this in the meantime, I just threw the problematic test, as the last test in my describe block, and everything seems to be working fine now ๐
Is this something on me? Or is this an as-pect issue? ๐ค
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 17 (9 by maintainers)
This should be all set.
This is why Iโve waited on development. Iโm very excited for the new release.
Ah yeah I can circle up with @jedisct1 and we can probably come up with a test case together ๐ Definiely agree we could provide more guidance here ๐