crash trying to bake to active TS n-maps #40077
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
6 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#40077
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?
OSX 10.8.5
MacPro dualXeon 16 threads, ATI HD 5870
hash: d96bad
Trying to bake normal Tangent map (bake to active). Instant crashing!
The file is the one you shared in the cyclesbake dedicated thread on BlenderArtists forum.
I can bake anything except normal tangent maps.
Some days now, building fresh blender almost every night.
Changed status to: 'Open'
Added subscriber: @michaliszissiou
Hi @michaliszissiou mind re-sharing the file here? The one I tried has no crashes, but I believe we are talking about different files.
Sure,
grab it from here
https://dl.dropboxusercontent.com/u/24090090/split_test_base.blend.zip
Just reminding you,
Using the script in the console avoids crashing, however it renders a blank=blue TS map. Other baking options work well, with or without the script.
For the records the file is: split_test_base.blend
Which objects you are trying to bake? The "High" to the "Low" and set "Selected to Active" to True?
(the file has different objects)
1 trying the first on the upper left. (1 material)
the top plane as active, trying the curved surface as TS nmap. Crash
Added subscriber: @jensverwiebe
Here it's working really fine:
Are you building your own Blender or downloading it from builderbot?
@jensverwiebe could you please see if it crashes for you? remember to set "Selected to Active" in the baking panel before testing.
Added subscriber: @brecht
actually @brecht is more familiar with the baking changes, it may be easier for you to test if you have the time. In my case absolutely no crashes with my build running from inside XCode (so a Debug build). I'm going to download a version from build bot to see if it crashes here
It seems I can get a crash with my gcc build, with the build bot blender (if I try really hard to crash), but never with my xcode build
I selected material 1 upper plane and baked and got a crash after a while.
This with release style setup ( clang-omp 3.4, scons ).
Simple log for now:
Exception Type: EXC_CRASH (SIGSEGV)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff908d4a3a __semwait_signal + 10
1 libsystem_c.dylib 0x00007fff86d30dc0 nanosleep + 200
2 libsystem_c.dylib 0x00007fff86d30cb2 usleep + 54
3 org.blenderfoundation.blender 0x000000010016691b wm_window_process_events + 459
4 org.blenderfoundation.blender 0x00000001001472b8 WM_main + 24
5 org.blenderfoundation.blender 0x00000001001431ba main + 1514
6 org.blenderfoundation.blender 0x0000000100001a34 start + 52
Will do a debug build asap ...
Jens
Seems my crash was due misuse, could now always bake a tangent from mat1.
Edit: the new build does never crash anymore it seems. Former crash also was
unrelated to report ( was thread related )
Here the gui setup and bake result: http://www.jensverwiebe.de/Blender/Bildschirmfoto%202014-05-08%20um%2020.58.00.jpg
Jens
Got it again, does not matter which build, bit random:
(lldb) bt
(lldb)
Dalai is on it ....
I have same crashes using buildbot builds (I think still no openMP there) , and my builds (OpenMP+OSL no Cuda)
Added subscriber: @ideasman42
I really don't know what is going on here. Something interesting, technically we should always get a report, even if it's to inform that baking went well. Sometimes, however, the report doesn't show up. It's most likely related.
@ideasman42 could you please: (1) see if you can crash it in Linux; (2) see if valgrind has anything to say on that regard.
Sometimes I got it to crash even if I replaced the entire bake() code with a BKE_report(...) after running a few times. I most have done something wrong with the wm_job code.
As for a way to test you can select the bottom left object (Low.004), uncheck "Selected to Active", set Bake Type to "Diffuse Color" and run:
Added subscriber: @MarcClintDion
Using the splitBase file and the top left example and Selected to Active(High.001, Low.005) and also using bake type-> Combined I can usually crash Blender by repeatedly hitting bake. Usually less than 6 successive bakes are required to crash.
The Python console prints the following:
//Writing: /tmp/split_test_base(1).crash.txt
Segmentation fault: 11And the file it prints contains the following:**# Blender 2.70 (sub 5), Commit date: 2014-05-05 05:47, Hash
38a430c
bpy.ops.object.editmode_toggle() # Operator
bpy.ops.object.editmode_toggle() # Operator
bpy.context.scene.cycles.bake_type = 'COMBINED' # Property
backtrace
0 blender 0x000000010016264a blender_crash_handler_backtrace + 106
1 blender 0x0000000100162992 blender_crash_handler + 674
2 libsystem_platform.dylib 0x00007fff9335b5aa _sigtramp + 26
3 ??? 0x0000000000000000 0x0 + 0
4 blender 0x000000010018e3f8 bake + 4104
5 blender 0x000000010018d3cd bake_startjob + 205
6 blender 0x0000000100171fd2 do_job_thread + 34
7 libsystem_pthread.dylib 0x00007fff8cd02899 _pthread_body + 138
8 libsystem_pthread.dylib 0x00007fff8cd0272a _pthread_struct_init + 0
9 libsystem_pthread.dylib 0x00007fff8cd06fc9 thread_start + 13**
System: iMac Mid 2011-OSX 10.9.1, i5, 16GB, Radeon 6770M-512
I should point out that after 2 months using bake type-> Combined I've never had crashes. But now it is very easy for me to reproduce crashes using Select To Active or even just a straight bake.
That's because we had to introduce a threaded system for the operator to be able to cancel baking. This introduced this crashes. Apparently related to the reports getting corrupted. But then you are also on OSX. Let's wait to see if that happens in other OSs too.
Alright, just a quick update. With today's buildbot, I am getting a python console error that says Bus error: 10 but now there is no backtrace printed to the tmp folder.
hmmm. I posted a missing message, well it must have went somewhere.... anyways, a recap
Win7 crashes as well, same system listed above but running using Bootcamp.
It takes on average about 10x as many bakes to achieve a crash running Win7. So about 50-60 bakes before crash under Win7(only two tests), but only a few tries for a crash using OSX(a dozen or so tests).
for the records, @MarcClintDion's complete message is here: https://developer.blender.org/file/info/PHID-FILE-imgikcoo7qjq5jrsqki2/
And from the look of the address sanitized output, it seems the problem is indeed that the report list is used after it's freed - P59 (thanks Lukas)
I think you should change
WM_JOB_TYPE_OBJECT_BAKE
toWM_JOB_TYPE_OBJECT_BAKE_TEXTURE
inbake_modal
.This issue was referenced by blender/blender-addons-contrib@97823f6047
This issue was referenced by
97823f6047
This issue was referenced by blender/blender-addons-contrib@f194da3455
This issue was referenced by
f194da3455
Changed status from 'Open' to: 'Resolved'
Closed by commit
f194da3455
.@brecht that's a lot. Really. I was overthinking that, going bananas trying to find the memory leak. That was a big oversight on my end. Totally messed up the use of the jobs' flags (first time using jobs == poor job copy/pasting it from elsewhere).
That said, in the BakeAPI commit I create a new job flag WM_JOB_RENDER_BAKE which was later renamed WM_JOB_OBJECT_BAKE -
20c90eae
. So I think it's fine to use WM_JOB_OBJECT_BAKE instead of the WM_JOB_OBJECT_BAKE_TEXTURE.Otherwise let me know and we can get rid of WM_JOB_OBJECT_BAKE.
As for testers (@MarcClintDion and @michaliszissiou) things shouldn't crash now. Please test it as hard as you can, and if the issue remain let us know and we reopen the bug report. (if it's a new and different problem please report as a new ticket).
Hehe, I've been hitting refresh every hour waiting for those commits. I see that SSS and displacement are also on the list of recent updates... very interesting.
hash
c80e986
chashes seem to be stopped. !!
Still not able to bake TS maps on the above blend files-tests.
This time I get blank=blue TS maps, however, one triangle black, the other blue. If this means something.
OSX builds.
Still, can't bake except a blank = black images when trying on other projects. Bake to active mode. (combined). Normal maps can be baked though. (with the exception of the testing blend).
I wonder. Is this testing file valid? Maybe I should try a fresh one? I saved it, maybe something wrong there?
Thanks.
@michaliszissiou you are probably forgetting to select "Selected to Active" or something similar. In order to pin point a problem I need a file where I can just click "bake" and see the potential problem. It's counterproductive to use a file with lots of objects to select, lots of options, ... for those kind of issues without very clear instructions of how to reproduce the issue.
There is another bug reporting, running.
try this
https://dl.dropboxusercontent.com/u/24090090/yyyyyyyyyyyyyyy.blend.zip
Selected to active, combine. I get black image. Whatever value on distance.
BTW, still no crashing here, the right way, it seems so!
Mentioning another bug report now. Sorry, my fault.
As a follow-up, I've seen no crashes since the update and all the chatter has stopped on the Cycles Baking thread so things are looking stable again.