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:

Screenshot from 2020-12-11 16-51-31


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)

Most upvoted comments

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 ๐Ÿ‘