tomysshadow / Movie-Restorer-Xtra

This Director Xtra allows Director to open and save Protected and Compressed Movie Files.
MIT License
31 stars 1 forks source link

Release Only Crash: Fatal error with Director 10.0.0.188 under Windows XP SP3 & 86Box #3

Closed Sembiance closed 1 year ago

Sembiance commented 1 year ago

I'm running Macromedia Director MX 2004 (10.0.0.188) in Windows XP SP3 under 86Box. 86Box is configured with a 450Mhz Pentium 2 with 768MB of RAM and a Slot 1/AOpen AX6BC motherboard (see attached 86Box.cfg file)

After sticking the latest Release.zip Version of Movie Restorer.x32 file into the Configuration\Xtras folder and launching director, I get: A fatal error has occurred. Director will quit now.

Removing the Movie Restorer.x32 file allows it to launch correctly again.

I have a QEMU (qemu-system-i386) image running the same version of Windows XP SP3 and same Director version, it works ok on there, so I don't think it's a Windows XP problem.

My guess is it has something to do with how it was compiled. Perhaps your compiler settings you used to compile the file includes certain CPU features not present on the Pentium 2?

Using the 'Debug' version of file WORKS!

I'm not sure what is included in the Debug version that would allow it to function but not the release version.

Since it works ok with the Debug version, I'm not sure this issue is that important, so feel free to close it. If you'd like me to try out different builds to try and investigate more, just let me know.

Thanks for creating such an awesome tool for software preservation!

Here is the 86Box config file: 86box.cfg.txt

tomysshadow commented 1 year ago

"A fatal error has occurred" is Director's generic built in exception handler message, so that doesn't tell me very much about the error cause. It could be the result of a bug, or as you say it could be the result of some unsupported SSE/MMX instruction running on an old CPU. I'm inclined to believe the latter if the Debug build works as in theory they should not work differently, and in that case I would not consider it a bug. But, I would like to be more sure before I call it that.

The Xtra is intended to work on Windows XP and above (but no lower) and I have intentionally tested it there. However, I don't think I've ever tried on the specific combo of 10.0 and XP. Also, I performed my testing within VirtualBox.

Some things that would be helpful for me to know:

  1. Can the issue be reproduced in VirtualBox? (I can probably just test this myself if it's too much hassle)
  2. Does the issue still occur for you after upgrading to the 10.1 version http://download.macromedia.com/pub/director/updates/mx2004/win/dmx2004_101_update_en.exe of Director MX 2004?
  3. Does the crash also occur with my LeechProtectionRemovalHelp Xtra? https://github.com/tomysshadow/LeechProtectionRemovalHelp-Xtra (which is also based on my Extender library)

On Sat, Sept 30, 2023, 7:53 p.m. Robert Schultz @.***> wrote:

I'm running Macromedia Director MX 2004 (10.0.0.188) in Windows XP SP3 under 86Box. 86Box is configured with a 450Mhz Pentium 2 with 768MB of RAM and a Slot 1/AOpen AX6BC motherboard (see attached 86Box.cfg file)

After sticking the latest Release.zip Version of Movie Restorer.x32 file into the Configuration\Xtras folder and launching director, I get: A fatal error has occurred. Director will quit now.

Removing the Movie Restorer.x32 file allows it to launch correctly again.

I have a QEMU (qemu-system-i386) image running the same version of Windows XP SP3 and same Director version, it works ok on there, so I don't think it's a Windows XP problem.

My guess is it has something to do with how it was compiled. Perhaps your compiler settings you used to compile the file includes certain CPU features not present on the Pentium 2?

Using the 'Debug' version of file WORKS!

I'm not sure what is included in the Debug version that would allow it to function but not the release version.

Since it works ok 86box.cfg.txt https://github.com/tomysshadow/Movie-Restorer-Xtra/files/12775881/86box.cfg.txt with the Debug version, I'm not sure this issue is that important, so feel free to close it. If you'd like me to try out different builds to try and investigate more, just let me know.

Thanks for creating such an awesome tool for software preservation!

— Reply to this email directly, view it on GitHub https://github.com/tomysshadow/Movie-Restorer-Xtra/issues/3, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADAH52YLXYJYI5GQ34TDTBTX5DEIBANCNFSM6AAAAAA5N6NH6M . You are receiving this because you are subscribed to this thread.Message ID: @.***>

Sembiance commented 1 year ago

Can the issue be reproduced in VirtualBox?

Don't have VirtualBox installed on my Linux system. I tried install it but it didn't work on my system, so I'm afraid I can't test this right now.

  1. Does the issue still occur for you after upgrading to the 10.1 version

Yes, after upgrading to 10.1, the same crash behavior happens. Crash with Release, ok with Debug.

  1. Does the crash also occur with my LeechProtectionRemovalHelp Xtra?

Yes, if I use the Release version of that, Macromedia crashes. The Debug version of that works fine.

I'm of course a very happy camper that the Debug version works ok :)

tomysshadow commented 1 year ago

I will investigate further later this week.

On Sun, Oct 1, 2023, 7:11 a.m. Robert Schultz @.***> wrote:

Can the issue be reproduced in VirtualBox? Don't have VirtualBox installed on my Linux system. I tried install it but it didn't work on my system, so I'm afraid I can't test this right now.

  1. Does the issue still occur for you after upgrading to the 10.1 version Yes, after upgrading to 10.1, the same crash behavior happens. Crash with Release, ok with Debug.

  2. Does the crash also occur with my LeechProtectionRemovalHelp Xtra? Yes, if I use the Release version of that, Macromedia crashes. The Debug version of that works fine.

I'm of course a very happy camper that the Debug version works ok :)

— Reply to this email directly, view it on GitHub https://github.com/tomysshadow/Movie-Restorer-Xtra/issues/3#issuecomment-1742077511, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADAH525NILD4YE6E4A2MIT3X5FTXJANCNFSM6AAAAAA5N6NH6M . You are receiving this because you commented.Message ID: @.***>

tomysshadow commented 1 year ago

Alright, I have now (temporarily, begrudgingly) installed 86Box and spent an evening figuring out how to get it to work. I used the same settings: a Pentium II clocked to 450 MHz and 768 MB of RAM, and quickly ran into the same issue - a crash occurred in the Release build, and not the Debug build. I was able to trace the exception back specifically to here, in the DllGetClassInfo export.

MOVUPS

(Yes, I am a fan of olive green.)

As predicted, the exception being thrown is an illegal instruction, specifically MOVUPS. According to this resource, MOVUPS is an SSE instruction, first introduced with the Pentium III. On the Pentium II it throws an exception because this instruction is not supported. The Debug version does not receive this optimization, so it doesn't cause the crash.

Personally, I do not consider this a bug and do not plan on fixing it for the official build, it is just the result of the default Visual Studio setting to use SSE instructions, which have been well supported on CPU's since the year 2000. However, if you would like to create a Release build without this issue yourself, then the relevant setting to change is in the Configuration Properties under C/C++ > Code Generation > Enable Enhanced Instruction Set > No Enhanced Instructions.

Enable Enhanced Instruction Set

Building the project requires the Director 11.5 XDK headers and Visual Studio 2017 or newer, but is otherwise straightforward - just right click the project and click build. Make sure to select the x86 build configuration, as the Visual Studio default is to build for x64 which is unsupported by Director.

Sembiance commented 1 year ago

Wow, that was a lot of work you did, thanks for the update. I'll continue using the Debug version for now, perhaps in the future I'll re-build it without the enhanced instruction set.

Thanks again for creating the plugin!