Assertion failed while opening transcoder

2 views
Skip to first unread message

sander.borsboom

unread,
Jul 31, 2013, 4:37:47 AM7/31/13
to avblocks...@googlegroups.com
Hello,

with your help we got the first proof of concept version of our transcoder running in pure c++ code, and are now adding Java interface capabilities. 

My current problem is that when I try Transcoder.open() I get a "Assertion failed!" error pop-up from "Microsoft Visual C++ Runtime Library". I have attached a screenshot with the details it show, but I am unable to get more details because I am running it from Java.

This part of the code and the things it depends on is exactly the same as the the c++ test code which still works, so my guess is that we are doing some of the memory management which then results in a problem when switching between c++ code and the Java code several times. I will be simplifying the code step by step to try to find the problem, but I was wondering if you get any helpful details from the error?

Greetings,

Sander Borsboom

assertion_failed.png

sander.borsboom

unread,
Jul 31, 2013, 6:46:04 AM7/31/13
to avblocks...@googlegroups.com
Ok, I have tried replacing all input to the transcoder:

 The input is now a hand built MediaSocket:
VideoStreamInfo* simpleVsi = primo::avblocks::Library::createVideoStreamInfo();
simpleVsi->setStreamType(StreamType::Enum::H264);
simpleVsi->setFrameHeight(360);
simpleVsi->setFrameWidth(480);

MediaPin* pin = Library::createMediaPin();
pin->setConnection(PinConnection::Auto);
pin->setStreamInfo(simpleVsi);

inputSocket = Library::createMediaSocket();
inputSocket->setStreamType(StreamType::Enum::H264);
inputSocket->pins()->add(pin);

And the output is a pretty much unmodified version of your YUVFile, the only change is that the framerate is not set (but setting it doesn't change the error.)

Nothing else has been added to the transcoder before the assertion error happens:
_transcoder = Library::createTranscoder();
_transcoder->inputs()->add(inputSocket);

YUVFile* output = new YUVFile( L"d:\\test.yuv", ColorFormat::Enum::YUV420, 480, 360 );
_transcoder->outputs()->add(output->socket);

And this is the call that causes the error:
bool_t res = _transcoder->open();

Do you have any ideas on how to debug this? I am reading up to see if the Java interface might change any memory or memory management, but I haven't found anything sofar. Furthermore, with this simplification of inputs, I don't think the java VM has any chance to influence it as everything is done in one function call.

Greetings,

Sander

Op woensdag 31 juli 2013 10:37:47 UTC+2 schreef sander.borsboom het volgende:

Svilen Stoilov

unread,
Jul 31, 2013, 9:48:23 AM7/31/13
to avblocks...@googlegroups.com
Hi Sander,
 
It looks like this assert is from an older version of AVBlocks - 1.2.1.1.
This should not happen in 1.4.
 
You can get 1.4. from here:
but I believe that you already have it, otherwise you C++ code would not work.
 
My guess is that your Java code somehow references the older version of AVBlocks - perhaps it's found somewhere in the paths.
You can check the dll version on Windows from AVBlocks.dll properties -> Details -> File Version | Product Version.
Currently the AVBlocks version is not available programmatically so you cannot check it in your code. You have to find which dll is actually loaded and check its properties.
 
Regards,
Svilen
Reply all
Reply to author
Forward
Message has been deleted
0 new messages