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

[BUG] PhotonS save error #135

Closed
lcoronelp opened this issue Jan 27, 2021 · 47 comments
Closed

[BUG] PhotonS save error #135

lcoronelp opened this issue Jan 27, 2021 · 47 comments
Assignees

Comments

@lcoronelp
Copy link

lcoronelp commented Jan 27, 2021

Describe the bug

Saved photons file doesn't recognized by PhotonS machine (neither open in Chitubox or UVTools)

To Reproduce

Steps to reproduce the behavior:

  1. Open Photons file exported from Chitubox
  2. Execute Morph Erode 3/1 Chamfer: False Layers: Bottom
  3. Save as PhotonS File
    4.1. Try to print in PhotonS Machine -> Error: not recognized file
    4.2. Try to open in Chitubox: show as Fig. 1 Only one triangle and don't calculate correct the time
    4.3. Try to open in UVTools again: show as Fig. 2 Error in operation (overflow)

Expected behavior

Print without problem

Screenshots


Captura de pantalla_2021-01-27_16-06-52
[Fig. 1]


Captura de pantalla_2021-01-27_16-28-51
[Fig. 2]

Files

Gatitos.zip
Chitubox Project

Gatitos.zip
File Exported from Chitubox

GatitosEroded.zip
File saved from UVTools after eroded

System

  • OS: Linux Xubuntu 20.04 XFCE
  • Printer: PhotonS V5.0.2, UI 2.6

Errors when opened in UVTools again

System.OverflowException: Arithmetic operation resulted in an overflow.
   at UVtools.Core.FileFormats.PhotonSFile.Decode(String fileFullPath, OperationProgress progress) in D:\Tiago\Dropbox\Programming\C#\UVtools\UVtools.Core\FileFormats\PhotonSFile.cs:line 502
   at UVtools.WPF.MainWindow.<>c__DisplayClass95_0.<ProcessFile>b__0() in D:\Tiago\Dropbox\Programming\C#\UVtools\UVtools.WPF\MainWindow.axaml.cs:line 921

Thanks Tiago! If you need more info or test something, não ha problema, é só dizer :)

@sn4k3
Copy link
Owner

sn4k3 commented Jan 27, 2021

PhotonS is not write-supported by UVtools. Is a read-only format: https://github.com/sn4k3/UVtools#known-file-formats
You should use pws instead

@lcoronelp
Copy link
Author

Thanks for the fast response!

Then i have two problems:

  • When i open the PhotonS file in UVTools, i can't save to pws (only photons)
  • Chitubox doesn't export in pws
  • The convert function in UVTools doesn't work (i think is not implemented yet not?)

Know some workflow to use Chitubox and UVtools to make PWS files?

Thanks again!

@sn4k3
Copy link
Owner

sn4k3 commented Jan 27, 2021

Open the photons on UVtools, go to File -> Convert -> PhotonS (PWS)

@lcoronelp
Copy link
Author

Convert as you say doesn't do anything (nor shows error)

Have some log that can i check?

@sn4k3
Copy link
Owner

sn4k3 commented Jan 27, 2021

Can you send me your photons file? use wetransfer and put the link here. You need the lastest UVtools version to do so

@lcoronelp
Copy link
Author

Video of trying to convert:
https://user-images.githubusercontent.com/1972410/106024584-d4ca9b80-60bf-11eb-977c-7e9d50d70aff.mp4

The .photons is in the bug report in a zip. https://github.com/sn4k3/UVtools/files/5881466/Gatitos.zip

The version of uvtools is 2.3.2 X64

Thanks!

@sn4k3
Copy link
Owner

sn4k3 commented Jan 27, 2021

Works for me, this is the output:
Gatitos (2).zip

If you try to convert to ctb, does it works?

@lcoronelp
Copy link
Author

Didn't work, the convert menu doesn't work at all

And i note now than if i move the mouse in the menu, it closes immediately.
https://user-images.githubusercontent.com/1972410/106026229-79011200-60c1-11eb-9fd1-85cd75c772d3.mp4

Some bad interaction with the below preview? I note also that is not showing correctly

I have Nvidia GeForce GTX 1080 with OpenGL ES 3.2 NVIDIA 450.102.04

Curious.

@sn4k3
Copy link
Owner

sn4k3 commented Jan 27, 2021

What OS and version? Nevermind i see it. let me compile a build for you

@sn4k3
Copy link
Owner

sn4k3 commented Jan 27, 2021

