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 - Timer widgets come back from the dead: Page 1 of 6 (6 Items)
   
Timer widgets come back from the dead  
I am updating a QNX 4.25 application to work on 6.5.  It has a Photon GUI controlled with a keypad with the number 
digits and a few function keys.  The GUI consists of a base window with a pane.  This pane gets realized from a picture 
module in response to events triggered by the function keys (done with PtTab and PtGroup, not PtPanelGroup).

What I find happens is if I show a pane that contains a PtTimer or sometimes PtClock, then replace that pane with 
another:
 PtClearWidget(ABW_Pane);
 ApCreateModule(ABM_NewPane_Module, ABW_Pane, NULL);
 PtReRealizeWidget(ABW_Pane):

then although the PtTimer widget is unrealized, after the call to PtReRealizeWidget it has been re-realized even though 
it is not part of AMB_NewPane_Module.  I can put debug statements into Realized and UnRealized callbacks and see this 
happen.  The widget flags go from 0x1 to 0x1000 (Pt_REALIZED to Pt_DESTROYED), then 0x1000 to 0x1001 (destroyed and 
realized!).

When the PtTimer activate event happens, the event loop gets horribly confused looking up the callback function.  I 
either get a SIGSEGV in in the Photon library or it spins madly in the event handling code.

What is going wrong?