- changed status to resolved
bm_empty_buffers() calls the bm_skip_event(int buffer_handle) function using the wrong index
In the bm_empty_buffers(), the function bm_skip_event(int buffer_handle) is called, but the incorrect index is passed. buffer_handle should be larger than idx by 1. buffer_handle=0 is an invalid handle.
I suggest change the line
bm_skip_event(idx); -> bm_skip_event(idx+1);
Also, the return code from bm_skip_event is not returned to the caller of bm_empty_buffers.
Comments (4)
-
-
Dear Ran, you should receive an award for finding that bug. It’s in midas since Oct. 1998, so congratulations for finding a 22 year old bug
I changed that and committed it to the develop branch.
-
reporter Hi Stefan,
I am working for the Muon g-2 collaboration on the DAQ system. I am upgrading Midas from the previous version and found this bug. However, I don’t think bm_empty_buffers() calls the bm_skip_event(int) function in my previous version of Midas which was checked out in summer 2018. Did this bug show up in a different way before?
Thanks!
Ran Hong
-
You are right, that bug was introduced on this commit:
https://bitbucket.org/tmidas/midas/commits/c9374613c5d03f93b66fca81a05df1a784c954f3
- Log in to comment
Fixed issue
#227, thanks to Ran Hong→ <<cset 175ff19b260c>>