From: Rob Body (r.body++at++hrwallingford.co.uk)
Date: 10/07/2002 04:20:54
Hi pfFriends,
I have an application running under Linux, using RedHat 7.2 and Performer
2.5.1 on a pc, that is started via the keyboard from the shell. Data is
passed the app via a LAN and it runs until the data received is an end app
block of data. The problem I have is that I want to be able to loop back
and restart automatically without having to come out of the app each time
and restart it from the shell. The app runs fine the first time, but the
second time through the data is received properly but the graphics window is
not draw and on the third run through I get a segmentation fault after my
data is read in. I guess I am running out of memory ?
The pseudo code for my app is :
restarted = false
setup and open socket
while (stop != 1)
if not restarted paint
if not restarted InitSharedMem
if not restarted pfuInit
if not restarted InitConfig
if not restarted pfConfig
if not restarted tell Process Manager to configure the system
if not restarted pfiInit
receive data file names
InitScene
InitPipe
pfFrame
InitGUI
InitChannel
Wait for go ahead
While (go == 1)
pfSync
Get Data
PreFrame
pfFrame
PostFrame
end while
restarted = true
pfuFreeAll
pfuExitInput
pfuExitUtil
end while
pfExit
I am not sure what has to be re-initialised and what doesn't in order to
free up memory, clear data file names and correctly set up the graphics
window in order for it to start drawing properly again.
Any help will be appreciated.
Thanks
Rob
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Rob Body
Simulator Manager
HR Mardyn
HR Wallingford
Howbery Park
Wallingford
Oxon
OX10 8BA
Tel +44 (0) 1491 822327
Fax +44 (0) 1491 832233
E-mail r.body++at++hrwallingford.co.uk <mailto:r.body++at++hrwallingford.co.uk>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
HR Wallingford uses Faxes and Emails for confidential and
legally privileged business communications. They do not of
themselves create legal commitments. Disclosure to parties
other than addressees requires our specific consent. We are
not liable for unauthorised disclosures nor reliance upon
them. If you have received this message in error please
advise us immediately and destroy all copies of it.
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
This archive was generated by hypermail 2b29 : Mon Oct 07 2002 - 04:26:15 PDT