This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

AW: probably simple problem: ASSERT in Cyg_StdIostream


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]