On Tue, Jul 23, 2013 at 9:18 AM, 刘金宝 <[email protected]> wrote:
> I've try to write a http client for downloading files from the internet, and
> get stuck with a strange crash for me.
> My client make all requests for a bunch of given files (use the range
> header, multiple requests for a file), and execute event_base_dispatch, then
> in the callback_handler, free the request.

You don't need to call evhttp_request_free(), libevent will free it
for you, unless you call evhttp_request_own()

> But when downloads , it may crash, with probability about 25%. I don't know
> what is wrong.
>
> I use VS2012 compile the libevent and pass all tests, and then add them to
> my project.
> And when crash happens, it says that access violation at a given address,
> the stack info as following:
>   ntdll.dll!77a415de()
>   ntdll.dll!77a415de()
>   ntdll.dll!77a3014e()
>> DowloaderNew.exe!_bufferevent_disable () C
>   DowloaderNew.exe!__bufferevent_run_readcb () C
>   DowloaderNew.exe!_bufferevent_new () C
>   DowloaderNew.exe!_event_base_stop_iocp () C
>   DowloaderNew.exe!__event_debug_map_HT_REP_IS_BAD () C
>   DowloaderNew.exe!_event_base_stop_iocp () C
>   DowloaderNew.exe!_event_base_loop () C
>   DowloaderNew.exe!_event_base_dispatch () C
>   DowloaderNew.exe!Run() 行 76 C++
>   DowloaderNew.exe!main() 行 96 C++
>   DowloaderNew.exe!__tmainCRTStartup() 行 536 C
>   DowloaderNew.exe!mainCRTStartup() 行 377 C
>   kernel32.dll!76c233aa() 未知
>   ntdll.dll!77a59ef2() 未知
>   ntdll.dll!77a59ec5() 未知
>
> I turn for help of search engine, but there seems no relevant info, either
> does stackoverflow.
>



--
Respectfully
Azat Khuzhin
Primary email [email protected]
***********************************************************************
To unsubscribe, send an e-mail to [email protected] with
unsubscribe libevent-users    in the body.

Reply via email to