dhowden / tag

ID3, MP4 and OGG/FLAC metadata parsing in Go
BSD 2-Clause "Simplified" License
558 stars 72 forks source link

panic: invalid encoding: expected even number of bytes for UTF-16 encoded text #87

Open aditya-K2 opened 2 years ago

aditya-K2 commented 2 years ago

I am trying to get metadata from songs but now I get this weird panic . Everything was working fine before and now i am getting panics for the same songs for which this worked before

dhowden commented 2 years ago

Can you provide the panic stack trace? A sample file would be great too.

aditya-K2 commented 2 years ago

panic: invalid encoding: expected even number of bytes for UTF-16 encoded text

goroutine 5 [running]: main.getAlbumArt({0xc00007e080, 0x7f}) /H/code/goMP/imageUtils.go:28 +0x2c5 main.openImage({0xc00007e080, 0x7f}, 0x0) /H/code/goMP/render.go:46 +0x6f created by main.(*Renderer).Start /H/code/goMP/render.go:65 +0x8f

aditya-K2 commented 2 years ago

A sample file would be great too.

It is happening to most files I open ( some exceptions ) even the tag commandline utilitiy returns error but used to work properly before

sample

aditya-K2 commented 2 years ago

even the tag commandline utilitiy returns error but used to work properly before

error reading file: invalid encoding: expected even number of bytes for UTF-16 encoded text