Closed sandiz closed 2 years ago
Sorry for the false alarm y'all: found this config while looking further
static constexpr int limitActiveTags = 10;
bumping this to -10 fixes the issue.
yea, the minimal heap memory has its caviats, we should probaly make -10 the default ...
So I'm still getting a crash with this example... I had a simple example with one tag, like #character:name and that was crashing until I found the limitactivetags and tried, which fixed my simple tag example. But it wasn't actually getting the tag string correctly (typically empty), even though it wasn't crashing.
So I went back and tried the example here, and it crashes the same spot in restorable.h
template<typename IsNullPredicate>
const ElementType& pop(IsNullPredicate isNull)
{
// Make sure we have something to pop
inkAssert(_pos > 0, "Can not pop. No elements to pop!");
I tested it with the current Master, it works ??, have you changed something as described above?
config file
/// number of simultaneous active tags
static constexpr int limitActiveTags = -10;
Ink File
->test_knot
===test_knot
line 110#loc:loc-line-1#in#op:1#cl:1
line 2#loc:loc-line-2#en#op:1#cl:1
line 3#loc:loc-line-3#in#op:1#cl:1
->DONE
TestCase
SCENARIO("tags", "[tags]")
{
inklecate("ink/AHF.ink", "AHF.tmp");
ink::compiler::run("AHF.tmp", "AHF.bin");
auto ink = story::from_file("AHF.bin");
runner thread = ink->new_runner();
thread->move_to(ink::hash_string("test_knot"));
while(thread->can_continue()) {
auto line = thread->getline();
std::cout << line << std::endl;
for ( ink::size_t i = 0; i < thread->num_tags(); ++i) {
std::cout << "\t" << thread->get_tag(i) << std::endl;
}
}
REQUIRE(thread->can_continue() == false);
}
Output
➜ inkcpp_test (master) ✗ ./inkcpp_test '[tags]'
Filters: [tags]
line 110
loc:loc-line-1
in
op:1
cl:1
line 2
loc:loc-line-1
in
op:1
cl:1
loc:loc-line-2
en
op:1
cl:1
line 3
loc:loc-line-1
in
op:1
cl:1
loc:loc-line-2
en
op:1
cl:1
loc:loc-line-3
in
op:1
cl:1
===============================================================================
All tests passed (27 assertions in 2 test cases)
Hey guys, I am seeing a crash with tags that happen when I add a bunch of them. Any ideas why this is happening ?
Ink FIle
Test case
The test crashes with this ink file:
Note: removing any single tag from
line110
fixes the issue, so it could be an issue with memory size ?Let me know if you guys can repro this on your end.
Many thanks!