PrimalScript hangs on any edit

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 1 year and 2 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
DiZzyDmon
Posts: 73
Last visit: Thu Feb 29, 2024 8:01 am
Has voted: 1 time

PrimalScript hangs on any edit

Post by DiZzyDmon »

Product, version and build: PrimalScript 2022 version 8.0.173
Operating system: Windows 10 and Windows 11
PowerShell version(s): 5.1 (the one that comes with Windows)

For at least a year, for at least the last three versions of PrimalScript, the program hangs when I attempt to edit text within a script. This problem has become progressively worse since it first appeared. Initially it was just once in a while, more often when editing files on a network share. Now it happens almost every time I make any edit, wherever the file is stored.

Every time I open a file, the program hangs for a second or two (cursor becomes spinning circle).

Each time I make any change to a file's contents (type something, cut or paste something):
1. Nothing happens (the change does not immediately appear in the text)
2. (maybe one out of 4 times) The program window greys out
3. In Task Manager, PrimalScript.exe becomes "Not Responding" for a second or so
4. Eventually (anywhere from 2 to 10 seconds later), the keystrokes are entered into the script.

Maybe one out of 20 times the program crashes entirely.

I work primarily with PowerShell and Python scripts, on rare occasions with VBScript files. The behavior is the same for all these file types.

This behavior occurs on both of my company-owned computers:
Windows 10 laptop
Windows 10 dedicated virtual machine

To test whether this has something to do with the security and management programs in place on my company-owned computers, today I installed PrimalScript on my personally-owned Windows 11 Surface Pro tablet. The behavior was exactly the same on this system.

I have attached an .MP4 video illustrating the issue, with an extra .TXT file extension so that it is permitted to be attached to this ticket.

This issue has become so annoying that if it cannot be solved I will not be renewing my SAPIEN DevOps Suite maintenance agreement when it comes due next February.
Attachments
PrimalScript hangs on edit.mp4.txt
(1.66 MiB) Downloaded 524 times
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Re: PrimalScript hangs on any edit

Post by Alexander Riedel »

I can completely understand how this is frustrating. We have no similar reports recently so I am at a loss as to the cause at this moment. I will alert QA to investigate.
Can you give us a sense as to the size of script you are usually editing and its location?
Using Dropbox shares or onedrive can have a hand in this. Any additional information will help.
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
DiZzyDmon
Posts: 73
Last visit: Thu Feb 29, 2024 8:01 am
Has voted: 1 time

Re: PrimalScript hangs on any edit

Post by DiZzyDmon »

I searched my computer for PowerShell and Python script files I've edited within the last year. The smallest is 330 bytes, the largest is 102,224 bytes, the median is 13,742 bytes. I do not edit files in any sort of online storage. The files are either on my own computer or on a network share within our corporate intranet.
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Re: PrimalScript hangs on any edit

Post by Alexander Riedel »

I am not in front of a computer at the moment, so this is just a shot in the dark so to speak.
There is an option in PrimalScript to store Undo information between sessions.
Turn that off, exit and restart PrimalScript. Then open a file where that usually happens.
Then try again. Turn it back on if that doesn’t do anything.
QA has started looking into it.
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
DiZzyDmon
Posts: 73
Last visit: Thu Feb 29, 2024 8:01 am
Has voted: 1 time

Re: PrimalScript hangs on any edit

Post by DiZzyDmon »

In the Options dialog, in the section Text Editor > General, I unchecked "Save Undo information", clicked OK, got a warning that the change might require restarting the program. I closed PrimalScript, started it up again, opened a script, started editing. Things worked OK to start, but after a minute or so the hanging behavior is back in full force.

I've attached screenshots of what may be relevant sections of the Options dialog.
Attachments
Text Editor - PrimalSense.png
Text Editor - PrimalSense.png (30.49 KiB) Viewed 20218 times
Text Editor - General.png
Text Editor - General.png (37.77 KiB) Viewed 20218 times
Environment - Backup.png
Environment - Backup.png (26.55 KiB) Viewed 20218 times
User avatar
Alexander Riedel
Posts: 8479
Last visit: Thu Mar 28, 2024 9:29 am
Answers: 19
Been upvoted: 37 times

Re: PrimalScript hangs on any edit

Post by Alexander Riedel »

Shot in the dark as I said. You indicated that it crashes sometimes. Can you look at your event log and see what information gets put there in that case? It might provide a clue.
Alexander Riedel
SAPIEN Technologies, Inc.
User avatar
DiZzyDmon
Posts: 73
Last visit: Thu Feb 29, 2024 8:01 am
Has voted: 1 time

Re: PrimalScript hangs on any edit

Post by DiZzyDmon »

I've only had one crash today.
Here's what was written to the Application event log, source "Application Error", Event ID 1000:

Faulting application name: primalscript.exe, version: 8.0.173.0, time stamp: 0x636c063e
Faulting module name: primalscript.exe, version: 8.0.173.0, time stamp: 0x636c063e
Exception code: 0xc0000005
Fault offset: 0x0000000000160857
Faulting process id: 0x34c8
Faulting application start time: 0x01d90f155f99aceb
Faulting application path: C:\Program Files\SAPIEN Technologies, Inc\PrimalScript 2022\primalscript.exe
Faulting module path: C:\Program Files\SAPIEN Technologies, Inc\PrimalScript 2022\primalscript.exe
Report Id: 70269bc3-bc8a-44a3-aff9-2336907e6fed
Faulting package full name:
Faulting package-relative application ID:

I've attached a text file containing all of the primalscript.exe errors in my laptop's Application event log. Most of them were generated when attempting to digitally sign scripts (a different issue that I've just learned to live with).
Attachments
Application Event log Event ID 1000 primalscript.txt
(19.52 KiB) Downloaded 527 times
User avatar
Olga_B
Site Admin
Posts: 196
Last visit: Thu Mar 28, 2024 8:34 am

Re: PrimalScript hangs on any edit

Post by Olga_B »

Exception code: 0xc0000005 - It's an access violation exception, which generally occurs when something tries to access a memory location they have no business accessing.
Does is happened with any script you are using or only with particular scrip?
User avatar
DiZzyDmon
Posts: 73
Last visit: Thu Feb 29, 2024 8:01 am
Has voted: 1 time

Re: PrimalScript hangs on any edit

Post by DiZzyDmon »

The behavior occurs with all the scripts I have: PowerShell, Python, VBScript.
It does appear to be slightly worse the larger the script file gets.

I took my own wild guess and tried Options > Text Editor > PrimalSense > uncheck "Enable live syntax check", closing and reopening PrimalScript. But this made no difference.
User avatar
Olga_B
Site Admin
Posts: 196
Last visit: Thu Mar 28, 2024 8:34 am

Re: PrimalScript hangs on any edit

Post by Olga_B »

You said: 'For at least a year, for at least the last three versions of PrimalScript, the program hangs when I attempt to edit text within a script. '

I checked updates log for the last 4 releases, and there were no major changes.
Could you downgrade your PrimalScript to the version 8.0.168 and see if problem gone?
This will help us to determinate the problem
So far i cant reproduce it on our testing environment
This topic is 1 year and 2 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.