Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PrusaSlicer 2.4.1 Crashes on opening - Internal Error: invalid STOI Argument #8217

Closed
1 of 2 tasks
CosmoStarke opened this issue Apr 19, 2022 · 8 comments
Closed
1 of 2 tasks

Comments

@CosmoStarke
Copy link

CosmoStarke commented Apr 19, 2022

Description of the bug

I have a desktop computer running Microsoft Windows and am getting a popup after opening PrusaSlicer 2.4.1 that states "Internal Error: invalid STOI Argument" when I click okay the application does not progress and closes down.

I only started to get this error after upgrading to PrusaSlicer 2.4.1 and before all was working fine. I tried uninstalling and reinstalling the application a number of times but got the same error. Any ideas on what I can do to resolve?

I can access the Prusa G-code viewer app with no issues.

Project file & How to reproduce

click on PrusaSlicer icon
initial popup with "Unhandled unknown exception; terminating the application" error is presented
click "OK" on popup
new popup PrusaSlicer Error appears with "Internal error: invalid STOI argument"
click "OK" on popup and error popup disappears along with PrusaSlicer window

Checklist of files included above

  • Project file
  • Screenshot

Version of PrusaSlicer

2.4.1

Operating system

WIN 10

Printer model

NA
api-ms-win-crt-runtime-l1-1-0.zip

@lukasmatena
Copy link
Collaborator

Can you please ZIP and post your configuration folder (C:\Users\user\AppData\Roaming\PrusaSlicer). It might help us to reproduce the problem. Thanks.

@CosmoStarke
Copy link
Author

Updated with file attachment. thanks

@jmd73
Copy link
Contributor

jmd73 commented Apr 26, 2022

@CosmoStarke What @lukasmatena is asking for is the contents of the configuration folder. Use the path Lukas posted and replace "/user/" with your username on that computer.

It should (at least) contain these folders/files:
bild

@CosmoStarke
Copy link
Author

K thanks for your patience here is the zip file of that folder
PrusaSlicer.zip

@bubnikv
Copy link
Collaborator

bubnikv commented May 4, 2022

@CosmoStarke

Is there anything special about the directory where the PrusaSlicer.ini is being saved? Aren't you using some synchronization service as DropBox, Microsoft OneDrive or Google Drive? Isn't it a network drive? Or maybe you have some back-up service running over that directory?

This PrusaSlicer.ini corruption is something I am completely out of my wits, even with >20 years of development on Windows. It only happens on Windows and only to PrusaSlicer.ini.

@hejllukas
Copy link
Collaborator

@CosmoStarke

Thank you for providing the ZIP file of the configuration folder.
To get PrusaSlicer working again, you need to delete just the PrusaSlicer.ini file located inside the folder C:\Users\user\AppData\Roaming\PrusaSlicer (it is the same folder that you was ZIPed and posted in your previous post).
It is safe to delete PrusaSlice.ini file, your user profiles will not be affected.
The reason you need to do this is that the PrusaSlice.ini file is corrupted, and PrusaSlicer cannot recover from this without deleting PrusaSlice.ini file.

We've been facing this issue with corrupted PrusaSlicer.ini for a long time, and we still haven't been able to figure out what's really causing it. We created a workaround to reduce the probability of this issue, and you have been the first one with this issue since then.

Do you remember if one of the following situations happened sometime before the issue occurred:

  • The computer was randomly crashed (blue screen of death, for example) or restarted.
  • Power outage when the computer was running.
  • The computer was manually restarted using the restart button or shut down with a long power button press.

Are you using a notebook or a desktop PC?

  • If you're using a notebook, what is its product number (if you know it)?
  • If you're using a desktop PC, what type of disk drive does it have? SSD, nVME, or HDD (if you know it)?

@CosmoStarke
Copy link
Author

@ bubnikv
no special synchronization and the files are stored on the C:Drive

@hejllikas
Deleting the file deleted and all is working again, Thanks for that info.
Q: Do you remember if one of the following situations happened sometime before the issue occurred?
A: The computer was manually started using the power button

Q: Are you using a notebook or a desktop PC?
A: Desktop (alienware X51 R3) with SSD

hejllukas added a commit that referenced this issue May 9, 2022
…uctions on how to recover from it (#8217).

Previously when PrusaSlicer.ini was just partly corrupted, it could happen that PrusaSlicer.ini wasn't detected as corrupted, and it could cause that instruction on how to recover from this state wasn't shown, and PrusaSlicer crashed because wrong data from PrusaSlicer.ini was read.
hejllukas added a commit that referenced this issue Jun 2, 2022
…uctions on how to recover from it (#8217).

Previously when PrusaSlicer.ini was just partly corrupted, it could happen that PrusaSlicer.ini wasn't detected as corrupted, and it could cause that instruction on how to recover from this state wasn't shown, and PrusaSlicer crashed because wrong data from PrusaSlicer.ini was read.
lukasmatena pushed a commit that referenced this issue Jun 29, 2022
…uctions on how to recover from it (#8217).

Previously when PrusaSlicer.ini was just partly corrupted, it could happen that PrusaSlicer.ini wasn't detected as corrupted, and it could cause that instruction on how to recover from this state wasn't shown, and PrusaSlicer crashed because wrong data from PrusaSlicer.ini was read.
@bubnikv
Copy link
Collaborator

bubnikv commented Jun 29, 2022

Very rarely for some unknown reason PrusaSlicer.ini is partially or fully filled in with binary zeros, most likely due to power outage or a bug in hard drive driver. We may only speculate, it may be that Windows kills PrusaSlicer when closing windows, PrusaSlicer does not write the PrusaSlicer.ini file completely or Windows does not flush the disk caches when powering down. We don't know, but we hope we have added another patch to the issue by detecting the null characters in PrusaSlicer.ini as a result of file corruption.

The patch is implemented in PrusaSlicer 2.5.0-alpha2.
Closing.

@bubnikv bubnikv closed this as completed Jun 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants