Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - SIGSEGV: (3 Items)
   
SIGSEGV  
I have an simple app in which I have a button that I've attached a function to the Activate callback. The first time I 
press it it runs fine. However, the second time I press it, the app craches with a SIGSEGV error. I peppered a few 
printf statements in the callback and it never even makes it into the callback the second time. 
    What is most strange is that I developed the app on a WIndows-based pc on which I am running QNX4.25 under VMWare 
and I don't have any issue running on that. Only when I copy the app to a machine running native QNX4.25 do I get the 
error.
  First off, anyone have any idea why such a seemingly simple operation would cause a SIGSEGV? I have 100's of instances
 like this in other apps and have never seen such a thing before. Also, anyone experienced a similar problem and/or know
 why there would be different behavior between the two environments? i.e. why does it run fine when QNX is running under
 VMWare vs. crashes consistently on a native QNX machine?
Re: SIGSEGV  
Hi John,

sounds a bit strange to me - especially the bit about VmWare vs. native... Do you have the same versions on both boxes?

As for the SIGSEGV, is there anything special about this app or the button?

Is it part of a picture module and instantiated via ApCreateWidget(), or do you have multiple instances of that button 
in any other way?

Did you attach the callback manually or using PhAB?

Can you provide the test-case and maybe a coredump?

Puzzled:
- Thomas
Re: SIGSEGV  
Tom,
   Thanks for the reply. The button is on a picture module. I don't dynamically create the buttons, they are placed on 
the picture modules at design time in PhAB. I have several picture modules I am dynamically exchanging in and out of a 
pane on my base app window like this:

Button1Callback{
...
PtClearWidget(ABW_main_pane);
ApCreateModule(ABM_pic_module1 ,ABW_main_pane,NULL);
PtReRealizeWidget(ABW_main_pane);
...
}

Button2Callback{
..
PtClearWidget(ABW_main_pane);
ApCreateModule(ABM_pic_module2 ,ABW_main_pane,NULL);
PtReRealizeWidget(ABW_main_pane);
...
}
I changed the app to create all the picture modules at app startup on its own pane and now just move the panes in and 
out of the viewable area by changing X,Y coordinated and that has fixed the issue. But, is there some special 
characteristic of picture modules that could cause this SIGSEGV crash? I've done this dozens of times before with no 
such problems.
   Why would one button cause a SIGSEGV and another doing essentially the exact same thing not? 
  As far as a machine with QNX vs. VMWare...that makes no sense to me what so ever either!!!

Thanks again
John