Blender Crash to Desktop Rendering with HDRI (EXR) Maybe others not tested #53079

Closed
opened 2017-10-16 00:52:53 +02:00 by James W E Bird · 37 comments

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

**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
Author

Changed status to: 'Open'

Changed status to: 'Open'
Author

Added subscriber: @JamesBird

Added subscriber: @JamesBird

Added subscriber: @Sergey

Added subscriber: @Sergey

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.

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.
Author

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

The video shows the issue clearly.

Yep Ive downloaded latest build bot, Built my own, and used official 2.79. They all do it. The video shows the issue clearly.
Author

This comment was removed by @JamesBird

*This comment was removed by @JamesBird*

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.

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.
Author

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

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
Author

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

Tested 2.8 build bot, Works fine even in viewport. renders fine.
Sergey Sharybin self-assigned this 2017-10-17 10:50:56 +02:00

Attaching file here: HDRICrash.blend

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

Attaching file here: [HDRICrash.blend](https://archive.blender.org/developer/F1042848/HDRICrash.blend) Will have a look later on. need to get some OpenCL dev environment here.

This issue was referenced by blender/cycles@d1d87183dc

This issue was referenced by blender/cycles@d1d87183dc94980e61df6639c89c0d6d538f4f52

This issue was referenced by 92611dada6

This issue was referenced by 92611dada67fcc151c894462749031be1de27191

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Added subscriber: @brecht

Added subscriber: @brecht

There may be multiple issues here:

  • Recent bug in texture refactoring, solved by by 92611dada6.
  • Bug in AMD OpenCL compiler that causes crashes, solved by 4537e85.

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

There may be multiple issues here: * Recent bug in texture refactoring, solved by by 92611dada6. * Bug in AMD OpenCL compiler that causes crashes, solved by 4537e85. Feel free to reopen the report if this still crashes in latest master.
Author

@brecht , Ok mate im pulling from git now and ill do another build to test.

@brecht , Ok mate im pulling from git now and ill do another build to test.
Author

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.

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.

Changed status from 'Resolved' to: 'Open'

Changed status from 'Resolved' to: 'Open'
Author

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.

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.
Author

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 #52645, #52645: 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

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 #52645, #52645: 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
Author

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.

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.

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Ok, thanks for testing.

Ok, thanks for testing.
Author

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.

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.

Changed status from 'Resolved' to: 'Open'

Changed status from 'Resolved' to: 'Open'

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.

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)

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)
Author

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

CrashLog.txt

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.

Ok ive compiled master with debug, Run blender with --debug full, this is the console log: [CrashLog.txt](https://archive.blender.org/developer/F1063927/CrashLog.txt) 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 34fe3f9 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?

Thanks a lot. I've fixed that assert in 34fe3f9 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?
Author

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

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

Added subscriber: @MaiLavelle

Added subscriber: @MaiLavelle

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

@MaiLavelle, 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.

Ok, I guess it's very likely to be the AMD compiler bug then. @MaiLavelle, 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.
Member

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.

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.
Author

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.

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).

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`).
Author

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.

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.

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
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#53079
No description provided.