with your patch, some use of ecore_pipe seg fault can you provide a minimal test example, please ?
Vincent On Fri, Aug 31, 2012 at 12:22 PM, HariHara Sudhan <h...@emo2.com> wrote: > This is the exact error messages. > > > ERR:ecore ecore_main.c:1984 _ecore_main_win32_select() ( 6) ÿÿe handle > is invalid. > > ERR:ecore ecore_main.c:1984 _ecore_main_win32_select() ( 6) ÿÿe handle > is invalid. > > ERR:ecore ecore_main.c:1984 _ecore_main_win32_select() ( 6) ÿÿe handle > is invalid. > > ERR:ecore ecore_main.c:1984 _ecore_main_win32_select() ( 6) ÿÿe handle > is invalid. > > ERR:ecore ecore_main.c:1984 _ecore_main_win32_select() ( 6) ÿÿe handle > is invalid. > > ERR:ecore ecore_main.c:1984 _ecore_main_win32_select() ( 6) ÿÿe handle > is invalid. > > ERR:ecore ecore_main.c:1984 _ecore_main_win32_select() ( 6) ÿÿe handle > is invalid. > > ERR:ecore ecore_main.c:1984 _ecore_main_win32_select() ( 6) ÿÿe handle > is invalid. > > ERR:ecore ecore_main.c:1984 _ecore_main_win32_select() ( 6) ÿÿe handle > is invalid. > > ERR:ecore ecore_main.c:1984 _ecore_main_win32_select() ( 6) ÿÿe handle > is invalid. > > ERR:ecore ecore_main.c:1984 _ecore_main_win32_select() ( 6) ÿÿe handle > is invalid. > > ERR:ecore ecore_main.c:1984 _ecore_main_win32_select() ( 6) ÿÿe handle > is invalid. > > ERR:ecore ecore_main.c:1984 _ecore_main_win32_select() ( 6) ÿÿe handle > is invalid. > > ERR:ecore ecore_main.c:1984 _ecore_main_win32_select() ( 6) ÿÿe handle > is invalid. > > ERR:ecore ecore_main.c:1984 _ecore_main_win32_select() ( 6) ÿÿe handle > is invalid. > > ERR:ecore ecore_main.c:1984 _ecore_main_win32_select() ( 6) ÿÿe handle > is invalid. > > ERR:ecore ecore_main.c:1984 _ecore_main_win32_select() ( 6) ÿÿe handle > is invalid. > > ERR:ecore ecore_main.c:1984 _ecore_main_win32_select() ( 6) ÿÿe handle > is invalid. > > ERR:ecore ecore_main.c:1984 _ecore_main_win32_select() ( 6) ÿÿe handle > is invalid. > > ERR:ecore ecore_main.c:1984 _ecore_main_win32_select() ( 6) ÿÿe handle > is invalid. > > ERR:ecore ecore_main.c:1984 _ecore_main_win32_select() ( 6) ÿÿe handle > is invalid. > > ERR:ecore ecore_main.c:1984 _ecore_main_win32_select() ( 6) ÿÿe handle > is invalid. > > ERR:ecore ecore_main.c:1984 _ecore_main_win32_select() ( 6) ÿÿe handle > is invalid. > > ERR:ecore ecore_main.c:1984 _ecore_main_win32_select() ( 6) ÿÿe handle > is invalid. > > ERR:ecore ecore_main.c:1984 _ecore_main_win32_select() ( 6) ÿÿe handle > is invalid. > > ERR:ecore ecore_main.c:1984 _ecore_main_win32_select() ( 6) ÿÿe handle > is invalid. > > ERR:ecore ecore_main.c:1984 _ecore_main_win32_select() ( 6) ÿÿe handle > is invalid. > > ERR:ecore ecore_main.c:1984 _ecore_main_win32_select() ( 6) ÿÿe handle > is invalid. > > ERR:ecore ecore_main.c:1984 _ecore_main_win32_select() ( 6) ÿÿe handle > is invalid. > > ERR:ecore ecore_main.c:1984 _ecore_main_win32_select() ( 6) ÿÿe handle > is invalid. > > ERR:ecore ecore_main.c:1984 _ecore_main_win32_select() ( 6) ÿÿe handle > is invalid. > > Press [Enter] to close the terminal ...// And crashes > > On Fri, Aug 31, 2012 at 4:40 AM, HariHara Sudhan <h...@emo2.com> wrote: > >> @@ -66,7 +66,6 @@ >> # define HAVE_EPOLL 0 >> # define EPOLLIN 1 >> # define EPOLLOUT 2 >> -# define EPOLLPRI 4 >> # define EPOLLERR 8 >> >> #define EPOLL_CTL_ADD 1 >> @@ -212,7 +211,6 @@ >> static Ecore_Fd_Handler *fd_handlers = NULL; >> static Ecore_Fd_Handler *fd_handler_current = NULL; >> static Eina_List *fd_handlers_with_prep = NULL; >> -static Eina_List *file_fd_handlers = NULL; >> static Eina_List *fd_handlers_with_buffer = NULL; >> static Eina_List *fd_handlers_to_delete = NULL; >> >> @@ -322,7 +320,7 @@ >> int events = 0; >> if (fdh->flags & ECORE_FD_READ) events |= EPOLLIN; >> if (fdh->flags & ECORE_FD_WRITE) events |= EPOLLOUT; >> - if (fdh->flags & ECORE_FD_ERROR) events |= EPOLLERR | EPOLLPRI; >> + if (fdh->flags & ECORE_FD_ERROR) events |= EPOLLERR; >> return events; >> } >> >> @@ -1326,8 +1324,6 @@ >> { >> struct timeval tv, *t; >> fd_set rfds, wfds, exfds; >> - Ecore_Fd_Handler *fdh; >> - Eina_List *l; >> int max_fd; >> int ret; >> >> @@ -1365,6 +1361,8 @@ >> >> if (!HAVE_EPOLL || epoll_fd < 0) >> { >> + Ecore_Fd_Handler *fdh; >> + >> EINA_INLIST_FOREACH(fd_handlers, fdh) >> { >> if (!fdh->delete_me) >> @@ -1393,26 +1391,7 @@ >> max_fd = _ecore_get_epoll_fd(); >> FD_SET(max_fd, &rfds); >> } >> - EINA_LIST_FOREACH(file_fd_handlers, l, fdh) >> - if (!fdh->delete_me) >> - { >> - if (fdh->flags & ECORE_FD_READ) >> - { >> - FD_SET(fdh->fd, &rfds); >> - if (fdh->fd > max_fd) max_fd = fdh->fd; >> - } >> - if (fdh->flags & ECORE_FD_WRITE) >> - { >> - FD_SET(fdh->fd, &wfds); >> - if (fdh->fd > max_fd) max_fd = fdh->fd; >> - } >> - if (fdh->flags & ECORE_FD_ERROR) >> - { >> - FD_SET(fdh->fd, &exfds); >> - if (fdh->fd > max_fd) max_fd = fdh->fd; >> - } >> - if (fdh->fd > max_fd) max_fd = fdh->fd; >> - } >> + >> if (_ecore_signal_count_get()) return -1; >> >> _ecore_unlock(); >> @@ -1434,6 +1413,8 @@ >> _ecore_main_fdh_epoll_mark_active(); >> else >> { >> + Ecore_Fd_Handler *fdh; >> + >> EINA_INLIST_FOREACH(fd_handlers, fdh) >> { >> if (!fdh->delete_me) >> @@ -1448,19 +1429,7 @@ >> } >> } >> } >> - EINA_LIST_FOREACH(file_fd_handlers, l, fdh) >> - { >> - if (!fdh->delete_me) >> - { >> - if (FD_ISSET(fdh->fd, &rfds)) >> - fdh->read_active = EINA_TRUE; >> - if (FD_ISSET(fdh->fd, &wfds)) >> - fdh->write_active = EINA_TRUE; >> - if (FD_ISSET(fdh->fd, &exfds)) >> - fdh->error_active = EINA_TRUE; >> - _ecore_try_add_to_call_list(fdh); >> - } >> - } >> + >> _ecore_main_fd_handlers_cleanup(); >> #ifdef _WIN32 >> _ecore_main_win32_handlers_cleanup(); >> @@ -1914,21 +1883,12 @@ >> long network_event; >> >> network_event = 0; >> - if (readfds) >> - { >> if (FD_ISSET(fdh->fd, readfds)) >> network_event |= FD_READ; >> - } >> - if (writefds) >> - { >> if (FD_ISSET(fdh->fd, writefds)) >> network_event |= FD_WRITE; >> - } >> - if (exceptfds) >> - { >> if (FD_ISSET(fdh->fd, exceptfds)) >> network_event |= FD_OOB; >> - } >> >> if (network_event) >> { >> @@ -1962,17 +1922,14 @@ >> timeout = INFINITE; >> else >> timeout = (DWORD)((tv->tv_sec * 1000.0) + (tv->tv_usec / 1000.0)); >> - //printf("obj_ linmr=%d\n",objects_nbr); >> + >> if (timeout == 0) return 0; >> >> result = MsgWaitForMultipleObjects(objects_nbr, (const HANDLE >> *)objects, EINA_FALSE, //result becomes WAIT_FAILED sometimes, it prints >> error messages for few //lines and >> crashes >> timeout, QS_ALLINPUT); >> >> - if (readfds) >> FD_ZERO(readfds); >> - if (writefds) >> FD_ZERO(writefds); >> - if (exceptfds) >> FD_ZERO(exceptfds); >> >> /* The result tells us the type of event we have. */ >> @@ -1981,7 +1938,7 @@ >> char *m; >> >> m = evil_last_error_get(); >> - ERR("%s", m); >> + ERR(" * %s\n", m); >> free(m); >> res = -1; >> } >> @@ -2006,11 +1963,11 @@ >> >> WSAEnumNetworkEvents(sockets[result], objects[result], >> &network_event); >> >> - if ((network_event.lNetworkEvents & FD_READ) && readfds) >> + if (network_event.lNetworkEvents & FD_READ) >> FD_SET(sockets[result], readfds); >> - if ((network_event.lNetworkEvents & FD_WRITE) && writefds) >> + if (network_event.lNetworkEvents & FD_WRITE) >> FD_SET(sockets[result], writefds); >> - if ((network_event.lNetworkEvents & FD_OOB) && exceptfds) >> + if (network_event.lNetworkEvents & FD_OOB) >> FD_SET(sockets[result], exceptfds); >> >> res = 1; >> >> >> On Fri, Aug 31, 2012 at 3:10 AM, Vincent Torri >> <vincent.to...@gmail.com>wrote: >> >>> On Thu, Aug 30, 2012 at 9:20 PM, HariHara Sudhan <h...@emo2.com> wrote: >>> > MsgWaitForMultipleObjects is returning WAIT_FAILED which prints >>> > error like "_ecore_main_win32_select failed " >>> > and few random characters, and this same error is printed about 50 >>> times on >>> > the console after which the program exits. >>> > I'm downloading multiple image files in the background and loading them >>> on >>> > to the canvas. This works for a while and then the error appears >>> randomly. >>> > I'm using ecore-1.1.0 and not the latest version yet. Any help is >>> > appreciated. >>> > FYI I changed a few lines in the below function. >>> >>> which lines ? Provide a diff, please >>> >>> Vincent >>> >>> > >>> > static int >>> > _ecore_main_win32_select(int nfds __UNUSED__, >>> > fd_set *readfds, >>> > fd_set *writefds, >>> > fd_set *exceptfds, >>> > struct timeval *tv) >>> > { >>> > HANDLE objects[MAXIMUM_WAIT_OBJECTS]; >>> > int sockets[MAXIMUM_WAIT_OBJECTS]; >>> > Ecore_Fd_Handler *fdh; >>> > Ecore_Win32_Handler *wh; >>> > unsigned int objects_nbr = 0; >>> > unsigned int handles_nbr = 0; >>> > unsigned int events_nbr = 0; >>> > DWORD result; >>> > DWORD timeout; >>> > MSG msg; >>> > unsigned int i; >>> > int res; >>> > >>> > /* Create an event object per socket */ >>> > EINA_INLIST_FOREACH(fd_handlers, fdh) >>> > { >>> > WSAEVENT event; >>> > long network_event; >>> > >>> > network_event = 0; >>> > if (readfds) >>> > { >>> > if (FD_ISSET(fdh->fd, readfds)) >>> > network_event |= FD_READ; >>> > } >>> > if (writefds) >>> > { >>> > if (FD_ISSET(fdh->fd, writefds)) >>> > network_event |= FD_WRITE; >>> > } >>> > if (exceptfds) >>> > { >>> > if (FD_ISSET(fdh->fd, exceptfds)) >>> > network_event |= FD_OOB; >>> > } >>> > >>> > if (network_event) >>> > { >>> > event = WSACreateEvent(); >>> > WSAEventSelect(fdh->fd, event, network_event); >>> > objects[objects_nbr] = event; >>> > sockets[events_nbr] = fdh->fd; >>> > events_nbr++; >>> > objects_nbr++; >>> > } >>> > } >>> > >>> > /* store the HANDLEs in the objects to wait for */ >>> > EINA_INLIST_FOREACH(win32_handlers, wh) >>> > { >>> > objects[objects_nbr] = wh->h; >>> > handles_nbr++; >>> > objects_nbr++; >>> > } >>> > >>> > /* Empty the queue before waiting */ >>> > while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) >>> > { >>> > TranslateMessage(&msg); >>> > DispatchMessage(&msg); >>> > } >>> > >>> > /* Wait for any message sent or posted to this queue */ >>> > /* or for one of the passed handles be set to signaled. */ >>> > if (!tv) >>> > timeout = INFINITE; >>> > else >>> > timeout = (DWORD)((tv->tv_sec * 1000.0) + (tv->tv_usec / 1000.0)); >>> > >>> > if (timeout == 0) return 0; >>> > >>> > result = MsgWaitForMultipleObjects(objects_nbr, (const HANDLE >>> *)objects, >>> > EINA_FALSE, >>> > timeout, QS_ALLINPUT); >>> > >>> > if (readfds) >>> > FD_ZERO(readfds); >>> > if (writefds) >>> > FD_ZERO(writefds); >>> > if (exceptfds) >>> > FD_ZERO(exceptfds); >>> > >>> > /* The result tells us the type of event we have. */ >>> > if (result == WAIT_FAILED) >>> > { >>> > char *m; >>> > >>> > m = evil_last_error_get(); >>> > ERR("%s", m); >>> > free(m); >>> > res = -1; >>> > } >>> > else if (result == WAIT_TIMEOUT) >>> > { >>> > /* ERR("time out\n"); */ >>> > res = 0; >>> > } >>> > else if (result == (WAIT_OBJECT_0 + objects_nbr)) >>> > { >>> > while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE)) >>> > { >>> > TranslateMessage(&msg); >>> > DispatchMessage(&msg); >>> > } >>> > >>> > res = 0; >>> > } >>> > else if ((result >= 0) && (result < WAIT_OBJECT_0 + events_nbr)) >>> > { >>> > WSANETWORKEVENTS network_event; >>> > >>> > WSAEnumNetworkEvents(sockets[result], objects[result], >>> > &network_event); >>> > >>> > if ((network_event.lNetworkEvents & FD_READ) && readfds) >>> > FD_SET(sockets[result], readfds); >>> > if ((network_event.lNetworkEvents & FD_WRITE) && writefds) >>> > FD_SET(sockets[result], writefds); >>> > if ((network_event.lNetworkEvents & FD_OOB) && exceptfds) >>> > FD_SET(sockets[result], exceptfds); >>> > >>> > res = 1; >>> > } >>> > else if ((result >= (WAIT_OBJECT_0 + events_nbr)) && >>> > (result < (WAIT_OBJECT_0 + objects_nbr))) >>> > { >>> > if (!win32_handler_current) >>> > { >>> > /* regular main loop, start from head */ >>> > win32_handler_current = win32_handlers; >>> > } >>> > else >>> > { >>> > /* recursive main loop, continue from where we were */ >>> > win32_handler_current = (Ecore_Win32_Handler >>> > *)EINA_INLIST_GET(win32_handler_current)->next; >>> > } >>> > >>> > while (win32_handler_current) >>> > { >>> > wh = win32_handler_current; >>> > >>> > if (objects[result - WAIT_OBJECT_0] == wh->h) >>> > { >>> > if (!wh->delete_me) >>> > { >>> > wh->references++; >>> > if (!wh->func(wh->data, wh)) >>> > { >>> > wh->delete_me = EINA_TRUE; >>> > win32_handlers_delete_me = EINA_TRUE; >>> > } >>> > wh->references--; >>> > } >>> > } >>> > if (win32_handler_current) /* may have changed in recursive >>> > main loops */ >>> > win32_handler_current = (Ecore_Win32_Handler >>> > *)EINA_INLIST_GET(win32_handler_current)->next; >>> > } >>> > res = 1; >>> > } >>> > else >>> > { >>> > ERR("unknown result...\n"); >>> > res = -1; >>> > } >>> > >>> > /* Remove event objects again */ >>> > for (i = 0; i < events_nbr; i++) WSACloseEvent(objects[i]); >>> > >>> > return res; >>> > } >>> > >>> > >>> > -- >>> > Regards >>> > >>> > HariHaraSudhan >>> > >>> ------------------------------------------------------------------------------ >>> > Live Security Virtual Conference >>> > Exclusive live event will cover all the ways today's security and >>> > threat landscape has changed and how IT managers can respond. >>> Discussions >>> > will include endpoint security, mobile security and the latest in >>> malware >>> > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>> > _______________________________________________ >>> > enlightenment-devel mailing list >>> > enlightenment-devel@lists.sourceforge.net >>> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel >>> >>> >>> ------------------------------------------------------------------------------ >>> Live Security Virtual Conference >>> Exclusive live event will cover all the ways today's security and >>> threat landscape has changed and how IT managers can respond. Discussions >>> will include endpoint security, mobile security and the latest in malware >>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ >>> _______________________________________________ >>> enlightenment-devel mailing list >>> enlightenment-devel@lists.sourceforge.net >>> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel >>> >> >> >> >> -- >> Regards >> >> HariHaraSudhan >> >> > > > -- > Regards > > HariHaraSudhan > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > enlightenment-devel mailing list > enlightenment-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel