Thank you for your help, but unfortunately it didnt solve the problem. I put
HANDLER_CAN_RONLY (HANDLER_CAN_READ causes compile-time error) but there is
still segmentation fault.
There are two things that are maybe interesting to mention:
1) Segmentation fault arises even if I avoid handlers, for
Miljen, I think your code snippet is trying to access a memory location that it
is not allowed to access. For e.g. you might be writing some illegal location
using some pointer (may be one of them my_test,my_test2). Try changing the
HANDLER_CAN_RWRITE in the declaration portion to HANDLER_CAN