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

[MacOS] "Loading of a model file failed." for .3mf file generated by PrusaSlicer #10688

Closed
2 tasks done
johanLsp opened this issue May 29, 2023 · 7 comments
Closed
2 tasks done

Comments

@johanLsp
Copy link

johanLsp commented May 29, 2023

Description of the bug

Prusaslicer is unable to load again a project that it generated earlier. The 3MF attached was created using PrusaSlicer 2.5.0 by loading different STLs and preparing them for printing (e.p. added different box modifiers for infill and layers on the different models.
After saving the project and loading it up again the next day, I'm getting: "Loading of a model file failed."
image
The console logs don't give any information on what failed:

[2023-05-29 10:50:05.235961] [0x0000000111e9bdc0] [info]    Undo / Redo snapshot taken: Charger le Projet: retraction_tests, Undo / Redo stack memory: 0MB Resident memory: 332MB; Peak memory usage: 498MB
[2023-05-29 10:50:05.697795] [0x0000000111e9bdc0] [error]   Unable to open the file

I've read through similar existing issues:

  1. 2.4.1 and 2.4.2 - Can't open any STL or 3MF file on iMac #8292
  2. macOS 2.4.0+arm64 generates “Loading of a model file failed.” error #7987

As far as I can tell this is a different issue: the file exists locally (1.) and contains what looks like valid data (although way too small given the imported 5+ STL were in the 2-5 MBs range and the 3MF project is < 1MB, might be truncated?)
Beginning of the file attached:

x00000000 50 4B 03 04 14 00 08 08 08 00 74 B1 BC 56 00 00 00 00 00 00 00 00 00 00 00 00 x`xPK........t..V............x
x0000001A 13 00 00 00 5B 43 6F 6E 74 65 6E 74 5F 54 79 70 65 73 5D 2E 78 6D 6C 85 90 DB xax....[Content_Types].xml...x
x00000034 4A C4 30 10 86 EF F7 29 42 6E A5 4D 55 10 91 B6 7B E1 E1 09 D6 07 18 D2 69 1B xaxJ.0....)Bn.MU...{.......i.x
x0000004E 4C 26 21 99 2E EB DB 3B D9 15 84 05 F5 72 E6 3F 7C F0 F7 FB 53 F0 EA 88 B9 B8 xaxL&!....;.....r.?|...S.....x
x00000068 48 83 BE 6D 3B AD 90 6C 9C 1C 2D 83 7E 3F BC 35 8F 7A 3F EE FA C3 67 C2 A2 C4 xaxH..m;..l..-.~?.5.z?...g...x

The project file can't be opened in Prusaslicer 2.6.0-beta3 either. It's likely that the file itself is corrupted, in which case the issue is that PrusaSlicer 2.5.0 produced the corrupted file. I am able to open all other 3MF files I tried.

Project file & How to reproduce

Openthe following file with PrusaSlicer 2.5.0 or 2.6.0-beta3 on macOS:
Dominion Card Holders.3mf.zip

Checklist of files included above

  • Project file
  • Screenshot

Version of PrusaSlicer

2.5.0-macos

Operating system

macOS Catalina 10.15.7

Printer model

Prusa Mini+

@johanLsp
Copy link
Author

I confirmed the 3MF file is corrupted, it's not a valid zip file:

MacBook-Pro:Dominion$ unzip Dominion\ Card\ Holders.3mf
Archive:  Dominion Card Holders.3mf
  End-of-central-directory signature not found.  Either this file is not
  a zipfile, or it constitutes one disk of a multi-part archive.  In the
  latter case the central directory and zipfile comment will be found on
  the last disk(s) of this archive.

Other 3MF files do unzip correctly. Still, PrusaSlicer 2.5.0 produced a corrupted 3MF file.

@johanLsp
Copy link
Author

johanLsp commented May 29, 2023

It looks like any error while saving a 3MF file gets suppressed:

if (ret) {
// Success
// p->statusbar()->set_status_text(format_wxstr(_L("3MF file exported to %s"), path));
p->set_project_filename(path);
}
else {
// Failure
// p->statusbar()->set_status_text(format_wxstr(_L("Error exporting 3MF file %s"), path));
}

I probably hit a random error in my last save before closing the project, not seeing any errors I assumed everything went fine (as I should) but the project file is now corrupted beyond recovery.
Two things that would have prevented this:

  1. Display a dialog for any error happening when saving a file.
  2. Keep the project in a dirty state if saving is not successful. PrusaSlicer will ask me if I want to save my project when I'm closing it with unsaved changes. The last save failed, I should still have unsaved changes preventing PrusaSlicer from closing without confirmation.

EDIT: It turns out I have "Ask for unsaved changes in project" turned off in the preferences so confirmation on exit would not have caught the issue. I don't recall disabling that though or the reason I would have done it, I'm wondering what the default value is?

@kocikdav
Copy link
Collaborator

Hello, thank you for reporting. You are right about the error displaying after unsuccessful export to 3mf - it does not propagate to UI. We will improve it. It seems to be logging to console with "error" level at least. But that's not how it should be.

lukasmatena pushed a commit that referenced this issue Jun 2, 2023
@FidelCapo
Copy link
Collaborator

Displaying error message when there is a problem with 3mf file export has been improved and the change will be part of the next release.
Closing.

@uhlhosting
Copy link

uhlhosting commented Jan 17, 2024

Hi, I got the very same issue, on latest release of PrusaSlicer, and on MacOS Sonoma.

image

@dkt0591
Copy link

dkt0591 commented Feb 27, 2024

I got same error, my working on it, how can i recovery ?

@lukasmatena
Copy link
Collaborator

@uhlhosting @dkt0591 This can be completely different issue. Can you please create a new report (possibly referencing this one) and enclose the failing 3MFs? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants