Screen freeze after modal form is unloaded

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

Pretty much says it all. I put up the form, I process the stuff that
gets entered, the user says they're done, and then I Unload the form.
("Unload.me"). About 10% of the time, after the form has disappeared,
the PowerPoint Editor menu is disabled, in its entirety. About the
only way I can kickstart things is to minimize the PPT window, and
then get it back.

I'm presuming I'm doing something in the form code that triggers this
behavior - is there anything I ought to be looking for in particular?
Any way to keep this from happening - ever? Could it be something
that my users are doing in another window that triggers this?

Appreciate any insights you all can shed - thanks!
 
To add to Chirag's answer. Are you CERTAIN that when your form closes there
are no processes left running?


Austin Myers
MS PowerPoint MVP Team

Provider of PFCPro, PFCMedia and PFCExpress
www.playsforcertain.com
 
Hi Chiraq:

Yes - that's exactly what I was doing. I have changed all instances
of where I was using that model, and will now sit back and see.

While I'm doing that, can you explain what might have been happening
to cause the symptoms I was seeing?

Thanks.
 
If you mean processes that were spawned by the form code itself - yes,
I'm sure. There are scads of other processes running at all times,
however -- would that make any difference?
 
Hi Dave,

Here is a summary of what could be going on:
When you unload a form, the memory allocated to the form object gets
released back to the system. When you do that from within the form's event
handler or any method, it effectively invalidates the "Me" reference. So,
all accesses to the form's data or variables after the Unload statement are
invalid and lead to unexpected results. Now the memory released because of
the Unload call may still be free for sometime and not get allocated for
anything else. So, your code may continue to access and modify it without
showing any problems. But sometimes the released memory many get allocated
to something else and at that point, your code would seem to behave
erratically. You may also see PowerPoint behave erraticially if your code
accidentally modifies PowerPoint's memory.

- Chirag

PowerShow - View multiple PowerPoint slide shows simultaneously
http://officeone.mvps.org/powershow/powershow.html


Hi Chiraq:

Yes - that's exactly what I was doing. I have changed all instances
of where I was using that model, and will now sit back and see.

While I'm doing that, can you explain what might have been happening
to cause the symptoms I was seeing?

Thanks.
 
If you mean processes that were spawned by the form code itself - yes,
I'm sure.

Good, I've ran into that one myself a couple of times. :-)

There are scads of other processes running at all times,
however -- would that make any difference?


I was speaking, as you correctly assumed, processes started from your form.
Where I have ran into issues is if a started process is running, you close
the form, and the process fails in someway and has no way to report back as
the form has been Unloaded. (Assuming you have error traps in your code.)
For this reason I have gone to using "out of process" threads for anything I
think could have a chance of hanging PPT.
 
Back
Top