superg / redumper

Low level CD dumper utility
GNU General Public License v3.0
200 stars 18 forks source link

Redumper generates a mostly empty `.log` when extracting CDs #53

Closed acridAxid closed 1 year ago

acridAxid commented 1 year ago

I recently upgraded from Redumper Build 119 to Build 166. I dumped two audio CDs but found Redumper is only outputting a timestamp divider line to the log output.

Example of incorrect output (Build 166): dump_230610_220619_devsr1.log dump_230610_220633_devsr2.log

Example of expected output (Build 119): dump_230504_063252_devsr1.log

EDIT: These tests are being executed on Linux, for what it's worth.

acridAxid commented 1 year ago

New example of Build 166 audio CD output with stdout redirected to text file: dump_230611_170728_devsr1.log stdout.txt

superg commented 1 year ago

Ha, I'll check that out, thanks for reporting

acridAxid commented 1 year ago

Just did a quick dump of a data CD to confirm this isn't limited to audio CDs.

superg commented 1 year ago

Reproduced the issue, happens only in release configuration, looking into root cause

superg commented 1 year ago

The culprit is:

static Logger &get()
{
    static Logger logger;

    return logger;
}

I'm getting different logger addresses in different places, that's why other loggers don't have _fs stream initialized and file output doesn't happen.

It does look like clang bug, doesn't happen in msvc and such Logger construct is a common C++ singleton approach. Pretty sure this is C++ modules related.

For now, moved out static Logger object to class scope.