Log In  


https://github.com/sparr/pico8lib/blob/fix_uint32/tests/test_uint32.p8

This cart produces the error "attempt to yield across a C-call boundary" during a self:assert_equal() in Arithmetic:test_subtraction.

However, things get weird from there, in ways that make this very difficult to reduce to a test case.

It didn't error when I wrote that test. That test started erroring when I wrote another test later, which runs before that test because they run in alphabetical order.

I wasn't able to reduce this to a test case because removing arbitrary parts of the file, including parts that shouldn't be accessing any of the same data, causes the error to go away.

If I comment out either one of these two lines, the error goes away: https://github.com/sparr/pico8lib/blob/fix_uint32/tests/test_uint32.p8#L110-L111

If I comment out this line in another function, the error goes away: https://github.com/sparr/pico8lib/blob/fix_uint32/tests/test_uint32.p8#L42

If I comment out some rows of test_sums, the error goes away.

If I comment out some rows of test_values, the error goes away.

I suspect there's something like a leak happening here with too many coroutines?

1


This is probably related to https://www.lexaloffle.com/bbs/?tid=142550 and https://www.lexaloffle.com/bbs/?tid=142550 and my tests taking up more than a frame of CPU.

If I put running the tests in _update(), I get the error the first time update runs (whether that's in the first frame or not) but not the second time. If I put them in _update60 then it fails earlier in the tests.

I guess I need to either figure out how to split my tests across frames, or run fewer tests, or make my test framework less cpu intensive.



[Please log in to post a comment]