Skip to content

Collecting images on camera 2 causes break with newer version of Imagine #60

@Callahanra

Description

@Callahanra

I was recording on Camera 2 in a single plane for 2000 images at a exposure of 0.03 ms and Imagine got through ~1400 images and then it triggered a breakpoint. It won't allow me to continue through the breakpoint and I had to break out and stop the debugger mode . It happened 2 times with the exact same settings. The JSON and Imagine files appear to be saved if you would like those.

This is the section where the break was highlighted in the Imagine code:
void FastOfstream::write(const char* moredata, int morecount) {
double timerValue = timer.read();

//pad/copy (for alignment, otherwise sometimes we can use moredata directly) then write cur buf (repeatly)
//leave the remainder in cur buf
while (true) {
    if (this->datasize == bufsize) {
        OutputDebugStringW(L"Flushing output file stream from fast ofstream write\n");
        flush(); //NOTE: will update datasize too
        if (!isGood) break;
    }

    int amount2cp = min(bufsize - datasize, morecount);

    /* this has 10x performance hit when in debug mode
    for(int i=0; i<amount2cp; ++i){
    buf[datasize++]=*moredata++;
    }
    */
    //alternative:
    //takes about 1.9 milliseconds for a full frame on PCO.Edge 4.2
    **memcpy_g(buf + datasize, moredata, amount2cp);**
    this->datasize += amount2cp;
    moredata += amount2cp;

    morecount -= amount2cp;
    if (!morecount) break;
}//while,

return;

}//write(),

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions