Page MenuHome

Blender Crash to Desktop Rendering with HDRI (EXR) Maybe others not tested
Closed, ResolvedPublic

Description

System Information
Win 10 64x latest, AMD FirePro W9100 16GB Latest Drivers

Blender Version
2.79, and all master releases tested
Worked: 2.78c

Opencl GPU rendering, Try to render even a cube with plane with HDRI in environment (EXR in this case) starts to compile opencl kernel then crash's to desktop after 5-10 seconds

Works on CPU and works with opencl gpu in 2.78c

Exact steps for others to reproduce the error
Steps to Repro stated above

Event Timeline

Sergey Sharybin (sergey) lowered the priority of this task from Needs Triage by Developer to Needs Information from User.Oct 16 2017, 11:11 AM

Does the issue happen with latest builds from builder.blender.org ? If so, please attach file which demonstrates the issue. Also test if this happens on both CPU and GPU.

Yep Ive downloaded latest build bot, Built my own, and used official 2.79. They all do it.

The video shows the issue clearly.

This comment was removed by James W E Bird (3dLuver).

Having the video is NOT enough. We need to be able to reproduce the issue, and here we use setups like that a lot and they work. There might be something specific to particular image you're using. Might be resolution, or maybe some encoding problem which is only encountered in Cycles since it's using OIIO and not Blender's ImBuf, could be something with EXIF.. So many possibilitites.

So please attach .blend files and all related files needed to reproduce the issue.

OK, I couldn't send the EXR in the vid as part of payed plugin. Ive downloaded two free HDRI's in EXR and HDRI format and both crash Blender in the same way. In fact every HDR image ive tried now for testing crash's blender with Opencl GPU rendering.

Weird thing all these HDR images render fine on this card with these drivers fine in 2.78c

Ive packed the images into a blend file which im uploading to Mega now so you can download the .blend

Hope it helps.

https://mega.nz/#!cwJXmJqB!p6MpRAWnnrf7ydEJNZpQ6MlVejrIcdhR_lfoZ1uAXQM

Tested 2.8 build bot, Works fine even in viewport. renders fine.

Sergey Sharybin (sergey) raised the priority of this task from Needs Information from User to Normal.

Attaching file here:

Will have a look later on. need to get some OpenCL dev environment here.

There may be multiple issues here:

Feel free to reopen the report if this still crashes in latest master.

@Brecht Van Lommel (brecht) , Ok mate im pulling from git now and ill do another build to test.

Nope, Still crash to desktop. Latest pull from git but does the same.

Forget the debug, tried it another 5 times and crash's all times. Late and must of had the first try on CPU

Like i say works on this card, these drivers in all 2.78c and backwards, works in 2.8 build bot. So i doubt it driver related or compiler related.

Just thought i would let you know that even adding a background shader to environment lighting with emission shader also instant crash's to desktop. So probably not even a HDR issue directly.

OK, Ive been doing some bug tracking.

after commit Code refactor: split displace/background into separate... compiles shaders but renders pure black output

with snapshot build c454d81 doesnt even compile and instant crash

with snapshot build d8509b3 instant crash to desktop

snapshot build 754f5d3 just before Brecht's Fix T52645, T52645: AMD OpenCL compiler crash with... is the last build that ive compiled that works correctly. So.....Guess Brecht your fix for AMD compiler broke my AMD compiler? Weird but as Ive tested the snapshot just before you made those changes it was working.

so snapshot build 754f5d3 is the last working build from my testing.

Hopefully this will help track down the issue. Trying to find the last build that worked by compiling snapshot after snapshot was a right mission lol

Tested buildbot today, HDRI in environment now works. The fact i was trying to use Micro displace on a terrain was then probably the issue when opencl was compiled but black screen rendered. The black tiles rendering seems to be another bug ive encountered with Micro displace in experimental mode on both cpu & gpu. Think you can close this now.

Ok, thanks for testing.

OK, Lol. Ive just compiled master using Vs 2015 and everything compiled fine. Now ive tried the same box on plane with either a background shader with sky texture on in environment light or hdr it does the same thing again, Instant crash to desktop. Works on CPU

