Hello all,
My problem is:
I'm developping an application in C++ with libevent 1.3c (and g++ 4.0.3).
My main function creates an object from a class A witch creates one object
from class B.
- In object from class A, I call event_init() and event_dispatch() functions
(there are events related with sockets here, all working good);
- In object from class B there is an event timer triggering each 50 seconds
(tvTime);
- "struct event evTime" and "struct timeval tvTime" are declared in class B;
- "evtimer_set(&evTime, func, (void *) this)" and "evtimer_add(&evTime)"
present in class B;
From time to time, object from class B is deleted.
Problem:
After that, when object from class A creates another object from class
B:
- "evtimer_initialized(&evTime)" returns true (how?), followed by
"evtimer_del(&evTime)" (working!) and after by "evtimer_add(&evTime)".
However, "evtimer_add(&evTime)" raises a segmentation default:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1212361024 (LWP 8533)]
event_add (ev=0x80a39c0, tv=0x80a3a14) at event.c:622
622 const struct eventop *evsel = base->evsel;
What am I dowing wrong?
Can you help me, please?
Thanks :)
João
_________________________________________________________________
Transfira JÁ a última versão do Windows Live Messenger!
http://get.live.com/pt-pt/messenger/overview
_______________________________________________
Libevent-users mailing list
Libevent-users@monkey.org
http://monkey.org/mailman/listinfo/libevent-users