Microsoft Window XP SP2 has a feature called "Data
Execution Prevention" that is designed to prevent
applications from manipulating the stack in unsafe
ways. For some reason FMSLogo triggers this when it's
run on an AMD64 machine.
This is not reproducible on 32-bit machines.
This is reproducible in MSWLogo 6.5b.
How Reproducible:
Every Time
Steps to Reproduce:
1) Enable DEP on all applications
a) My Computer - Right Click - Properties
b) Click the "Advanced" tab
c) Press the "Performance" button
d) Click the "Data Execution Prevention" tab
e) Select "Turn on DEP for all programs and services
except those I select"
f) Press the "OK" button
g) Reboot
2) Double-click the FMSLogo icon.
What Happens:
A dialog box entitled "Data Execution Prevention -
Microsoft Windows" appears that says Windows has
closed fmslogo.
Expected Result:
FMSLogo starts.
This bug was reported by Narayanan Chitoor.
Logged In: YES
user_id=109252
Originator: YES
I just came across a posting on the OWLNext forum that describes this problem. In short, this is a confirmed bug in OWL. Defining BI_NOTHUNK may fix the problem, but it may also cause worse problems.
https://sourceforge.net/forum/forum.php?thread_id=1155637&forum_id=97175
Defining BI_NOTHUNK did not solve the problem. This will only be solved by leaving OWL behind and moving to something like wxWidgets.
In XP SP3 and Vista SP1, there are now API for controlling DEP. By calling GetProcessDEPPolicy() and SetProcessDEPPolicy(), FMSLogo may be able to provide a better user experience, rather than simply crashing. For example, if it could display a clear error message that DEP was preventing it from starting up, at least it would help close the information loop.
I was able to use the API to disable DEP from standard user account on a 64-bit install of Windows 7 Beta. I have checked in this change and am closing this bug. This change will be available on FMSLogo 6.23.0.
Technically this bug still exists and FMSLogo will trigger DEP on Vista RTM and XP SP2. However, FMSLogo will no longer be affected by DEP on any OS that is kept fully patched. I have fixed the bug as much as it can be fixed until I finish the wxWidgets rewrite (which will fix it for all patch levels of all operating systems).