Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

[Maya 2023] Crash when accessing light data in Shader node's compute()

[Maya 2023] Crash when accessing light data in Shader node's compute()

morinnicolas8944
Advocate Advocate
997 Views
5 Replies
Message 1 of 6

[Maya 2023] Crash when accessing light data in Shader node's compute()

morinnicolas8944
Advocate
Advocate

* I also sent this as the bug report info when bug reports are sent after Maya crashes.

 

I compiled and loaded the sample plugin "phongShader" provided in the C++ SDK samples for Maya 2023. When I assign this phongShader material to an object and render, Maya crashes. I was able to trace the crash to the call

MDataHandle currentLight = lightData.inputValue();

 at line 332 of phongShader.cpp.

 

I am experiencing the same problem with my own plugin when calling that same function in the same circumstances. The plugin works fine with previous versions of Maya. This problem appears to have been introduced with Maya 2023. I am also pretty sure (but not 100% sure) that the plugin worked correctly with the Beta version of Maya 2023, so it looks like the problem was introduced between the Beta and Release versions of Maya 2023.

 

Maybe there was a change in the API that I am not aware of?

 

The sample can be found here:

https://help.autodesk.com/view/MAYAUL/2023/ENU/?guid=Maya_SDK_cpp_ref_phong_shader_2phong_shader_8cp...

Accepted solutions (1)
998 Views
5 Replies
Replies (5)
Message 2 of 6

daisuke_tri_ace
Participant
Participant

I am also experiencing this issue with Maya 2023.1.


Quick background: I work as a tool programmer for a Japanese game company and we use a number of custom shader nodes/plugins in our daily workflows. We are currently using Maya 2020.4, and would like to upgrade to Maya 2023, however this issue is preventing us from doing so since Maya crashes when opening Hypershade for any scene containing a custom shader node (specifically when accessing lightData.inputValue() in the shader node's compute()). Disabling swatch rendering in preferences seems to prevent some of the crashes but this is not an acceptable solution for us. 


If someone from Autodesk could please investigate this issue, it would be greatly appreciated.

ダイスケ
Message 3 of 6

morinnicolas8944
Advocate
Advocate
For anyone interested in this issue, I also logged a bug report here:
https://feedback.autodesk.com/project/feedback/view.html?cap=037743fd817049f18d3a9e014e771fd6&uf=1ee...
0 Likes
Message 4 of 6

daisuke_tri_ace
Participant
Participant

Thanks for the link to the bug report.
Unfortunately I can't access the contents as it says: "The page you are attempting to access is unavailable."

Does anyone else get this message? 

ダイスケ
0 Likes
Message 5 of 6

morinnicolas8944
Advocate
Advocate

It's a bug report for the preview release of Maya 2024. Maybe it's only visible to users who have access to preview releases.

 

I got the following reply in April and nothing new since then.

"We have logged this on our end and will investigate the source of the regression. Thanks for reporting!"

0 Likes
Message 6 of 6

morinnicolas8944
Advocate
Advocate
Accepted solution

The problem was fixed in the Maya 2024 preview release PR139. Unfortunately, it looks like the fix was not included in Maya 2023.3 which came out 1 month after PR139. So it looks like we will have to wait for Maya 2024 to get this problem fixed in an official release.