Try this build: https://we.tl/t-5xPqoU3Gp0

@lcoronelp
Copy link
Author

Ok this version works as expected (is this a Qt version?)

The preview keeps rendering badly (but is a minor bug)
And sometimes it closes unexpectedly (two times making different actions)

Thanks for the help!

@sn4k3
Copy link
Owner

sn4k3 commented Jan 27, 2021

Not Qt, this is AvaloniaUI. A recent framework, and yes, it have some bugs, but as they release new versions is getting better. Windows have the least bugs.
I also notice that light desktops are worst with it, gnome seens more solid with this ui framework

@lcoronelp
Copy link
Author

Great! i didn't know it!
If you need test or anything that i can do, tell me!

Thanks again! Your work in this app is amazing!

@sn4k3
Copy link
Owner

sn4k3 commented Jan 27, 2021

Can you send a screenshot of how main window and other window (for example Tool - Morph) look on your os? The patch i send you i have redesigned the UI.

@lcoronelp
Copy link
Author

Captura de pantalla_2021-01-27_17-39-24
Captura de pantalla_2021-01-27_17-38-35
Captura de pantalla_2021-01-27_17-38-22

@lcoronelp
Copy link
Author

lcoronelp commented Jan 27, 2021

Captura de pantalla_2021-01-27_17-44-32
Repair issues process

@sn4k3
Copy link
Owner

sn4k3 commented Jan 27, 2021

