AW: [ECOS] probably simple problem: ASSERT in Cyg_StdIostream

Neundorf, Alexander Alexander.Neundorf@jenoptik.com
Fri Apr 8 14:29:00 GMT 2005


Hi, 

...
> > ASSERT FAIL: <8>stream.inl[109]cyg_bool 
> > Cyg_StdioStream::trylock_me() Stream
> > object is not a valid stream!
> 
> It seems to be the same problem as mentioned here, but there 
> was no reply:
> http://sources.redhat.com/ml/ecos-discuss/2003-05/msg00447.html
> 
> Here's the code which causes the assert:
> 
> void cyg_user_start() {
>    unsigned int day;
>    sscanf("1", "%d", &day);

I got some more information: the assert hits because neither the magic_code of stdin nor of stdout are set correctly. They aren't set because for both buffer_size==-1 and WANT_BUFFERED_IO is true in Cyg_StdioStream::initialize(). CYG_LIBC_STDIO_BUFSIZE has the default value of 256. 


Alex

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list