PtRemoveEventHandler() crashes the system

Hi All,

I have created a transparent region, which is forced front and is sensitive to a specific Key event (Ph_EV_KEY). The widget has no parent, and had an event handler (by using PtAddEventHandler).

Now, my region is good enough to call my event handler (myEventHandler) on the desired specific call event. But, I wanted to disable my event handler for the time, it is still running.
To elaborate, my event handler displays a dialog window and I don’t want another dialog, when I press the desired keys, while a dialog window is still open.

I know I can track this using some tracking mechanism in the dialog that I open, but alternatively,
I tried to call PtRemoveEventHandler() at the start of the myEventHandler and PtAddEventHandler() at the end of it. But when the key events occur, the system crashes/hangs. Nothing happens and I’m forced to restart the computer.

I pass on the PtWidget_t* & the pointer of/to the myEventHandler to PtRemoveEventHandler() & PtAddEventHandler().
Does anybody know the reason why this is happenning?

There’s no obvious reason way. Are you sure that the OS is crashing? This is rare. More likely your code goes into a loop and locks you out.

What I would do is try to create a minimalist version of the application that demonstrates the problem. This has a number of benefits. It tends to narrow down where the problem is. It often reveals the problem. If it makes it easy to show people what the problem is. If all else fails, and you think it might be a bug, sending an easy to understand problem to QNX will get much faster attention than a large and vague one.