Page MenuHome

Fluid and rigid bodies
Closed, ResolvedPublic

Description

System Information
Operating system: macOS 11.2
Graphics card: Intel Iris Plus Graphics 640

Blender Version
Broken: 2.91.2
Worked: 2.81

Hello, once more! The combination of fluid and rigid bodies "helps" Blender crash. Blender file. Thanks in advance.

Exact steps for others to reproduce the error
Based on the default startup or an attached .blend file (as simple as possible).

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 com.apple.vImage 0x00007fff266cc902 vLookupTable_Planar16 + 578
1 com.apple.vImage 0x00007fff269e0645 DoTRCs + 197
2 com.apple.vImage 0x00007fff266b99a2 AnyToAnyBlockInternal + 1586
3 com.apple.vImage 0x00007fff266b9349 AnyToAnyBlock + 137
4 com.apple.vImage 0x00007fff266b8bca vImageConvert_AnyToAny + 3258
5 com.apple.CoreGraphics 0x00007fff250b9675 vImageConverter_convert_internal + 17
6 com.apple.CoreGraphics 0x00007fff250b955b vImageConverterConvert + 312
7 com.apple.CoreGraphics 0x00007fff250b845e convert_using_vImageConverter + 246
8 com.apple.CoreGraphics 0x00007fff250b7d14 convert_icc + 200
9 com.apple.CoreGraphics 0x00007fff250e77df CGColorTransformConvertUsingCMSConverter + 125
10 com.apple.CoreGraphics 0x00007fff250e7111 provider_for_destination_get_bytes_at_position_inner + 2335
11 com.apple.CoreGraphics 0x00007fff250aedb2 CGDataProviderDirectGetBytesAtPositionInternal + 256
12 com.apple.CoreGraphics 0x00007fff250e6742 get_chunks_direct + 226
13 com.apple.CoreGraphics 0x00007fff250e5ca4 img_raw_read + 1430
14 com.apple.CoreGraphics 0x00007fff250e3c77 img_data_lock + 6183
15 com.apple.CoreGraphics 0x00007fff250de99d CGSImageDataLock + 1418
16 com.apple.CoreGraphics 0x00007fff250de3e3 RIPImageDataInitializeShared + 177
17 com.apple.CoreGraphics 0x00007fff250de099 RIPImageCacheGetRetained + 750
18 com.apple.CoreGraphics 0x00007fff250ddb60 ripc_AcquireRIPImageData + 384
19 com.apple.CoreGraphics 0x00007fff250dc888 ripc_DrawImage + 1180
20 com.apple.CoreGraphics 0x00007fff250dba8f CGContextDrawImageWithOptions + 454
21 com.apple.AppKit 0x00007fff22f4860d 74-[NSImageRep drawInRect:fromRect:operation:fraction:respectFlipped:hints:]_block_invoke + 896
22 com.apple.AppKit 0x00007fff22f48146 -[NSImageRep drawInRect:fromRect:operation:fraction:respectFlipped:hints:] + 936
23 com.apple.AppKit 0x00007fff233e70b3 71-[NSImage drawInRect:fromRect:operation:fraction:respectFlipped:hints:]_block_invoke.1340 + 963
24 com.apple.AppKit 0x00007fff22f2187e -[NSImage _usingBestRepresentationForRect:context:hints:body:] + 129
25 com.apple.AppKit 0x00007fff22f47b0d -[NSImage drawInRect:fromRect:operation:fraction:respectFlipped:hints:] + 1330
26 com.apple.AppKit 0x00007fff233e73f7 -[NSImage _drawInRect:withState:backgroundStyle:tintColor:operation:fraction:flip:hints:] + 416
27 com.apple.AppKit 0x00007fff23460e59 -[NSAppearanceContentStyle drawStylizedImage:inRect:operation:fraction:flip:hints:] + 149
28 com.apple.AppKit 0x00007fff233fe57e -[_NSSimpleImageView drawRect:] + 156
29 com.apple.AppKit 0x00007fff22f4aa13 _NSViewDrawRect + 139
30 com.apple.AppKit 0x00007fff23676366 -[NSView _recursive:displayRectIgnoringOpacity:inContext:stopAtLayerBackedViews:] + 2115
31 com.apple.AppKit 0x00007fff236766f7 -[NSView _recursive:displayRectIgnoringOpacity:inContext:stopAtLayerBackedViews:] + 3028
32 com.apple.AppKit 0x00007fff236766f7 -[NSView _recursive:displayRectIgnoringOpacity:inContext:stopAtLayerBackedViews:] + 3028
33 com.apple.AppKit 0x00007fff230ce52f -[NSView displayRectIgnoringOpacity:inContext:] + 836
34 com.apple.AppKit 0x00007fff23192c66 -[NSDockTile display] + 517
35 org.blenderfoundation.blender 0x0000000109bc69b3 GHOST_WindowCocoa::setProgressBar(float) + 835
36 org.blenderfoundation.blender 0x00000001091580b8 wm_jobs_timer + 648
37 org.blenderfoundation.blender 0x0000000109170c8d wm_window_timer + 221
38 org.blenderfoundation.blender 0x0000000109170b92 wm_window_process_events + 50
39 org.blenderfoundation.blender 0x000000010913fb48 WM_main + 24
40 org.blenderfoundation.blender 0x0000000108d3c63a main + 890
41 libdyld.dylib 0x00007fff204df621 start + 1

