Start a new topic

Metadata character limit bug

Hi,


I've discovered that if the WXXX:artworkURL_640x ID3 tag is longer than around characters, Viblast aborts playing and shows this error in the Javascript console:


viblast.js:947 Uncaught Assertion failed: !"basic_string length_error", at: /emscripten/system/include/libcxx/string,1183,__throw_length_error at Error

    at Va (https://cdn.viblast.com/vb/6.61/viblast.js:68:26)

    at ___assert_fail (https://cdn.viblast.com/vb/6.61/viblast.js:947:373)

    at J5 (https://cdn.viblast.com/vb/6.61/viblast.js:961:193022)

    at AE (https://cdn.viblast.com/vb/6.61/viblast.js:961:12841)

    at Ek (https://cdn.viblast.com/vb/6.61/viblast.js:962:33608)

    at xl (https://cdn.viblast.com/vb/6.61/viblast.js:962:60665)

    at Tc (https://cdn.viblast.com/vb/6.61/viblast.js:965:164917)

    at Tc (https://cdn.viblast.com/vb/6.61/viblast.js:965:163887)

    at Tc (https://cdn.viblast.com/vb/6.61/viblast.js:965:163672)

    at TA (https://cdn.viblast.com/vb/6.61/viblast.js:960:172722)


Here is a sample URL:

https://is3-ssl.mzstatic.com/image/thumb/Music123/v4/c3/2a/df/c32adf7c-81a5-2107-ba6b-8561d30e80fa/source/640x640bb.jpg



When a shorter URL is used, it's fine.


Thanks, this was very helpful! We were able to get it fixed in the encoder.

Hello Andrew,


Sorry for the delay, but the issue seems to be quite complicated.

There are multiple ID3 WXXX frames with longer size in the test stream.

Their size is 136 in decimal, which is exactly 10001000 in binary. Regarding the spec the size must be in Synchsafe integer format, which means that the leading bit of every byte must be always 0, which is not true in your case.

So, Viblast Player parses the size data field and according to the spec it converts it from Synchsafe integer to uint32 and the result  is 8 (quite small), which causes the assertion.

If the conversion is suppressed, everything works as expected (we tested it with modified code).


Can you confirm the generated frames are following the spec?

From our point of view, the size field contains regular integer, instead of sychsafe.




Here is a test URL that duplicates the issue: https://jpbg-public.s3.amazonaws.com/vbtest/test.html Andrew

Hello Andrew,


We will test with longer ID3 tag data, but still can you share a test stream?



Login to post a comment