Freestyle output path without termination crashes Blender #99189

Closed
opened 2022-06-26 17:53:03 +02:00 by Jon Pattison · 3 comments

System Information
Operating system: Windows
Graphics card: N/A

Blender Version
Broken: 3.2.0

Short description of error
If the user does not enter trailing slash, Freestyle doesn't supply the slash when concatenating the file name. This can cause an attempt to write to the drive root, which in Windows causes a permissions violation.
Example bad output path is "C:\Temp" which ends up like "C:\Temp0001.svg" causing an exception.

Exact steps for others to reproduce the error

  1. From File->Defaults select "Load Factory Settings" twice.
  2. From Edit->Preferences->Add-ons enable "Render: Freestyle SVG Exporter"
  3. On "Render Properties" tab enable "Freestyle SVG Export" and "Freestyle"
  4. On "Output Properties" tab, in the "Output" field, enter an existing folder name for a folder in the root of the drive such as "C:\Temp". DO NOT enter a trailing slash.
  5. Press the F12 key.

Excerpt from debug log
Error: Python: Traceback (most recent call last):

File "<string>", line 1, in <module>
File "C:\Program Files\Blender Foundation\Blender 3.2\3.2\scripts\freestyle\modules\parameter_editor.py", line 1587, in process
  fn(scene, layer, lineset)
File "C:\Program Files\Blender Foundation\Blender 3.2\3.2\scripts\addons\render_freestyle_svg.py", line 616, in lineset_post
  cls.shader.write()
File "C:\Program Files\Blender Foundation\Blender 3.2\3.2\scripts\addons\render_freestyle_svg.py", line 410, in write
  tree = et.parse(self.filepath)
File "C:\Program Files\Blender Foundation\Blender 3.2\3.2\python\lib\xml\etree\ElementTree.py", line 1229, in parse
  tree.parse(source, parser)
File "C:\Program Files\Blender Foundation\Blender 3.2\3.2\python\lib\xml\etree\ElementTree.py", line 569, in parse
  source = open(source, "rb")

FileNotFoundError: [Errno 2] No such file or directory: 'C:\Temp0001.svg'

Error : EXCEPTION_ACCESS_VIOLATION
Address : 0x00007FF8D1E89B87
Module : python310.dll
Thread : 000032f0
Writing: C:\Users\Jon\AppData\Local\Temp\blender.crash.txt

**System Information** Operating system: Windows Graphics card: N/A **Blender Version** Broken: 3.2.0 **Short description of error** If the user does not enter trailing slash, Freestyle doesn't supply the slash when concatenating the file name. This can cause an attempt to write to the drive root, which in Windows causes a permissions violation. Example bad output path is "C:\Temp" which ends up like "C:\Temp0001.svg" causing an exception. **Exact steps for others to reproduce the error** 1. From File->Defaults select "Load Factory Settings" twice. 2. From Edit->Preferences->Add-ons enable "Render: Freestyle SVG Exporter" 3. On "Render Properties" tab enable "Freestyle SVG Export" and "Freestyle" 4. On "Output Properties" tab, in the "Output" field, enter an existing folder name for a folder in the root of the drive such as "C:\Temp". DO NOT enter a trailing slash. 5. Press the F12 key. **Excerpt from debug log** Error: Python: Traceback (most recent call last): ``` File "<string>", line 1, in <module> File "C:\Program Files\Blender Foundation\Blender 3.2\3.2\scripts\freestyle\modules\parameter_editor.py", line 1587, in process fn(scene, layer, lineset) File "C:\Program Files\Blender Foundation\Blender 3.2\3.2\scripts\addons\render_freestyle_svg.py", line 616, in lineset_post cls.shader.write() File "C:\Program Files\Blender Foundation\Blender 3.2\3.2\scripts\addons\render_freestyle_svg.py", line 410, in write tree = et.parse(self.filepath) File "C:\Program Files\Blender Foundation\Blender 3.2\3.2\python\lib\xml\etree\ElementTree.py", line 1229, in parse tree.parse(source, parser) File "C:\Program Files\Blender Foundation\Blender 3.2\3.2\python\lib\xml\etree\ElementTree.py", line 569, in parse source = open(source, "rb") ``` FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Temp0001.svg' Error : EXCEPTION_ACCESS_VIOLATION Address : 0x00007FF8D1E89B87 Module : python310.dll Thread : 000032f0 Writing: C:\Users\Jon\AppData\Local\Temp\blender.crash.txt
Author

Added subscriber: @builder60

Added subscriber: @builder60

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

Fixed in 3.3+ versions: 35824c38e3
Closing

Fixed in 3.3+ versions: https://projects.blender.org/blender/blender-addons/commit/35824c38e32b74e24274cd7f41cc4dc8f5bd88cb Closing
Blender Bot added
Status
Archived
and removed
Status
Confirmed
labels 2024-01-10 05:52:26 +01:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#99189
No description provided.