[...]

Thread 21:
0   ???                           	000000000000000000 0 + 0
1   org.blenderfoundation.blender 	0x0000000108ed69ca BKE_ptcache_write + 58
2   org.blenderfoundation.blender 	0x0000000108ed92c6 BKE_ptcache_bake + 2038
3   org.blenderfoundation.blender 	0x00000001098fed43 ptcache_job_startjob + 67
4   org.blenderfoundation.blender 	0x0000000109157aa7 do_job_thread + 39
5   libsystem_pthread.dylib       	0x00007fff204c4950 _pthread_start + 224
6   libsystem_pthread.dylib       	0x00007fff204c047b thread_start + 15

Event Timeline

Robert Guetzkow (rjg) updated the task description. (Show Details)

@Ivan Kostenko (KIOC) could you please describe the exact steps that you're doing that result in the crash?

I'm getting an error reported by ASAN in current master when baking the simulation because the call to openvdb::tools::copyFromDense(dense, *to, ValueT(tmpClip)); supposedly results in a value outside of the integer range when float tmpClip = (from->saveSparse()) ? clip : -std::numeric_limits<Real>::max(); is set to -std::numeric_limits<Real>::max(). This is presumably because of the leaf->isConstant in copyFromDense @Sebastián Barschkis (sebbas).

Yep. I'm thinking that this error only happens in 2.91.2. In the project. Ice cubes must interact with fluid, but when I started bake it, Blender crashed (approximately 23 times).

And, also. I have made various projects with this idea (rigid bodies and fluid (manta flow)), and it always crashed. Moreover, in blender 2.90 this problem couldn't have a chance for life.

@Robert Guetzkow (rjg) Yes, you're right! I have the same "outside of range" error. That code block is a bit sketchy tbh. Working on a fix for this.

If the crash occurs in 2.91.2 and before, it must be something else though. I added "sparse grid caching" support only in 2.92 (rBe09d0c0d077c).

@Sebastián Barschkis (sebbas) Should I create a separate ticket for this?

@Robert Guetzkow (rjg) Yes, might be a good idea. The fix would close that one, this ticket could stay open then.

@Robert Guetzkow (rjg) I just pushed the changes for the OpenVDB issue we discussed in a general Mantaflow update (rBa5637756491c). So no need for a new ticket.

For the issue that @Ivan Kostenko (KIOC) described here I'll now do some tests with a 2.91.2 debug build.

So far everything looks good with the scene in 2.91.2. @Ivan Kostenko (KIOC) can you try to reproduce the crash with a daily build (https://builder.blender.org/download/)?

Once more thank you.

Ok! Closing for now, feel free to reopen if you see another crash. Thanks!