OSL, Windows, external scripts are not compiled anymore #88323

Closed
opened 2021-05-16 10:55:12 +02:00 by Ilja Razinkov · 19 comments

System Information
Operating system: Windows 10

Blender Version
Broken: version: 2.93.0 Beta, branch: master, commit date: 2021-05-15 16:29, hash: 610c0ecc3b, type: Release
Worked: 2.91

Recent 2.93 beta always gives cryptic errors when trying to compile any OSL script.
Scripts are perfectly valid, even simple oneliner cant compile with recent build.
To reproduce: try to reload script in attached blend and look into console for this error.

2021-05-16_11-51-29.png

There was similar reports regarding OSL in Windows. And they was closed as resolved for some cases. And they indeed was resolved - beta from May 8 did not has this error, OSL compilation was ok.

But unfortunately the problem raised AGAIN in latest beta, downloaded today, 16 May //

System-info: system-info.txt

Simple Blend: oslScriptFail.blend
OSL to compile: oslScriptFail.osl

**System Information** Operating system: Windows 10 **Blender Version** Broken: version: 2.93.0 Beta, branch: master, commit date: 2021-05-15 16:29, hash: 610c0ecc3b91, type: Release Worked: 2.91 Recent 2.93 beta always gives cryptic errors when trying to compile any OSL script. Scripts are perfectly valid, even simple oneliner cant compile with recent build. To reproduce: try to reload script in attached blend and look into console for this error. ![2021-05-16_11-51-29.png](https://archive.blender.org/developer/F10112327/2021-05-16_11-51-29.png) There was similar reports regarding OSL in Windows. And they was closed as resolved for some cases. And they indeed was resolved - beta from May 8 did not has this error, OSL compilation was ok. But unfortunately the problem raised AGAIN in latest beta, downloaded today, 16 May // System-info: [system-info.txt](https://archive.blender.org/developer/F10112329/system-info.txt) Simple Blend: [oslScriptFail.blend](https://archive.blender.org/developer/F10112330/oslScriptFail.blend) OSL to compile: [oslScriptFail.osl](https://archive.blender.org/developer/F10112331/oslScriptFail.osl)
Author

Added subscriber: @IPv6

Added subscriber: @IPv6
Member

Added subscribers: @dr.sybren, @lichtwerk

Added subscribers: @dr.sybren, @lichtwerk
Member

Compiles fine on Linux.

@dr.sybren: can you reproduce this?

Compiles fine on Linux. @dr.sybren: can you reproduce this?

Added subscriber: @antoniov

Added subscriber: @antoniov

Cannot reproduce on Windows.

image.png

Cannot reproduce on Windows. ![image.png](https://archive.blender.org/developer/F10123034/image.png)
Member

Since this could not be reproduced (also asked in #blender-coders), will move to the Unconfirmed tag, with following consequences:

The issue reported can't be reproduced so far, and has been moved to the *BF Blender: Unconfirmed* project.
If 2 other people aren't able to redo the bug after 2 weeks, it will be closed.

We appreciate the effort that goes into making bug reports, but to be able to fix bugs we have to be able to redo them.
If there is anything you can provide to help others to reproduce the problem, be sure to include it.
Since this could not be reproduced (also asked in #blender-coders), will move to the Unconfirmed tag, with following consequences: ``` The issue reported can't be reproduced so far, and has been moved to the *BF Blender: Unconfirmed* project. If 2 other people aren't able to redo the bug after 2 weeks, it will be closed. We appreciate the effort that goes into making bug reports, but to be able to fix bugs we have to be able to redo them. If there is anything you can provide to help others to reproduce the problem, be sure to include it. ```
Member

Added subscriber: @LazyDodo

Added subscriber: @LazyDodo
Member

I can't repro with either 3.0 or 2.93 on windows 10

I can't repro with either 3.0 or 2.93 on windows 10

Added subscriber: @brecht

Added subscriber: @brecht

Maybe the underscore at the start of the folder name is related, that's a bit unusual.

Another possibility is that this happens with specific file systems, or some file system configuration related to case sensitivity.

It seems somewhat unlikely to me that this was fixed in Blender and then broke again, since I don't think there were related changes recently. It might have also been something on your system that changed.

Maybe the underscore at the start of the folder name is related, that's a bit unusual. Another possibility is that this happens with specific file systems, or some file system configuration related to case sensitivity. It seems somewhat unlikely to me that this was fixed in Blender and then broke again, since I don't think there were related changes recently. It might have also been something on your system that changed.

It's sort of a bug in OSL that it treats preprocessor warnings as errors, though the warning shouldn't be there in the first place.

It's sort of a bug in OSL that it treats preprocessor warnings as errors, though the warning shouldn't be there in the first place.
Member

This is what we had recently:
#87481 (OSL: Windows: OSL not working, external scripts always give error)
#86928 (Error: OSL script compilation failed)
#87279 (External OSL scripts are not compiled anymore)

and

{rBL62577}
a631a9eb1f

This is what we had recently: #87481 (OSL: Windows: OSL not working, external scripts always give error) #86928 (Error: OSL script compilation failed) #87279 (External OSL scripts are not compiled anymore) and {rBL62577} a631a9eb1f
Author

It is really strange. Just now i started blender 293, loaded file again and... it compiled!!! i swear, i didn`t "make up" screenshots from above, the problem was here 2 days ago.
But, after some investigation i found another case when it is reproducable (on my PC).

I`m developing addons and use "JacquesLucke / blender_vscode" - https://github.com/JacquesLucke/blender_vscode - to run Blender.
And when i start Blender from inside vscode - the error is still here. When blender is started from command line - the error is gone.

Please note, that the screenshot from above was made from clean console run, not from vscode (you can see this on screenshot as well).
So... it seems "JacquesLucke / blender_vscode" addon leave some traces that affect blender sometimes //

Looks like vscode addon start Blender with some overloads (like 'scriptsFolder': 'c:\_WPLabs\Programs\blender293\2.93\scripts', as i see from vscode terminal) and that lead to error in OSL somehow. it is still working perfectly with 2.91 without such OSL problems. Anyway, will contact JacquesLucke then, VSCode is really convenient for writing addons, hope he may help this problem

I totally understand you cant fix unreproducable bugs, and addons behaviour is out of scope. Thanks for your efforts! and i didni expect that vscode addon may affect separate runs of Blender (as it happened in my case), sorry //

It is really strange. Just now i started blender 293, loaded file again and... it compiled!!! i swear, i didn`t "make up" screenshots from above, the problem was here 2 days ago. But, after some investigation i found another case when it is reproducable (on my PC). I`m developing addons and use "JacquesLucke / blender_vscode" - https://github.com/JacquesLucke/blender_vscode - to run Blender. And when i start Blender from inside vscode - the error is still here. When blender is started from command line - the error is gone. Please note, that the screenshot from above was made from clean console run, not from vscode (you can see this on screenshot as well). So... it seems "JacquesLucke / blender_vscode" addon leave some traces that affect blender *sometimes* // Looks like vscode addon start Blender with some overloads (like 'scriptsFolder': 'c:\\_WPLabs\\Programs\\blender293\\2.93\\scripts', as i see from vscode terminal) and that lead to error in OSL somehow. it is still working perfectly with 2.91 without such OSL problems. Anyway, will contact JacquesLucke then, VSCode is really convenient for writing addons, hope he may help this problem I totally understand you can`t fix unreproducable bugs, and addons behaviour is out of scope. Thanks for your efforts! and i didn`i expect that vscode addon may affect separate runs of Blender (as it happened in my case), sorry //
Author

Sorry to bother, but after some more investigation i found the difference that is not involving vscode/addon stuff and is reproducable (on my PC): the way blender starts.
When i double-clicking "blender.exe" - Everything works
When i opening cmd.exe and type "blender.exe" - OSL error occurs
Screenrecord: oslCompBug.avi

Then i saved "system-info" from both ways. They are identical... but with only one exception:

  • in "cmd" mode all paths has a lower "c://": binary path: 'c:\_WPLabs\Programs\Blender293g\blender.exe'
  • in "double click" all paths has an upper "C://": binary path: 'C:\_WPLabs\Programs\Blender293g\blender.exe'

See for yourself: system-info-cmd.txt system-info-direct.txt
Could it be the reason?

UPD: after changing path to blender to be "C://..." in vscode addon preferences it is started to work too... vscode setup was targeting blender with lower case disk char too, as cmd.

So looks like there is indeed something going on about disk char casing... but at least there is a workaround too

Sorry to bother, but after some more investigation i found the difference that is not involving vscode/addon stuff and is reproducable (on my PC): the way blender starts. When i double-clicking "blender.exe" - Everything works When i opening cmd.exe and type "blender.exe" - OSL error occurs Screenrecord: [oslCompBug.avi](https://archive.blender.org/developer/F10124526/oslCompBug.avi) Then i saved "system-info" from both ways. They are identical... but with only one exception: - in "cmd" mode all paths has a lower "c://": binary path: 'c:\\_WPLabs\\Programs\\Blender293g\\blender.exe' - in "double click" all paths has an upper "C://": binary path: 'C:\\_WPLabs\\Programs\\Blender293g\\blender.exe' See for yourself: [system-info-cmd.txt](https://archive.blender.org/developer/F10124531/system-info-cmd.txt) [system-info-direct.txt](https://archive.blender.org/developer/F10124532/system-info-direct.txt) Could it be the reason? UPD: after changing path to blender to be "C://..." in vscode addon preferences it is started to work too... vscode setup was targeting blender with lower case disk char too, as cmd. So looks like there is indeed something going on about disk char casing... but at least there is a workaround too
Member

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

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

Added subscriber: @JacquesLucke

Added subscriber: @JacquesLucke
Member

Sorry this has been lying around.
If I understand correctly, this is an issue with the VSCode Addon only.

@JacquesLucke: Could you have a look (and possibly change the path in the VSCode Addon?).

But since this is not an issue in blender per se, I will have to close this.
Thx again @IPv6 for your investigations!

Sorry this has been lying around. If I understand correctly, this is an issue with the VSCode Addon **only**. @JacquesLucke: Could you have a look (and possibly change the path in the VSCode Addon?). But since this is not an issue in blender per se, I will have to close this. Thx again @IPv6 for your investigations!
Author

If I understand correctly, this is an issue with the VSCode Addon only.

No, issue will (should) happen when blender is started from any terminal, not addon only. Casing of characters in path to blender.exe make all internal paths to be cased in one way. While OSL expects them to be always in uppercase. Thus difference->warning->compilation error

(Just to clarify, if someone hit this by google)

But anyway, workaround is quite straightforward, so no problem

>If I understand correctly, this is an issue with the VSCode Addon only. No, issue will (should) happen when blender is started from any terminal, not addon only. Casing of characters in path to blender.exe make all internal paths to be cased in one way. While OSL expects them to be always in uppercase. Thus difference->warning->compilation error (Just to clarify, if someone hit this by google) But anyway, workaround is quite straightforward, so no problem
Member

I am not on Windows, but windows was always case-insensitive in regards to paths, right (remember headaches about this back in the days)?
Assume that since OSL is cross-platform, OSL is case-sensitive and if the "wrong" [lowercase] drive letter is used : will fail.

I am not on Windows, but windows was always case-insensitive in regards to paths, right (remember headaches about this back in the days)? Assume that since OSL is cross-platform, OSL **is** case-sensitive and if the "wrong" [lowercase] drive letter is used : will fail.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
5 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#88323
No description provided.