ev_timer_again() causing segmentation fault
Dan White
dwhite at olp.net
Tue Oct 29 21:45:00 CET 2013
On 10/29/13 22:30 +0200, utku genç wrote:
>Hello All,
>
>Following code doesn't yield any problems:
>
>static void udp_read_cb(EV_P_ ev_io *watcher, int revents) {
>ev_timer_again(EV_A_ &communication_timeout_watcher);
>do_something();
>}
>
>void do_something() {
>...
>}
>
>But if I move the ev_timer_again() one call deeper, as in:
>
>static void udp_read_cb(EV_P_ ev_io *watcher, int revents) {
>do_something();
>}
>
>
>void do_something() {
>ev_timer_again(EV_A_ &communication_timeout_watcher);
>...
>}
>
>I get a segmentation fault. Am I missing something here?
Sounds like a (null) pointer dereference problem. Use gdb on your core dump
to trouble shoot.
--
Dan White
More information about the libev
mailing list