View topic - why the system is dead?

why the system is dead?

anything that doesn't fit to other groups.

why the system is dead?

Postby xuyong » Sat Jan 10, 2004 1:54 pm

when I ran my GUI programme under qnx,sometimes when I click the mouse or move the mouse,the programme is dead and shows cpu occuption is 100%,but next time when I do the same thing,the system is ok,why and how to avoid it?
xuyong
Senior Member
 
Posts: 431
Joined: Sun Mar 02, 2003 7:52 am

Postby rick » Sun Jan 11, 2004 3:07 pm

Your program is dead or the whole system is dead? I suspect you have bug in your program. :-) More than likely a bad pointer, given it is running ready.

A useful tool I use for catching memory problems is eFence. You can find a link for it someone on this site. It will cause your program to SEGV when the problem occurs which makes it easy to see in the debugger.
rick
QNX Master
 
Posts: 500
Joined: Wed Nov 13, 2002 3:59 am

Postby xuyong » Mon Jan 12, 2004 9:05 am

sometimes my programme needs to allocate memory to read a very large file more than 60M, I want to if I should reduce the priority of the GUI programme to avoid interrput other programme.
xuyong
Senior Member
 
Posts: 431
Joined: Sun Mar 02, 2003 7:52 am

Postby rick » Mon Jan 12, 2004 2:14 pm

That is a hard question to know without knowing how your complete system works. I hope you aren't allocating 60M of memory to do this. If you are, you need to take a hard look at your design.

In general, don't mess with the priorities unless you have to - and in a lot of cases, you can design it such that it is not necessary. Usually if you do mess with priorities, it doesn't work the way you expect it to.
rick
QNX Master
 
Posts: 500
Joined: Wed Nov 13, 2002 3:59 am


Return to General Programming

Who is online

Users browsing this forum: No registered users and 1 guest