-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Assigning to invalid map proxy value" crash on OSX - endToEnd tutorial #78
Comments
Filed as internal issue #138602. |
Hmm, so I have USD w/Python compiled on my macOS machine, and just ran through the tutorial. I do get the same last error, but I don't see the diagnostic you do. Did you apply the fix the workaround to your tree? https://github.com/zhoub/USD/commit/67200e58a7a1df276bc4caca00c04fabcc63ceb5 python tutorial_scripts/add_shadingVariants.py |
Sorry, just read through issue 19 and realized that's where that fix I was referencing came from. What os release are you running? |
Also, I just tried this (in the same directory) on a Linux box w/our standard USD build on it, and it ran to completion, so there definitely seems to be something fishy going on with the build on the mac. Investigating... |
Okay, here's a minimal piece of Python that demonstrates the problem on my Mac build but works fine on our standard USD build on Linux: from pxr import Usd |
Glad I'm not the only sufferer :) |
For those that want to dig a little deeper in C++, here's that code (giving the same error) transliterated into C++:
|
Confirmed here as well. |
A Debug build works properly. Release doesn't. Still investigating. |
I poked at this a little bit. In SdfMapEditProxy::_Get, we're comparing against a default-constructed std::map iterator as a safety check. It turns out this is undefined behavior; comparisons against a singular iterator are undefined per the C++ standard 24.1/5. A fix ought to be pretty straightforward. |
That’s great news!
|
Oh! Good find. |
On OSX, after building USD with the customisations suggested in Issue 19, I get a crash partway through the endToEnd tutorial.
The create_asset.py script runs cleanly, but the add_shadingVariants.py script bails:
$ python tutorial_scripts/add_shadingVariants.py
(TfDiagnosticType)1: in _DefineCppType at line 868 of pxr//Users/robpieke/dev/github/USD/pxr/base/lib/tf/type.cpp -- TfType 'TfDebugSymbolsChangedNotice' already has a defined C++ type; cannot redefine
(TfDiagnosticType)1: in _DefineCppType at line 868 of pxr//Users/robpieke/dev/github/USD/pxr/base/lib/tf/type.cpp -- TfType 'TfDebugSymbolEnableChangedNotice' already has a defined C++ type; cannot redefine
Traceback (most recent call last):
File "tutorial_scripts/add_shadingVariants.py", line 133, in
main()
File "tutorial_scripts/add_shadingVariants.py", line 46, in main
_AddShadingToBall(stage)
File "tutorial_scripts/add_shadingVariants.py", line 89, in _AddShadingToBall
shadingVariant.SetVariantSelection(variantName)
pxr.Tf.ErrorException:
Error in '>::_Set' at line 822 in file pxr//Users/robpieke/dev/github/USD/build/include/pxr/usd/sdf/mapEditProxy.h : 'Assigning to invalid map proxy value'
Please note the "TfDiagnosticType" warnings at the top are the result of the patch from Issue 19. I get those every time I import the python modules. I include them for completeness, but it's the trace below which is concerning.
The text was updated successfully, but these errors were encountered: