Empty templates cause Primalscript to crash

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 SUBSCRIPTION NUMBERS, LICENSE 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.
User avatar
robert@robdemsoft.se
Posts: 5
Joined: Mon Sep 07, 2015 11:59 am

Empty templates cause Primalscript to crash

Post by robert@robdemsoft.se » Mon May 06, 2019 5:11 am

Primalscript seem to have problems with empty files as templates (default included). This is an error introduced with a recent update I think.

Product, version and build:
Product: PrimalScript (64 Bit)
Build: v7.4.127
OS: Windows 10 Enterprise (64 Bit)
Build: v10.0.17763

Create an empty textfile, atextfile.txt
PrimalScript isn't started

1. In explorer, right click Edit with PrimalScript. This works
2. In PrimalScript, File, Open, atextfile.txt this also works
3. Just after opening previous file, File, Save As Template.
4. File, New, this new template. PrimalScript freezes and stop working

I also have problems with having an empty file as the default template. Error is identical. PrimalScript freezes throws a dialog box "... has stopped working" and Close Program.

Some screen shots below. Empty file is empty. As a template it's two bytes. Where I click to open it. Sorry about Swedish lang on the properties but it should be obvious.

Kind Regards,
Robert

Empty file
properties atextfile.png
properties atextfile.png (10.1 KiB) Viewed 758 times
Empty file saved as template
properties template atextfile.png
properties template atextfile.png (13.24 KiB) Viewed 758 times
New file - template
file new template.png
file new template.png (17.05 KiB) Viewed 758 times

User avatar
Alexander Riedel
Posts: 7118
Joined: Tue May 29, 2007 4:43 pm

Re: Empty templates cause Primalscript to crash

Post by Alexander Riedel » Mon May 06, 2019 7:51 am

Yes, you are correct. A bug escaped us. We will remedy this shortly.
Alexander Riedel
SAPIEN Technologies, Inc.

User avatar
robert@robdemsoft.se
Posts: 5
Joined: Mon Sep 07, 2015 11:59 am

Re: Empty templates cause Primalscript to crash

Post by robert@robdemsoft.se » Mon May 13, 2019 2:32 am

Product: PrimalScript (64 Bit)
Build: v7.4.128
OS: Windows 10 Enterprise (64 Bit)
Build: v10.0.17763

This is nit-picking but if you treat bugs like pokémon
1. Ctrl-N (no default template defined, klick No)
2. With this untitled file, File -> Save as template
3. Name it Empty (no file extension)
4. File -> New, this new Empty template
5. PrimalScript throw you a message box "Encountered an improper argument"

Repeat but name the file Empty.txt and it works as expected.

I'm perfectly fine with having an empty template with a .txt extension but since I raised the previous issue just thought I'd let you know that it's still possible to frustrate the Editor with this.

Kind Regards,
Robert

User avatar
Alexander Riedel
Posts: 7118
Joined: Tue May 29, 2007 4:43 pm

Re: Empty templates cause Primalscript to crash

Post by Alexander Riedel » Mon May 13, 2019 3:17 am

Not getting the Pokémon reference (wrong generation) but I’ll make sure it gets checked out.
Alexander Riedel
SAPIEN Technologies, Inc.