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

corrupted JEF and DST output with "save as" in non-US locale #387

Closed
lexelby opened this Issue Feb 8, 2019 · 7 comments

Comments

Projects
None yet
2 participants
@lexelby
Copy link
Member

lexelby commented Feb 8, 2019

Described in detail in #364. See the chart in #364 (comment) and the mention of decimal separators here: #364 (comment)

It seems that DST and JEF files get corrupted on @jameskolme's system when using "Save As", but not when exported with "Embroider". Changing the decimal separator from , to . (locale settings) seems to fix DST but not JEF.

@lexelby

This comment has been minimized.

Copy link
Member Author

lexelby commented Feb 8, 2019

@jameskolme Could you please post some example broken files that Ink/Stitch produces but your machine says are corrupted?

  1. File -> Save As, DST file, with decimal separator set to ,
  2. File -> Save As, JEF file, with decimal separator set to ,
  3. File -> Save As, JEF file, with decimal separator set to .

If I understand your description correctly, all three of the above result in corrupted files, right?

@lexelby

This comment has been minimized.

Copy link
Member Author

lexelby commented Feb 8, 2019

Oh, and for each of the above, could you also post a version made with the Embroider extension that is not corrupted? Then I can compare the corrupted with the non-corrupted and hopefully I can spot the difference.

BTW, in case you're curious, I know it seems like an open and shut case of locale issues, but I really can't find anywhere in the code where we'd be writing a floating point number as a string (either with a . or , separator), so I'm still baffled. :)

@jameskolme

This comment has been minimized.

Copy link

jameskolme commented Feb 8, 2019

Now I'm puzzled, no matter what I do machine will open everything, Janome preview software refuses to open save as versions. I did get pretty nasty errors when opening files on machine before.
Test.zip

Error is failing, but like I mentioned before, if embroidery contains only running stitch, files are ok as far as I can test.
line.zip

@lexelby

This comment has been minimized.

Copy link
Member Author

lexelby commented Feb 10, 2019

Okay, here's one problem: the files produced with Save As have a line feed at the end of the file (0x0a, a.k.a. \n), and they shouldn't. I'll get that fixed soon. That could be the entire problem for the Janome preview software.

@lexelby

This comment has been minimized.

Copy link
Member Author

lexelby commented Feb 12, 2019

Does this one open properly in the Janome preview software?

fixed.zip

@jameskolme

This comment has been minimized.

Copy link

jameskolme commented Feb 12, 2019

Yes file works ok.

@lexelby

This comment has been minimized.

Copy link
Member Author

lexelby commented Feb 14, 2019

Awesome! That's the same file you gave me, but with the extra carriage return at the end removed. Looks like that's what's causing the problem, then.

@lexelby lexelby referenced this issue Feb 15, 2019

Merged

bug fixes #364

@lexelby lexelby closed this in #364 Feb 16, 2019

lexelby added a commit that referenced this issue Feb 16, 2019

v1.22.0: tons of bug fixes!
Bug fixes:
  * properly handle black fill (#362)
  * don't create paths with empty "d" attribute when importing DST, PES, etc (#363)
  * properly encode trims in JEF files (#377)
  * significantly improve error messages for crashes in auto-fill
  * informative error message for auto-fill of extremely tiny shapes
  * fix file corruption in "Save As" JEF, DST, etc (all formats) (#387)
    * Ink/Stitch was erroneously adding a carriage return at the end of the file
  * fix print metadata (#372)
  * fix adding presets in Params (#381)
  * fix crash if fill start and end points are very close
  * don't crash on a design with no stitches
  * support manual stitch paths with a single stitch

New feature:
  * option to skip the last stitch in each row of fill stitch
    * usually that stitch is unnecessary and will be very close to the stitch at the start of the next row
    * this can reduce stitch count for "free" in most cases
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.