Blender / Cycles / Material list Crash - When dealing with image sequences longer than 63 images long on Windows #50616

Closed
opened 2017-02-08 00:55:59 +01:00 by Carlo Andreacchio · 33 comments

Edited to refine the crash problem

System Information
Windows 7 x64 GTX 1080, core i7 920

Blender Version
Broken: 411836d through to f7eaaf3
Worked: e9689e1

Short description of error
Image sequences part of a material which have more then 63 images in the folder crashes out blender on windows

animatedBillboard.zip
Extract zip file, open materialListCrash3.blend, go into the material tab, and list materials

Video of the crash -- 2017-02-11 12-38-14.zip

Doesnt matter if JPG or PNG images. both will cause a crash
if you delete one image out from the animatedBillboard folder, it will work fine.

Extra tests, all give out crashes.
Removing all system prefs
Factory settings
Server machine, raw win7 install with only blender drivers installed
Multiple artist machines.

Edited to refine the crash problem **System Information** Windows 7 x64 GTX 1080, core i7 920 **Blender Version** Broken: 411836d through to f7eaaf3 Worked: e9689e1 **Short description of error** Image sequences part of a material which have more then 63 images in the folder crashes out blender on windows [animatedBillboard.zip](https://archive.blender.org/developer/F482957/animatedBillboard.zip) Extract zip file, open materialListCrash3.blend, go into the material tab, and list materials Video of the crash -- [2017-02-11 12-38-14.zip](https://archive.blender.org/developer/F482988/2017-02-11_12-38-14.zip) Doesnt matter if JPG or PNG images. both will cause a crash if you delete one image out from the animatedBillboard folder, it will work fine. Extra tests, all give out crashes. Removing all system prefs Factory settings Server machine, raw win7 install with only blender drivers installed Multiple artist machines.

Changed status to: 'Open'

Changed status to: 'Open'

Added subscriber: @candreacchio

Added subscriber: @candreacchio

Deleting the next shader in the blend file (not by name) via python ( bpy.data.materials[60].user_clear() ) fixed the crash... However, importing the offending shader into a new blend file seemed not crash that blender out. The offending material was only two nodes, a diffuse shader and a output node.

Doing some more tests now.

EDIT: Didnt fix the crash :(, i think there are two lots of crashes going on rather than just one. Both to do with the material icon generation.

Deleting the next shader in the blend file (not by name) via python ( bpy.data.materials[60].user_clear() ) fixed the crash... However, importing the offending shader into a new blend file seemed not crash that blender out. The offending material was only two nodes, a diffuse shader and a output node. Doing some more tests now. EDIT: Didnt fix the crash :(, i think there are two lots of crashes going on rather than just one. Both to do with the material icon generation.
Member

Added subscriber: @TheOnlyJoey

Added subscriber: @TheOnlyJoey
Member

These things are difficult to test without a test scene.
Can you reproduce the case on a simpler scene?

Also what is the amount of RAM in your system?

These things are difficult to test without a test scene. Can you reproduce the case on a simpler scene? Also what is the amount of RAM in your system?

This is one of the crashes. Managed to simplify it down to one material. But I cant seem to replicate it totally, as when the link is totally broken it doesnt crash.

Removing the animated image seems to fix the crash. The file path is correct and pointing to a valid image, if i view the image in the image editor first then load up the material list it seems to work fine.

materialListCrash.blend

This is a windows computer with network drives mapped to the Z / Y / X locations.

RAM is fine, 16gb on the host, 8gb on the gpu

This is one of the crashes. Managed to simplify it down to one material. But I cant seem to replicate it totally, as when the link is totally broken it doesnt crash. Removing the animated image seems to fix the crash. The file path is correct and pointing to a valid image, if i view the image in the image editor first then load up the material list it seems to work fine. [materialListCrash.blend](https://archive.blender.org/developer/F479903/materialListCrash.blend) This is a windows computer with network drives mapped to the Z / Y / X locations. RAM is fine, 16gb on the host, 8gb on the gpu

Second crash was also from an animated texture. This one was relatively referenced instead of absolutely. Not sure if that makes a difference

Second crash was also from an animated texture. This one was relatively referenced instead of absolutely. Not sure if that makes a difference

Ok so deleting those two materials out of the scene does fix the material list crashing.

There seems to be a problem with loading up animated image textures.

Could be because we are looping the textures, or loading them up off a slightly latent device (network disks).

Ok so deleting those two materials out of the scene does fix the material list crashing. There seems to be a problem with loading up animated image textures. Could be because we are looping the textures, or loading them up off a slightly latent device (network disks).

Added subscriber: @mont29

Added subscriber: @mont29

No crash here, but then, do not have the images… can you please embed the crashing sequence in the .blend?

No crash here, but then, do not have the images… can you please embed the crashing sequence in the .blend?

The images are not the problem but more how they are loaded up.

It is a PNG image sequence, and probably wont be able to provide either of them. one had an alpha channel one did not

Loading up the image file directly in the UV/Image editor first allowed it to work correctly.

I will try and replicate the issue tomorrow.

The images are not the problem but more how they are loaded up. It is a PNG image sequence, and probably wont be able to provide either of them. one had an alpha channel one did not Loading up the image file directly in the UV/Image editor first allowed it to work correctly. I will try and replicate the issue tomorrow.

I have tried to replicate on linux and unable.. will try windows tomorrow.

I have tried to replicate on linux and unable.. will try windows tomorrow.

Managed to replicate under windows. Has to do with image sequences larger then 63 images long

Doesnt matter if JPG or PNG images. both will cause a crash

Extract zip file, open materialListCrash3.blend, go into the material tab, and list materials

animatedBillboard.zip

if you delete one image out from the animatedBillboard folder, it will work fine.

Managed to replicate under windows. Has to do with image sequences larger then 63 images long Doesnt matter if JPG or PNG images. both will cause a crash Extract zip file, open materialListCrash3.blend, go into the material tab, and list materials [animatedBillboard.zip](https://archive.blender.org/developer/F482957/animatedBillboard.zip) if you delete one image out from the animatedBillboard folder, it will work fine.
Carlo Andreacchio changed title from Blender / Cycles / Material list Crash to Blender / Cycles / Material list Crash - When dealing with image sequences longer than 63 images long on Windows 2017-02-11 01:33:33 +01:00
Member

Added subscriber: @LazyDodo

Added subscriber: @LazyDodo
Member

blender 2017-02-10 18-47-02-074.mp4 With latest buildbot ( 38155c7 ) win64 , did i miss anything?

edit: not sure why but video won't play, here's a youtube link https://youtu.be/qUmuNPJmERA

[blender 2017-02-10 18-47-02-074.mp4](https://archive.blender.org/developer/F482982/blender_2017-02-10_18-47-02-074.mp4) With latest buildbot ( 38155c7 ) win64 , did i miss anything? edit: not sure why but video won't play, here's a youtube link https://youtu.be/qUmuNPJmERA

yeh i just downloaded it manually and watched.

So my system crashes out at around the 5 second mark when it is generating the icon for the material list.

Are you running windows 7? maybe it is a OS issue?

yeh i just downloaded it manually and watched. So my system crashes out at around the 5 second mark when it is generating the icon for the material list. Are you running windows 7? maybe it is a OS issue?
Member

i am running win7

i am running win7

ill download a screen recorder.....

ill download a screen recorder.....

2017-02-11 12-38-14.zip

If i delete one file out of that folder it doesnt crash

[2017-02-11 12-38-14.zip](https://archive.blender.org/developer/F482988/2017-02-11_12-38-14.zip) If i delete one file out of that folder it doesnt crash

system info txt file here -- system-info.txt

Tried clearing my user prefs and that didnt fix it either.

system info txt file here -- [system-info.txt](https://archive.blender.org/developer/F482991/system-info.txt) Tried clearing my user prefs and that didnt fix it either.
Member

try running "blender.exe --factory-startup"

try running "blender.exe --factory-startup"

In #50616#416846, @LazyDodo wrote:
try running "blender.exe --factory-startup"

Crash

> In #50616#416846, @LazyDodo wrote: > try running "blender.exe --factory-startup" Crash

Could be because of this commit? b047d79 -- https://lists.blender.org/pipermail/bf-blender-cvs/2016-November/091529.html, fits into the right timeline.

We dont build our own blenders, otherwise I would help out finding the exact commit.

Could be because of this commit? b047d79 -- https://lists.blender.org/pipermail/bf-blender-cvs/2016-November/091529.html, fits into the right timeline. We dont build our own blenders, otherwise I would help out finding the exact commit.
Member

Could be anything really, but unless we can reproduce the issue it'll be very hard to point a finger at something.

Could be anything really, but unless we can reproduce the issue it'll be very hard to point a finger at something.

I just tried it on one of our server machines running the stock windows 7 (no upgrades, nothing else installed apart from blender / drivers / windows 7 (no sp1)), crash on that aswell.

core i7 860 gtx 1080.

I just tried it on one of our server machines running the stock windows 7 (no upgrades, nothing else installed apart from blender / drivers / windows 7 (no sp1)), crash on that aswell. core i7 860 gtx 1080.
Member

Yup was able to repro it on a clean win7 VM, but not with a debug build, so feels like a race condition somewhere

Yup was able to repro it on a clean win7 VM, but not with a debug build, so feels like a race condition somewhere

Can you try to start Blender with -t 1 option (from command line), and see if crash still happens? This should disable multi-threading, and tell us whether it’s a causing the problem or not.

Can you try to start Blender with `-t 1` option (from command line), and see if crash still happens? This should disable multi-threading, and tell us whether it’s a causing the problem or not.
Member
  • t 1 doesen't help , but i was able to grab a stack trace
 	blender.exe!memcpy() Line 128	Unknown
 	0000000000000004()	Unknown
 	00000000000e1000()	Unknown
>	blender.exe!ccl::BlenderSession::builtin_image_pixels(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & builtin_name, void * builtin_data, unsigned char * pixels, const unsigned __int64 pixels_size) Line 1170	C++

 	blender.exe!ccl::ImageManager::file_load_image<2,unsigned char,unsigned char>(ccl::ImageManager::Image * img, ccl::ImageManager::ImageDataType type, int texture_limit, ccl::device_vector<unsigned char> & tex_img) Line 552	C++
 	blender.exe!ccl::ImageManager::device_load_image(ccl::Device * device, ccl::DeviceScene * dscene, ccl::Scene * scene, ccl::ImageManager::ImageDataType type, int slot, ccl::Progress * progress) Line 761	C++
 	[External Code]	
 	blender.exe!ccl::TaskPool::wait_work(ccl::TaskPool::Summary * stats) Line 98	C++
 	blender.exe!ccl::ImageManager::device_update(ccl::Device * device, ccl::DeviceScene * dscene, ccl::Scene * scene, ccl::Progress & progress) Line 946	C++
 	blender.exe!ccl::Scene::device_update(ccl::Device * device_, ccl::Progress & progress) Line 192	C++
 	blender.exe!ccl::Session::update_scene() Line 818	C++
 	blender.exe!ccl::Session::run_cpu() Line 546	C++
 	blender.exe!ccl::Session::run() Line 690	C++
 	blender.exe!ccl::thread::run(void * arg) Line 57	C++
 	pthreadVC2.dll!000007fee771627b()	Unknown
 	pthreadVC2.dll!000007fee7718eb7()	Unknown
 	pthreadVC2.dll!000007fee7719102()	Unknown
 	[External Code]	
- t 1 doesen't help , but i was able to grab a stack trace ``` blender.exe!memcpy() Line 128 Unknown 0000000000000004() Unknown 00000000000e1000() Unknown > blender.exe!ccl::BlenderSession::builtin_image_pixels(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & builtin_name, void * builtin_data, unsigned char * pixels, const unsigned __int64 pixels_size) Line 1170 C++ blender.exe!ccl::ImageManager::file_load_image<2,unsigned char,unsigned char>(ccl::ImageManager::Image * img, ccl::ImageManager::ImageDataType type, int texture_limit, ccl::device_vector<unsigned char> & tex_img) Line 552 C++ blender.exe!ccl::ImageManager::device_load_image(ccl::Device * device, ccl::DeviceScene * dscene, ccl::Scene * scene, ccl::ImageManager::ImageDataType type, int slot, ccl::Progress * progress) Line 761 C++ [External Code] blender.exe!ccl::TaskPool::wait_work(ccl::TaskPool::Summary * stats) Line 98 C++ blender.exe!ccl::ImageManager::device_update(ccl::Device * device, ccl::DeviceScene * dscene, ccl::Scene * scene, ccl::Progress & progress) Line 946 C++ blender.exe!ccl::Scene::device_update(ccl::Device * device_, ccl::Progress & progress) Line 192 C++ blender.exe!ccl::Session::update_scene() Line 818 C++ blender.exe!ccl::Session::run_cpu() Line 546 C++ blender.exe!ccl::Session::run() Line 690 C++ blender.exe!ccl::thread::run(void * arg) Line 57 C++ pthreadVC2.dll!000007fee771627b() Unknown pthreadVC2.dll!000007fee7718eb7() Unknown pthreadVC2.dll!000007fee7719102() Unknown [External Code] ```
Member

Added subscriber: @Sergey

Added subscriber: @Sergey
Member

it does seem to come from the b047d79 change, @Sergey mind taking a peek?

it does seem to come from the b047d79 change, @Sergey mind taking a peek?
Member

https://git.blender.org/gitweb/gitweb.cgi/blender.git/blob/HEAD:/intern/cycles/render/image.cpp#l505

allocates a buffer 1280(w)*720(h)*1(d) but

https://git.blender.org/gitweb/gitweb.cgi/blender.git/blob/HEAD:/intern/cycles/render/image.cpp#l549

copies num_pixels(whd) * components (4) bytes of data neatly overflowing the buffer with 4 times as much data as it can take.

https://git.blender.org/gitweb/gitweb.cgi/blender.git/blob/HEAD:/intern/cycles/render/image.cpp#l505 allocates a buffer 1280(w)*720(h)*1(d) but https://git.blender.org/gitweb/gitweb.cgi/blender.git/blob/HEAD:/intern/cycles/render/image.cpp#l549 copies num_pixels(w*h*d) * components (4) bytes of data neatly overflowing the buffer with 4 times as much data as it can take.

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sergey Sharybin self-assigned this 2017-02-12 10:43:21 +01:00

Crash should be fixed now. Thanks for the report.

Crash should be fixed now. Thanks for the report.
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#50616
No description provided.