Start a new topic

Metadata character limit bug


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 (

    at ___assert_fail (

    at J5 (

    at AE (

    at Ek (

    at xl (

    at Tc (

    at Tc (

    at Tc (

    at TA (

Here is a sample URL:

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

Hello Andrew,

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

Here is a test URL that duplicates the issue: Andrew

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.

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

Login to post a comment