Packaged VBScript crashes on load

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 5 years and 6 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
User avatar
Jay Adams
Posts: 22
Last visit: Fri Dec 16, 2022 7:32 am

Packaged VBScript crashes on load

Post by Jay Adams »

The exe crashes every time when running on a test Windows 7 machine (details below). I've tried both x86 and x64 versions. It runs with no output, but doesn't crash, on the Windows 10 machine where it was created. I can replicate the problem with a single line VBScript that just writes "Hello World" to the console. I've created many before with similar settings on previous versions of PrimalScript.

Packager settings:
Target: Microsoft Windows 32 and 64 Bit
Script Engine: SAPIEN Script Host (Command line)
Embed a default manifest
Auto increment file version
(no other customizations)


Product, version and build: PrimalScript Version 7.4.116
32 or 64 bit version of product: 64-bit
Operating system: Windows 10
32 or 64 bit OS: 64-bit

*** Please add details and screenshots as needed below. ***

Problem signature:
Problem Event Name: BEX
Application Name: HelloWorld.exe
Application Version: 1.0.0.2
Application Timestamp: 5af02741
Fault Module Name: HelloWorld.exe
Fault Module Version: 1.0.0.2
Fault Module Timestamp: 5af02741
Exception Offset: 001fbdab
Exception Code: c0000417
Exception Data: 00000000
OS Version: 6.1.7601.2.1.0.256.4
Locale ID: 1033
Additional Information 1: 1bf8
Additional Information 2: 1bf8580351515b1e38c79eb7769bd9e5
Additional Information 3: ea8e
Additional Information 4: ea8e0ffda95a619665bc47e6b302d418
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Re: Packaged VBScript crashes on load

Post by Alexander Riedel »

Since it is not actually caused by a particular VBScript and not happening on all platforms it is most likely caused by different runtime versions.
PrimalScript and its script engines have all been ported to Visual Studio 2017 not to long ago.
Compare the 2017 runtime versions on the two machines and see if they are a different version. If so (or not) please let us know.
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
Jay Adams
Posts: 22
Last visit: Fri Dec 16, 2022 7:32 am

Re: Packaged VBScript crashes on load

Post by Jay Adams »

I still use this method on some projects because of it's ability to run on older platforms without dependencies. Is there a way to use the older packaging runtime with the latest version of PS?
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Re: Packaged VBScript crashes on load

Post by Alexander Riedel »

Let’s first determine what the actual problem is. Can you provide the installed Visual Studio runtime versions for the machine it is crashing versus the one where it works?
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
Jay Adams
Posts: 22
Last visit: Fri Dec 16, 2022 7:32 am

Re: Packaged VBScript crashes on load

Post by Jay Adams »

On the test Windows 7 machine where the exe crashes, I don't see any of the runtimes installed.

On the Windows 10 machine where it was built, VC++ runtimes from 2005 to 2017 are installed. Note that while it doesn't crash on this machine, it doesn't output anything either.

Previously I'd imported the older "SAPIEN Script Host (Command line) Win32 (XP)" to get these packages to work everywhere without the need for additional installs.
User avatar
Alexander Riedel
Posts: 8478
Last visit: Tue Mar 26, 2024 8:52 am
Answers: 19
Been upvoted: 37 times

Re: Packaged VBScript crashes on load

Post by Alexander Riedel »

All VBScript packager engines require a Visual Studio Runtime. This has always been the case. Windows 7 has one installed by default, but the version depends on the patch level. Please check again what version you have installed.
Alexander Riedel
SAPIEN Technologies, Inc.
This topic is 5 years and 6 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.