Texture image reload sometimes crashes #25999
Labels
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
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#25999
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
%%%Ubuntu 10.04, 32Bit, own Kernel 2.6.35.7, i7-860, 4GB RAM
Blender svn r34744 (but happened also in December, AFAIR also in official 2.55)
gcc 4.4.3, blender compiled with Flags -O3 -g
Nvidia GT218, driver 260.19.12
The attached file contains a simple plane with a image texture. When clicking the image-reload button fast and often, blender crashes after some time. But it can take 20 to 100 clicks. It seems more likely to happen for larger images.
The backtrace shows:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xaf700b70 (LWP 23573)]
imb_onehalf_no_alloc (ibuf2=0xa832d20, ibuf1=0xb15b17d8) at /home/acher/src/blender/source/blender/imbuf/intern/scaling.c:312
312 dest- [x] = (p1- [x] + p2- [x] + p1- [x] + p2- [x]) >> 2;
(gdb) p p1
$2 = (uchar *) 0xb0a53da0 <Address 0xb0a53da0 out of bounds>
(gdb) bt
4 0x085a5812 in imagewraposa_aniso (tex=0xb15e1800, ima=0xb1505f20, ibuf=0xb15b17d8, texvec=0xaf6eb688, DXT=0xaf6eb67c, DYT=0xaf6eb670, texres=0xaf6eb60c)
5 imagewraposa (tex=0xb15e1800, ima=0xb1505f20, ibuf=0xb15b17d8, texvec=0xaf6eb688, DXT=0xaf6eb67c, DYT=0xaf6eb670, texres=0xaf6eb60c)
6 0x085cce93 in multitex (tex=0xb15e1800, texvec=0xb0a562a8, dxt=0xaf6eb67c, dyt=0xaf6eb670, osatex=512, texres=0xaf6eb60c, thread=1, which_output=0)
11 0x085fefb9 in shade_tra_samples (ssamp=, cache=, x=65, y=60, row=0xaf6ebadc, addpassflag=0)
Less likely it crashes also here:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xad6fab70 (LWP 25668)]
IMB_makemipmap (ibuf=0xb1a93bd0, use_filter=0) at /home/acher/src/blender/source/blender/imbuf/intern/filter.c:435
435 if(!hbuf || (hbuf->x == 1 && hbuf->y == 1))
(gdb) p hbuf
$1 = (ImBuf *) 0x0
2 0x085a5812 in imagewraposa_aniso (tex=0xa5ca428, ima=0xa5bd5c0, ibuf=0xb1a93bd0, texvec=0xad6e5688, DXT=0xad6e567c, DYT=0xad6e5670, texres=0xad6e560c)
...
Especially the hbuf-crash (now zero, but not zero before) smells like a race, the machine has 8 cores (4 real, twice with HT). I've attached also the full thread backtrace for the last case. A lot of threads are waiting in image_mipmap_test for a lock, maybe one other section in that area is still unprotected.
BTW: Maybe related are huge memory leaks while scrubbing over image-sequenced textures/background image sequences. Also render errors appear on such sequence textures when playing with the GUI while rendering (some render threads don't "see" the texture). But reproducing them is a hard task...%%%
Changed status to: 'Open'
%%%confirmed, assigning to Ton.%%%
%%%Second report today related to render code making mipmaps while UI is freeing it.
The cause is the preview render btw, if you let it finish before pressing reload all goes fine. The issue is well known, and on the todo list already for months.
For clarity I've added it prominently in wiki too:
http://wiki.blender.org/index.php/Dev:2.5/Source/Development/Todo/Tools#Rendering
Will use your example to verify the new code as well. But it's getting moved to our todo. Thanks!%%%
Changed status from 'Open' to: 'Archived'