Crash in ChannelShader plugin
-
Hi,
I have a channel shader, which reproducibly crashes when run in the debugger in S22 and R23. However, the crash does not occur in my code, though it looks like my shader has something to do with it. Interestingly, the very same code runs smoothly in R20 and R21, and does not cause any strange behaviour there. It happens only when the material that has the shader is applied to an object in the scene.
The call stack shows this:
And the output window in the debugger says:
-[MTLDebugBlitCommandEncoder validateCopyFromBuffer:sourceOffset:sourceBytesPerRow:sourceBytesPerImage:sourceSize:toTexture:destinationSlice:destinationLevel:destinationOrigin:options:]:718: failed assertion 'destinationLevel(1) must be < [destinationTexture mipmapLevelCount](1).'
In Release mode, it doesn't crash, but tends to make the whole machine unresponsive and sometimes even tints the whole Cinema UI green. Wtf. Never had this before.
Thanks for help,
greetings,
Frank -
This post is deleted! -
And one more piece of the puzzle: The crash only occurs if I set Preferences -> Viewport Hardware -> Texture Mode to "Mipmap". Then, it occurs even if my shader isn't even in the scene (I tried with the Brick shader). And yes, in 22.123 and also in 22.016.
Therefore, however unsettling this is, I think I can just leave my Texture Mode on "Nearest", and leave the matter up to Maxon
Since no crash report is generated, I don't have more data to provide.My hardware is:
iMac (Retina 5K, 27-inch, 2019)
3,6 GHz 8-Core Intel Core i9
16 GB 2667 MHz DDR4
Radeon Pro 580X 8 GBOS:
macOS 10.15.6 (19G2021) -
hi,
it's not really clear.
can you reproduce the crash using only c4d shader ?
can you provide a bit of your code if not all you code (even using our [email protected] mailbox ?Cheers
Manuel -
Hi Manuel,
@m_magalhaes said in Crash in ChannelShader plugin:
can you reproduce the crash using only c4d shader ?
Yes, I can reproduce it with e.g. just a brick shader.
can you provide a bit of your code if not all you code (even using our [email protected] mailbox ?
I could, but since it's reproducible without any of my code participating, I don't think that will be necessary
Here is a screen recording:
https://frankwilleke.de/misc/screen-recording_viewport-mipmap-crash_macos.movI am starting Cinema in the debugger, then I create a plane and a material with a brick shader. Drag the material onto the plane... everything is still fine. Then open the Preferences and set the Texture Mode to "Mipmap".
Note that, while my plugin project is loaded in Xcode, I am not using any of the plugin in this example. It's just to have a debugger.
Cheers,
Frank -
hi,
ok, reported in our bug database. But i don't have any issu on release mode.
Cheers,
Manuel -
In release mode, it doesn’t crash, but after a while playing with the material, it makes my machine (not just Cinema) unresponsive and sometimes paints the Cinema UI bright green. When that happens, I get minutes of staring at the macOS beach ball, and I have to kill the Cinema process. Memory and CPU pressure is not very high though. Maybe thrashed memory?
-
hi,
it only happen on osx, it's about Metal Framework. That's all what i can say. I've asked the dev to have a look at it.
Cheers,
Manuel -
I’m confident they will find out
Thanks for everything!