[zeromq-dev] Probably breaking virtual methods table

Брюгеман Артур miasscerber at list.ru
Mon Mar 29 13:25:44 CEST 2010


Hi!

I'm trying zeromq-2.0.6. The file attached contains some code that behaves unexpectedly. It has actually been written using Qt, but I've rewritten it trying to exclude all dependencies. 

The idea is simple - I create a thread, and talk to it using zmq-sockets with inproc binding. I create an abstract class that has basic code, and override a message-handling method in subclass. Such a subclass (Worker) doesn't work properly - after receiving some messages, a call to a virtual message-handling method fails with:

"pure virtual method called
terminate called without an active exception"

I.e., instead of calling Worker's method, it tried an ancestor's abstract method. 

On my box it happens after ~30 iterations (messages). On the neighbour's - immediately. My box is:
Mandriva Linux release 2009.0 (Official) for i586
Kernel 2.6.27-desktop-0.rc8.2mnb on an i686 / \l
gcc version 4.3.2 (GCC)

valgrind doesn't show any bad memory accesses, code seems fine. I have no idea about what is wrong. Do you?

Thanks in advance.

--
Artur Brugeman



-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.cpp
Type: application/octet-stream
Size: 6557 bytes
Desc: not available
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20100329/c11a40b3/attachment.obj>


More information about the zeromq-dev mailing list