Aggghh, Have no Bloody idea whats going on here.

I guess the next step would be to compile a debug build, run Blender through the Visual Studio debugger, and see where it crashes.

If it's in the AMD driver then I guess we have to wait for AMD to fix that bug, since I don't have this card to test.

You could also install an older AMD driver as a workaround or to see if it's related to that. (17.1.1 worked in the other reports)

Ok ive compiled master with debug, Run blender with --debug full, this is the console log:

All i did load blender, change to cycles, open environment panel, added background shader, added sky texture, then opened the little preview render window that normaly shows the sky outcome. It's the preview that kicks the error off, or a render of course.

But the log shows memory issues.

Ive never tried debugging blender in VS before, probably that ive not learnt how to set the project up correctly but alli can get from VS is exception thrown by blender.exe thread 10936 pthreadVC2.dll and takes me to report_runtime_error.cpp in windows 10 kit and break point at line 125 _CrtDbgBreak();

And brilliantly the right hand panel diagnostics tools i get the message: the diagnostics tools have unexpectedly failed (which is helpful). One thing that could be usefull for future is if you or one of the devs can record a quick vid on how to correctly setup blender within VS and an example bug track down of issue generated by user interactively in blender while running the debugger in VS. That would help me a lot and i can start to learn to track these things down myself.

When ive debugged like apps ive done before it's simple just wait for the break point and then just step through the code until i hit the issue, with blender (as im sure im doing this wrong) it's FAR bigger code base then ive ever debugged.

Thanks a lot. I've fixed that assert in rB34fe3f9c069f: Code refactor: remove MEM_WRITE_ONLY, always use MEM_READ_WRITE. now, it's not the real issue. Running again will hopefully hit the real crash now. I think you were using the right steps if you found this.

And to be clear, you are also getting a crash with the latest builds from https://builder.blender.org/download/, not just your own builds?

Yep i just downloaded the win64 vs 2015 ver and the preview window now works, cpu render works, but gpu opencl render still immediate crash to desktop as soon as hit render button, so basically as soon as opencl starts to compile shaders..

I also just updated my build from master, Now the preview environment map window doesnt crash to desktop, cpu renders, gpu crash to desktop just like your buildbot vs 2015 version.

Not tried your official vs 2013 build yet just downloading to test that too.

Would be good if vs 2015 could become official soon (would make things far easier to have as minimum supported then dev and bug tracking doesnt have to span 3 vs releases), ive got 2015 & 2017 installed and 2013 is well dated now, would use 2017 for testing in my builds but cuda sdk doesnt work with 2017 (new cuda 9 might but as i dont even have a nvidia card im in no rush to move over yet, only support cuda for builds for the community I do)

Edit: Vs2013 buildbot the same as above builds, works on cpu now but instant crash with gpu rendering

Ok, I guess it's very likely to be the AMD compiler bug then.

@Mai Lavelle (maiself), did we hear anything back from AMD about this compiler crashing bug? I would hope that if they can reproduce it, it shouldn't be that hard for them to identify where it broke and fix it, but maybe not.

I haven't heard anything back from them in a while, I'll try contacting them again and see what the status is. Hopefully it won't take long to get fixed.

Ive debuged again after changes, Now opencl_util.c at line 398 is giving an access violation following the steps within editor while in debug mode stated above to repro the cause.

Ok, so that's a call to clCreateProgramWithBinary. This loads a cached .clbin kernel, but I think also does some optimization for the specific graphics card architecture. So still points to the AMD compiler bug I think.

It may help to clear the clbin files from the cache folder, but I doubt it. (I think it's in C:\Users\USERNAME\AppData\Roaming\Blender Foundation\Blender\2.79\cache).

Hey Brecht, Yeah compiler issue in my eye's now after so much testing, The cache thing is not the issue, I manually clean that after every build to force a opencl re-compile and clean old files.

Just weird to me though that i can run older build's from 2.78 with these drivers and works? It was only after your changes to AMD compiler in log that things broke for me. I did read changes were needed because support for Vega etc to work, but annoyingly things worked just fine for me before those changes.