On further investigation I noticed that my population function was not called. I put a breakpoint in readHandleUfEvent which should call by populate function, but that breakpoint was not reached either. handler was not reached either.
I kept looking and I saw that the allocator for UFO vectors was never actually triggered. That seems to be because in allocVector3 even if you specify a custom allocator, R interpreter just ignores it when length == 1 to do it's scalar vector short circuit.
x
should contain1
, butOn further investigation I noticed that my population function was not called. I put a breakpoint in
readHandleUfEvent
which should call by populate function, but that breakpoint was not reached either.handler
was not reached either.I kept looking and I saw that the allocator for UFO vectors was never actually triggered. That seems to be because in
allocVector3
even if you specify a custom allocator, R interpreter just ignores it when length == 1 to do it's scalar vector short circuit.Is this a bug in R?