Looks sharp, only that message box still have hidden text :(

@lcoronelp
Copy link
Author

The size of the message box is automatic? or calculated by the inner text?

If i resize it, the next times, it keeps extended
Captura de pantalla_2021-01-27_17-54-28

@sn4k3
Copy link
Owner

sn4k3 commented Jan 27, 2021

Automatic and limited to screen size, but sometimes it line breaks and clip words. It's a bug on the control and also happen with windows os

@lcoronelp
Copy link
Author

Ouch. bugs bugs bugs everywhere xD

Im web developer, in Avalonia don't have something similar to white-space:nowrap? I thing that this message is short (or break in two lines always?) Sorry if you was tried this yet :P

@sn4k3
Copy link
Owner

sn4k3 commented Jan 27, 2021

It's really a problem on controler. It should wrap automaticly if needed, but all i see it dont need to wrap still it line break without a motive, worse, it clips the text. I already open a issue on controler but no response so far. But yes this framework have lot of bugs to fix, if you go to thier github the issues are flood. But they are in good path. It's amazing what they achieve already

@lcoronelp
Copy link
Author

Sorry for the late answer. I was working (you know).

I see that Avaloina have only few months! But with a great and fast progress!

I like ask you, I can pass some option to the executable UVTools or something to obtain debug info to send to you? (because it's closing unexpectedly in random points)

@sn4k3
Copy link
Owner

sn4k3 commented Jan 27, 2021

It dont generate debug info. All you can do is execute from terminal and when it crash see if it return any message to the terminal

@lcoronelp
Copy link
Author

Only

1193721 segmentation fault  ./UVtools

Checking a top i can see multiple process in hierarchy.
Captura de pantalla_2021-01-27_21-33-14

Inclusive after the segmentation fault without any UVTools windows open :O
Captura de pantalla_2021-01-27_21-37-29

@sn4k3
Copy link
Owner

sn4k3 commented Jan 27, 2021

you can try to compile the libcvextern on your system and replace by yours, it can be...

@lcoronelp
Copy link
Author

Compiling.

By the way, unfortunately neither the pws exported by the latest version nor the one you sent me work on Anycubic PhotonS :(

The machine show "File format error" when i touch play button.

@sn4k3
Copy link
Owner

sn4k3 commented Jan 27, 2021

You need to update your printer firmware

@lcoronelp
Copy link
Author

I have the newest firmware 5.0.2, i can print correctly any pws exported with Photon workshop

@sn4k3
Copy link
Owner

sn4k3 commented Jan 27, 2021

Can you try slice by PrusaSlicer with my printer installed? Maybe the convertion from PhotonS lack of important parameters

@lcoronelp
Copy link
Author

I will try (i currently don't have PrusaSlicer installed)

BTW, compiled and copied the libcvextern.so.

The preview keeps rendering badly
The app keep closing unexpectedly

:(

I send to you my libcvextern.so if it works for other: Xubuntu 20.04 https://we.tl/t-r6FnwzLHBn

@lcoronelp
Copy link
Author

Hi again, i installed PrusaSlicer but i had some problems:

  • UVtools only find the Prusa Slicer folder at %HOME%/.PrusaSlicer instead %HOME%/.config/PrusaSlicer defined in Prusa Slicer 2.3.0

  • I make an ln -s ~/.config/PrusaSlicer ~/.PrusaSlicer and the UVTols recognize the folder correctly

  • In my version (Avalonia) the buttons "unselect all" and "select all" in profiles didn't work

  • Exporting from PrusaSlicer and importing in UVTools, the pws file works perfectly and is recognized by the printer without problem.
    I think that the problems is in the conversion from Chitu .photons to .pws

  • I noticed that the preview of file from PrusaSlicer work corretly, the Chitubox file don't.

I hope this can be useful!

@lcoronelp
Copy link
Author

Hi again, I can see that my version of UVTools is very inestable:

With the same file (exported with same config from PrusaSlider), sometimes imports correctly and sometimes closes unexpectedly.

Can be because the avalonia version?

@lcoronelp
Copy link
Author

lcoronelp commented Jan 30, 2021

I test ten times the same file in non Avalonian (gtk?) version (official version) and don't close at any moment. ;)

@lcoronelp
Copy link
Author

lcoronelp commented Jan 30, 2021

Some interesting detail is that in the avalonian version, the texts are bigger than the official version
Captura de pantalla_2021-01-30_13-13-26
Left: Avalonian
Right: Official

@lcoronelp
Copy link
Author

Another thing:

In PrusaSlicer Printer Notes if i don't add LiftSpeed_120 and only keep the LiftingSpeed_120, then the UVTools don't recognize the lifting speed and say (i think the default) 100mm/min

Additional, i can add BottomLiftSpeed_65 to add the bottom lift speed (as Chitubox), and this config show correctly on UVTools for bottom layers.

I don't see any list of custom properties in the readme, do you have some info about that?

Thanks!

@sn4k3
Copy link
Owner

sn4k3 commented Jan 30, 2021

Hi again, i installed PrusaSlicer but i had some problems:

  • UVtools only find the Prusa Slicer folder at %HOME%/.PrusaSlicer instead %HOME%/.config/PrusaSlicer defined in Prusa Slicer 2.3.0
  • I make an ln -s ~/.config/PrusaSlicer ~/.PrusaSlicer and the UVTols recognize the folder correctly
  • In my version (Avalonia) the buttons "unselect all" and "select all" in profiles didn't work
  • Exporting from PrusaSlicer and importing in UVTools, the pws file works perfectly and is recognized by the printer without problem.
    I think that the problems is in the conversion from Chitu .photons to .pws
  • I noticed that the preview of file from PrusaSlicer work corretly, the Chitubox file don't.

Thanks for the report i will work on that.
In any case you should not use chitubox with photons since it have no AA and incomplete file info.
You can use chitubox if you create a custom printer and use Zip or ctb format and then convert with UVtools.

With the same file (exported with same config from PrusaSlider), sometimes imports correctly and sometimes closes unexpectedly.
Can be because the avalonia version?

Both are avalonia, the diference is one is the RC1 version and the last i sent you is the v1 "stable"
As told this UI have some bugs and can be unstable under some desktops, if you can try gnome i guess your problems will gone.

Some interesting detail is that in the avalonian version, the texts are bigger than the official version

I retouched the GUI, thats why.

In PrusaSlicer Printer Notes if i don't add LiftSpeed_120 and only keep the LiftingSpeed_120, then the UVTools don't recognize the lifting speed and say (i think the default) 100mm/min

Oh, i miss that one, it should be LiftSpeed_xxx will fix it next version.
Printer notes already show all compatible variables with the format, but you can find them here:
https://github.com/sn4k3/UVtools#custom-printer-notes-keywords-for-prusaslicer

@lcoronelp
Copy link
Author

Thanks for the info Tiago!

If you need test something in no Gnome environment (XFCE with nvidia card) and/or PhotonS machine or some other test that you may need and you think i can do it, only write me.

Keep in touch!

@lcoronelp
Copy link
Author

I see another small thing (do you prefer that i submit another bug when i found some detail? or we talk in another space? or i can mix all here?)

When import SL1 into UVTools, if the file have an dot ., then the PWS exported is trimmed at this point (probably the slice function is slicing for the first dot instead the last or the regex is not working as expected :D)

@sn4k3
Copy link
Owner

sn4k3 commented Jan 30, 2021

That problem is already fixed on current dev. Thanks for tell me back

@yaroslaw
Copy link

yaroslaw commented Feb 3, 2021

I have exactly same issues with printer not recognizing PWS after UVTools (win64). If it's fixed, where can I get the latest binaries?

@sn4k3
Copy link
Owner

sn4k3 commented Feb 3, 2021

I have exactly same issues with printer not recognizing PWS after UVTools (win64). If it's fixed, where can I get the latest binaries?

Also converted from photons?

@yaroslaw
Copy link

yaroslaw commented Feb 4, 2021 via email

@sn4k3
Copy link
Owner

sn4k3 commented Feb 4, 2021

As said on this topic, uvtools don't fully support PhotonS file format, is for read-only, any attempt to write or convert will fail. You need to slice to PWS on slicer, If you fully read this topic from begin you will find the same problem and "resolution" which is: dont use photons as source

@yaroslaw
Copy link

yaroslaw commented Feb 4, 2021 via email

@sn4k3
Copy link
Owner

sn4k3 commented Feb 4, 2021

If you want to use chitubox you need to create a custom printer and coping same properties from photons. Then you can export to zip and convert with uvtools to pws.
Or use prusaslicer or lychee

@yaroslaw
Copy link

yaroslaw commented Feb 5, 2021 via email

sn4k3 added a commit that referenced this issue Feb 6, 2021
* (Upgrade) EmguCV/OpenCV to v4.5.1
* (Upgrade) AvaloniaUI to 1.0
* (Improvement) GUI re-touched
* (Improvement) Make pixel editor tab to disappear when pixel editor is disabled
* (Improvement) Simplify the output filename from PrusaSlicer profiles
* (Improvement) All operations require a slicer file at constructor rather than on execute, this allow exposure the open file to the operation before run it
* (Improvement) Calibrations: Auto set "Mirror Output" if open file have MirrorDisplay set
* (Change) Tool - Redraw model/supports icon
* (Change) photon and cbddlp to use version 3 by default
* (Add) Tool - Dynamic layer height: Analyze and optimize the model with dynamic layer heights, larger angles will slice at lower layer height
        while more straight angles will slice larger layer height. (#131)
* (Add) Calibration - Exposure time finder: Generates test models with various strategies and increments to verify the best exposure time for a given layer height
* (Add) File load checks, trigger error when a file have critical errors and attempt to fix non-critical errors
  * Layers must have an valid image, otherwise trigger an error
  * Layers must have a incremental or equal position Z than it previous, otherwise trigger an error
  * If layer 0 starts at 0mm it will auto fix all layers, it will add Layer Height to the current z at every layer
* (Add) Tool - Edit print parameters: Allow set parameters to each x layers and skip n layers inside the given range.
        This allow the use of optimizations in a layer pattern, for example, to set 3s for a layer but 2.5s for the next.
* (Add) Layer height property to "Layer Data" table: Shows layer height for the slice
* (Fix) When automations applied and file is saved, it will not warn user about file overwrite for the first time save
* (Fix) Tool - Redraw model/supports: Disable apply button when no file selected
* (Fix) Tool - Infill: Lack of equality member to test if same infill profile already exists
* (Fix) Auto converted files from SL1 where clipping filename at first dot (.), now it only strips known extensions
* (Fix) SL1 encoded files wasn't generating the right information and lead to printer crash
* (Fix) PrusaSlicer printer "Anycubic Photon S" LiftSpeed was missing and contains a typo (#135)
* (Fix) PrusaSlicer profile manager wasnt marking missing profiles to be installed (#135)
* (Fix) PrusaSlicer folder search on linux to also look at %HOME%/.config/PrusaSlicer (#135, #136)
* (Fix) Operations were revised and some bug fixed, most about can't cancel the progress
* (Fix) Some typos on tooltips
* (Fix) Prevent PhotonS from enconding, it will trigger error now as this format is read-only
* **(Fix) Ctrl + Shift + Z to redo the last operation:**
  * The layer range is reseted instead of pull the used values
  * Tool - Arithmetic always disabled
  * Action - Layer import didn't generate info and always disabled
@sn4k3
Copy link
Owner

sn4k3 commented Feb 6, 2021

PhotonS still readonly, a error will pop if anyone try to write a photons file.

@sn4k3 sn4k3 closed this as completed Feb 6, 2021
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

3 participants