Project Home
Project Home
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
BroadcastCommunity.qnx.com will be offline from May 31 6:00pm until June 2 12:00AM for upcoming system upgrades. For more information please go to https://community.qnx.com/sf/discussion/do/listPosts/projects.bazaar/discussion.bazaar.topc28418
Forum Topic - Problem when using PtHold(): Page 1 of 6 (6 Items)
   
Problem when using PtHold()  
I'm developing a graphical user interface software using PhAB.

I made some simple program. 
It's function is like this:  button click -> just call PtHold() 

on_button_click()
{
   PtHold();
}
It works well.


But I changed it like this: button click -> send event to server -> receive response from server -> call PtHold()

regist_receive(&receive_from_server);

on_button_click()
{
   send_to_server();
}

receive_from_server()
{
   PtHold();
}

In this case program causes memory fault every time. (SIGSEGV)
It is same for PtRelease() too.

As I know PtHold() just increases count. I guest it's implementation would be simple.
So I can not image why it causes memory fault. It is so weird.
Anybody can explain about this phenomenon?