Author Topic: Exit sub crashes  (Read 2790 times)

0 Members and 2 Guests are viewing this topic.

Peter

  • Guest
Exit sub crashes
« on: May 06, 2011, 01:17:57 PM »
Deleted....
« Last Edit: May 05, 2015, 12:36:04 PM by Peter »

Charles Pegge

  • Guest
Re: Exit sub crashes
« Reply #1 on: May 06, 2011, 01:46:00 PM »
Hi Peter,

This is a symptom of stack corruption within the sub.

If too many items are left on the stack, Oxygen will handle this nicely, but if the return address of the procedure is removed then there is trouble!

Usually this happends when too few parameters are passed when making a call from within the procedure.

Charles

Charles Pegge

  • Guest
Re: Exit sub crashes
« Reply #2 on: May 06, 2011, 07:09:40 PM »

Hi Peter,

ExitProcess works independently of the process stack so to speak. Each process has its own private stack and cannot disrupt another process or the operating system if its stack gets corrupted. Which is why you can safely use ExitProcess inside a procedure.

You will need to isolate each call branch and see which one is causing the crash.

Charles