Assertion failed: "vsnprintf failed"

Technical questions regarding the xTIMEcomposer, xSOFTip Explorer and Programming with XMOS.
nick
Active Member
Posts: 35
Joined: Tue Jan 07, 2020 10:35 am

Assertion failed: "vsnprintf failed"

Postby nick » Wed Oct 07, 2020 7:43 am

Hi,
I porting a C stack on XMOS. I'm stuck because of an error on link.
I think it's the linker because on console I see "Creating myfile.xe" and then it fails with the following error:
"Assertion failed: n <= 20000 && "vsnprintf failed", file ..\xmap\LinkerErrorHandler.cpp, line 31"
I tried to search LinkerErrorHandler.cpp but I didn't find it. So it's seems to be a temporary file that after the failure is deleted.

I also commented all printf in the stack because I thought the error was caused by a printf that was too long or with too many variables.

I don't see errors or warnings that could have caused this message. Any ideas? What can I check?
User avatar
mon2
XCore Legend
Posts: 1831
Joined: Thu Jun 10, 2010 11:43 am

Postby mon2 » Wed Oct 07, 2020 2:00 pm

Perhaps the docs for the assertion library will help. Try to enable one of the other assertion flags to offer more debug details.

https://github.com/xmos/lib_xassert/blo ... assert.rst
lorenzochiesi
Member++
Posts: 30
Joined: Mon Sep 05, 2016 4:20 pm

Postby lorenzochiesi » Thu Oct 08, 2020 10:44 am

Hi Nick,

I don't think that "LinkerErrorHandler.cpp" is a temporary file created during the building/linking process on your computer.
It looks to me most likely be a source file of the linker itself, thus why you are not finding it on your computer.
Thus looks like this error come from an assertion failed within the linker process itself for whatever reason.

Anyone ever see this or similar kind of issue?

Who is online

Users browsing this forum: No registered users and 6 guests