-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Rework Resource Handling in Node Exports #6856
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
base: master
Are you sure you want to change the base?
Rework Resource Handling in Node Exports #6856
Conversation
The test suite is repeatedly failing on this PR. Can you check it? |
I think the failures are unrelated. The linux failure is caused by |
0ed85a9
to
10d114d
Compare
Setting up a local actions server was a bust, but I've managed to reproduce the crash on normal Windows. It occurs after closing the window (or, presumably, unloading the test) after EDIT: #0 0x00007ff77ce2dc52 in WbAbstractPose::detachTranslateRotateManipulator (this=<optimized out>) at nodes/WbAbstractPose.cpp:313
#1 0x00007ff77cd2d9c7 in WbSelection::selectNode (this=0x4550370, n=0x0, handlesDisabled=false) at app/WbSelection.cpp:74
#2 WbSelection::clear (this=0x4550370) at app/WbSelection.cpp:146
#3 WbSelection::clear (this=0x4550370) at app/WbSelection.cpp:144
#4 0x00007ff9253ea6ae in ?? () from C:\msys64\mingw64\bin\Qt6Core.dll
#5 0x00007ff77ceeeb95 in QMetaObject::activate<void, WbBaseNode*> (sender=0x10ea8ab0, mo=0x7ff77d030280 <WbBaseNode::staticMetaObject>, local_signal_index=0, ret=0x0)
at ../../include/qt/QtCore/QtCore/qobjectdefs.h:306
#6 WbBaseNode::isBeingDestroyed (this=0x10ea8ab0, this@entry=0x111e1bb0, _t1=0x11229b90, _t1@entry=0x111e1bb0) at build/release/WbBaseNode.moc.cpp:163
#7 0x00007ff77cb293ae in WbBaseNode::~WbBaseNode (this=0x111e1bb0) at nodes/WbBaseNode.cpp:75
#8 0x00007ff77cbcecfb in WbGroup::~WbGroup (this=<optimized out>) at nodes/WbGroup.cpp:57
#9 0x00007ff77ccac3a7 in WbPose::~WbPose (this=0x111e1bb0) at nodes/WbPose.cpp:57
#10 WbPose::~WbPose (this=0x111e1bb0) at nodes/WbPose.cpp:57
#11 0x00007ff77cc43d73 in WbMFNode::~WbMFNode (this=0x10e661e0) at vrml/WbMFNode.cpp:37
#12 0x00007ff77cc43dce in WbMFNode::~WbMFNode (this=0x10e661e0) at vrml/WbMFNode.cpp:38
#13 0x00007ff77cbb6873 in WbField::~WbField (this=0x10e66700) at vrml/WbField.cpp:78
#14 0x00007ff77cbb692e in WbField::~WbField (this=0x10e66700) at vrml/WbField.cpp:80
#15 0x00007ff77cc71533 in WbNode::~WbNode (this=0x10ead310) at vrml/WbNode.cpp:257
#16 0x00007ff77cb293ce in WbBaseNode::~WbBaseNode (this=<optimized out>) at nodes/WbBaseNode.cpp:78
#17 0x00007ff77cbceda4 in WbGroup::~WbGroup (this=0x10ead310) at nodes/WbGroup.cpp:57
#18 WbGroup::~WbGroup (this=0x10ead310) at nodes/WbGroup.cpp:57
#19 0x00007ff77cc43eb9 in WbMFNode::clear (this=<optimized out>) at vrml/WbMFNode.cpp:67
#20 0x00007ff77cd42f09 in WbSimulationWorld::~WbSimulationWorld (this=0x10e2f2f0) at nodes/utils/WbWorld.hpp:88
#21 0x00007ff77cb6fa3e in WbControlledWorld::~WbControlledWorld (this=0x10e2f2f0) at control/WbControlledWorld.cpp:64
#22 0x00007ff77caf5626 in WbApplication::~WbApplication (this=0x262dae0) at app/WbApplication.cpp:114
#23 WbApplication::~WbApplication (this=0x262dae0) at app/WbApplication.cpp:122
#24 0x00007ff77cc2d7bd in WbMainWindow::closeEvent (this=0x2682a10, event=0x5fc530) at gui/WbMainWindow.cpp:1062
#25 0x00007ff92370a258 in ?? () from C:\msys64\mingw64\bin\Qt6Widgets.dll
#26 0x00007ff9236b630c in ?? () from C:\msys64\mingw64\bin\Qt6Widgets.dll
#27 0x00007ff9250e9ae0 in ?? () from C:\msys64\mingw64\bin\Qt6Core.dll
#28 0x00007ff92370539e in ?? () from C:\msys64\mingw64\bin\Qt6Widgets.dll
#29 0x00007ff92371671e in ?? () from C:\msys64\mingw64\bin\Qt6Widgets.dll
#30 0x00007ff9245af460 in ?? () from C:\msys64\mingw64\bin\Qt6Gui.dll
#31 0x00007ff9236b630c in ?? () from C:\msys64\mingw64\bin\Qt6Widgets.dll
#32 0x00007ff9250e9ae0 in ?? () from C:\msys64\mingw64\bin\Qt6Core.dll
#33 0x00007ff924557224 in ?? () from C:\msys64\mingw64\bin\Qt6Gui.dll
#34 0x00007ff9245b2103 in ?? () from C:\msys64\mingw64\bin\Qt6Gui.dll
#35 0x00007ff9252aeb46 in ?? () from C:\msys64\mingw64\bin\Qt6Core.dll
#36 0x00007ff924913a49 in ?? () from C:\msys64\mingw64\bin\Qt6Gui.dll
#37 0x00007ff9250f5d85 in ?? () from C:\msys64\mingw64\bin\Qt6Core.dll
#38 0x00007ff9250f3d1a in ?? () from C:\msys64\mingw64\bin\Qt6Core.dll
#39 0x00007ff77cff15c7 in main (argc=<optimized out>, argv=0x25bec70) at gui/main.cpp:218 I'll see if I can come up with a fix... Edit 2: I figured it out! Fix is on DeepBlueRobotics/webots:fix-destroy-order. |
10d114d
to
18bf785
Compare
Description
This PR unifies the various methods for re-relativizing resource urls when a node is exported to another format. This should fix a few bugs and make the code more uniform/easier to maintain in the future. Specifically:
WbNode
and the field export system has been updated to make it easier for nodes to specify custom field export code. This should make everything a bit more readable, and it fixes some cases where fields would be exported twice.exportNodeFields
, so they all look relatively similar. Notably, this fixes a bug where aTrackWheel
exported to a proto would not retain any of its fields. (There may have been some similar bugs for other export modes, but I didn't look explicitly for them. Regardless, the new system should fingers-crossed not have any of those problems.)WbCamera
,WbContactProperties
,WbMotor
,WbSkin
) used various resources, but did not have any special export code. I've added it in. This means that these nodes will now download their resources when exported to w3d.WbUrl::exportResource
was called with the same raw and resolved url. (1 2 3) In unifying everything, I've updated the code to pass the actual raw url. Assuming I understand the code correctly, this should not cause any change in behavior asWbUrl::exportResource
only uses the raw url to parse out the file name; not its path.Related Issues
This pull-request fixes issue #6851
Tasks
Add the list of tasks of this PR.