You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Based on your README, I think the code snippet below is meant to work, but I'm encountering some kind of stack corruption or memory invalidation or something when running (it's causing allocation of a really large value (probably from uninitialized memory). I'm seeing similar behaviour in my own program which I've tried to recreate in this minimal test case.
Originally I thought there was some issue with the scope of the lambda related to #20 but I see the same on the PR that was raised against that issue (https://github.com/mikezackles/signals/tree/issue-20) or when using a simple functor:
If I comment out the last connection (of the C printout) then I see what might be considered expected output:
=============
A
=============
A
B
Though depending on how the iteration is implemented I might have expected the first invocation to print A\nB and the second to print A\nB\nB (especially since the loop looks like for (size_t i = 0, n = calls.size(); i < n; ++i) in operator().
I've not been able to figure out what is going wrong - I can't see any iterators getting invalidated or something with the recursive modification...
Any thoughts appreciated!
The text was updated successfully, but these errors were encountered:
Support Var removal
replace signal/slot library due to problems with original (TheWisp/signals#24)
Use signal/slots for Var add/removes
Extensive extra testing
Support Var removal
replace signal/slot library due to problems with original (TheWisp/signals#24)
Use signal/slots for Var add/removes
Extensive extra testing
Based on your README, I think the code snippet below is meant to work, but I'm encountering some kind of stack corruption or memory invalidation or something when running (it's causing allocation of a really large value (probably from uninitialized memory). I'm seeing similar behaviour in my own program which I've tried to recreate in this minimal test case.
Outputs:
Originally I thought there was some issue with the scope of the lambda related to #20 but I see the same on the PR that was raised against that issue (https://github.com/mikezackles/signals/tree/issue-20) or when using a simple functor:
If I comment out the last connection (of the C printout) then I see what might be considered expected output:
Though depending on how the iteration is implemented I might have expected the first invocation to print A\nB and the second to print A\nB\nB (especially since the loop looks like
for (size_t i = 0, n = calls.size(); i < n; ++i)
inoperator()
.I've not been able to figure out what is going wrong - I can't see any iterators getting invalidated or something with the recursive modification...
Any thoughts appreciated!
The text was updated successfully, but these errors were encountered: