Page MenuHome

Blender crashes when using image textures with OSL enabled.
Closed, ResolvedPublic

Description

System Information
OS: Windows 8 64 bit
Graphics: NVIDIA GeForce GT 620
Processor: iNTEL(R) Core(TM) i5-3330 CPU @ 3.00GHz
RAM: 8.00 GB

Blender Version
Broken: 2.70 Official Release

Short description of error
When using Cycles and OSL is enabled, if you try to use any image texture blender will crash. It doesn't matter if you use any osl shaders or what image is used(or even if any image is used). If OSL is enabled and an image texture node is connected to the node tree of any shader, Blender will crash.

Exact steps for others to reproduce the error
Open the attached file(

) then press render. Blender should start building the BVH then after some time crash. If you disconnect the image node then press render everything should be fine.

Details

Type
Bug

Event Timeline

Isaac Weaver (wisaac) raised the priority of this task from to Needs Triage by Developer.
Isaac Weaver (wisaac) updated the task description. (Show Details)
Isaac Weaver (wisaac) set Type to Bug.
Thomas Dinges (dingto) lowered the priority of this task from Needs Triage by Developer to Needs Information from User.Sep 27 2014, 1:13 AM

Blender 2.70 is old, pretty old. Please test Blender 2.72 RC1 from here: http://www.blender.org/download/

Oops typo, meant to say 2.71. However I did just test it with 2.72 RC and it still crashed. Something interesting to note is that with 2.71 it crashed right away when I pressed render. But with 2.72 RC it finished building the BVH, then it crashed.

FreeBSD 9.2 amd64

master built 2 days ago with osl 1.5.10 and oiio 1.4.12 - no crash

2.71 built with osl 1.4.2 and oiio 1.4.12 - crash with no image present, with image present in node is ok
Note: my 2.71 is a source release tarball which differs from 2.71 release binaries - see T41280

0x000000080d4c3ef8 in ?? () from /lib/libc.so.7
(gdb) bt
#0  0x000000080d4c3ef8 in ?? () from /lib/libc.so.7
#1  0x000000080d4c41fd in free () from /lib/libc.so.7
#2  0x000000080e3d3497 in std::locale::_Impl::~_Impl() () from /usr/lib/libstdc++.so.6
#3  0x000000080e3d2d32 in std::locale::~locale() () from /usr/lib/libstdc++.so.6
#4  0x00000008060deadb in void OpenImageIO::v1_4::pvt::TextureSystemImpl::error<char const*>(char const*, char const* const&) const () from /usr/local/lib/libOpenImageIO.so.1.4
#5  0x00000008060ded02 in OpenImageIO::v1_4::pvt::TextureSystemImpl::find_texturefile(OpenImageIO::v1_4::ustring, OpenImageIO::v1_4::pvt::ImageCachePerThreadInfo*) () from /usr/local/lib/libOpenImageIO.so.1.4
#6  0x00000008060dfad5 in OpenImageIO::v1_4::pvt::TextureSystemImpl::get_texture_handle(OpenImageIO::v1_4::ustring, OpenImageIO::v1_4::TextureSystem::Perthread*) () from /usr/local/lib/libOpenImageIO.so.1.4
#7  0x0000000001f19950 in ccl::OSLRenderServices::texture(OpenImageIO::v1_4::ustring, OpenImageIO::v1_4::TextureOpt&, OSL::ShaderGlobals*, float, float, float, float, float, float, float*) ()
#8  0x0000000823b84426 in ?? ()
#9  0x0000000000000004 in ?? ()
#10 0x0000000800000000 in ?? ()
#11 0x0000000000000000 in ?? ()

It seams to be some kind of platform issue. I am dual booting Windows 8 and Ubuntu Linux 14.04. I tried the test file in Ubuntu and everything worked fine.

Bastien Montagne (mont29) raised the priority of this task from Needs Information from User to Normal.Oct 4 2014, 2:04 PM

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.

@Jared Martin (Jozvex) specs (he gets same crash, T42236): Blender2.72, Intel i7 920, GeForce GTX 780, 12gb ram, Windows 8.1 x64

Sounds like another win8 issue… Martijn, can you try to reproduce this? Thanks.

I get a crash too when I try to render the attached .blend file with osl enabled. I'm using Blender 2.72 on Win 8.1 x64.

I can confirm this continues to happen in 2.72b. Add an image texture to a default cube (with or without unwrapping), enable osl, render or switch viewport to rendered view. It does get as far as displaying render stats and "Path Tracing Sample 1/10" but the viewport is still empty (grey checker squares).
.
Windows 8.1 / 64bit / i7-4702MQ.

This does not happen on my windows 7 machine.

I cannot reproduce with 2.71 on Haswell laptop lukas has

Looks like something similar happened a year and a half ago?

https://developer.blender.org/T33829

I'm pretty sure it's the same issue. The LLVM libraries were updated, but probably this fix was not applied:
https://developer.blender.org/diffusion/BL/browse/trunk/lib/win64/llvm/llvm-alloca-fix.patch

@Martijn Berger (juicyfruit), did you see this? Probably we should upgrade together with new OSL (sergeys alignment patch) once that is ready.

A workaround for this issue is being added to OSL itself, so this won't need an LLVM patch:
https://github.com/imageworks/OpenShadingLanguage/pull/442

@Brecht Van Lommel (brecht), hard to tell if the patch was applied or not, it's still in the folder and still in the readme. That's something Martijn knows. Anyway, nice to know it's being addressed in OSL :)

Also, since the alignment fix was committed to blender, it totally worth checking latest builds from builder.blender.org. So, @Isaac Weaver (wisaac), can you test latest builds?

The 64 bit version still crashes, but the 32 bit version works fine.

Then perhaps atomic patch wasn't applied :(

please retest with current buildbot.

I cannot reproduce this any more

Isaac Weaver (wisaac) closed this task as Resolved.Dec 18 2014, 8:16 PM
Isaac Weaver (wisaac) claimed this task.

Everything works fine now! Thank you to everyone who looked into this issue :)