kaworu/tagutil

segfault on print action.

Closed this issue · 3 comments

Just trying to print tags from some mp3 and flac files gives me segmentation fault.
Using 3.0.1, happens with TagLib and libFLAC backends, cannot test libvorbis ATM.

Backtrace on TagLib:

#0  t_fttaglib_read (opaque=<optimized out>) at /.../tagutil/t_fttaglib.c:112
#1  0x0000000000406aa7 in t_tune_tags (tune=tune@entry=0x616210) at /../tagutil/t_tune.c:97
#2  0x0000000000405285 in t_action_print (self=<optimized out>, tune=0x616210) at /.../tagutil/t_action.c:429
#3  0x0000000000404b9a in main (argc=1, argv=0x7fffffffe380) at /.../tagutil/tagutil.c:139

Backtrace on libFLAC:

#0  0x0000000000405297 in t_action_print (self=<optimized out>, tune=0x616210) at /.../tagutil/t_action.c:433
#1  0x0000000000404b9a in main (argc=1, argv=0x7fffffffe380) at /.../tagutil/tagutil.c:139

Possibly important fact: It appears to work fine on -DCMAKE_BUILD_TYPE=Debug. I've compiled with -DCMAKE_BUILD_TYPE=RelWithDebInfo to get backtraces.

Hi @KenjiTakahashi

Thank you for your report, I'll look into it asap

Hi @KenjiTakahashi

Thanks again for the report. The code was abusing assert(3) to the point that it could not work properly without it. Could you confirm that 8d92f57 fixed your issues with both TagLib and libFLAC please ? If not I'll reopen this issue.

Thanks, it appears to work fine now. At least the print part, we'll see about other things later on :-).