Page MenuHomeWildfire Games

Revert rP24167 / Keep track of serialized objects using a map.
ClosedPublic

Authored by wraitii on Jan 12 2021, 11:06 AM.

Details

Summary

This reverts rP24167. That diff had two issues:

  • It modifies the JS objects, which means subsequent serialization in quicksave are 'dirty'.
  • It doesn't work with non-extensible objects. That's rather annoying, and has already caused problems.

It also revert rP24466, which was caused by the second issue.

This reverts to a SM structure, a GCHashTable, that's well supported according to SM devs. It seems to work fine.

Test Plan

Quicksave-quickload, regular save-load.

Event Timeline

wraitii created this revision.Jan 12 2021, 11:06 AM

Build has FAILED

builderr-debug-macos.txt
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libnetwork_dbg.a(precompiled.o) has no symbols
../../../source/simulation2/serialization/BinarySerializer.cpp:455:20: error: no member named 'extract' in 'std::__1::unordered_map<JS::Heap<JSObject *>, unsigned int, CBinarySerializerScriptImpl::HeapHash, std::__1::equal_to<JS::Heap<JSObject *> >, std::__1::allocator<std::__1::pair<const JS::Heap<JSObject *>, unsigned int> > >'
                auto node = tags.extract(it);
                            ~~~~ ^
1 error generated.
make[1]: *** [obj/simulation2_Debug/BinarySerializer.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [simulation2] Error 2

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/2787/display/redirect
See console output for more information: https://jenkins.wildfiregames.com/job/macos-differential/2787/display/redirectconsole

Build has FAILED

builderr-debug-gcc7.txt
In file included from ../../../source/third_party/ogre3d_preprocessor/tests/test_Preprocessor.cpp:17:
/zpool0/gcc7/source/third_party/ogre3d_preprocessor/tests/test_Preprocessor.h: In lambda function:
/zpool0/gcc7/source/third_party/ogre3d_preprocessor/tests/test_Preprocessor.h:203:17: warning: unused parameter 'includePath' [-Wunused-parameter]
     const CStr& includePath, CStr& out) {
     ~~~~~~~~~~~~^~~~~~~~~~~
/zpool0/gcc7/source/third_party/ogre3d_preprocessor/tests/test_Preprocessor.h: In lambda function:
/zpool0/gcc7/source/third_party/ogre3d_preprocessor/tests/test_Preprocessor.h:220:17: warning: unused parameter 'includePath' [-Wunused-parameter]
     const CStr& includePath, CStr& out) {
     ~~~~~~~~~~~~^~~~~~~~~~~
/zpool0/gcc7/source/third_party/ogre3d_preprocessor/tests/test_Preprocessor.h:220:36: warning: unused parameter 'out' [-Wunused-parameter]
     const CStr& includePath, CStr& out) {
/zpool0/gcc7/source/third_party/ogre3d_preprocessor/test

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/4450/display/redirect
See console output for more information: https://jenkins.wildfiregames.com/job/docker-differential/4450/display/redirectconsole

wraitii requested review of this revision.Jan 12 2021, 11:17 AM
wraitii updated this revision to Diff 15188.Jan 12 2021, 5:12 PM

Update using GCHashTable following mozilla dev's comments (asked them questions on Matrix today).

Build has FAILED

builderr-debug-macos.txt
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libnetwork_dbg.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libsimulation2_dbg.a(precompiled.o) has no symbols
ld: warning: text-based stub file /System/Library/Frameworks//CoreAudio.framework/CoreAudio.tbd and library file /System/Library/Frameworks//CoreAudio.framework/CoreAudio are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//AudioToolbox.framework/AudioToolbox.tbd and library file /System/Library/Frameworks//AudioToolbox.framework/AudioToolbox are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//ForceFeedback.framework/ForceFeedback.tbd and library file /System/Library/Frameworks//Forc

Link to build: https://jenkins.wildfiregames.com/job/macos-differential/2800/display/redirect
See console output for more information: https://jenkins.wildfiregames.com/job/macos-differential/2800/display/redirectconsole

Build has FAILED

builderr-debug-gcc7.txt
In file included from ../../../source/third_party/ogre3d_preprocessor/tests/test_Preprocessor.cpp:17:
/zpool0/gcc7/source/third_party/ogre3d_preprocessor/tests/test_Preprocessor.h: In lambda function:
/zpool0/gcc7/source/third_party/ogre3d_preprocessor/tests/test_Preprocessor.h:203:17: warning: unused parameter 'includePath' [-Wunused-parameter]
     const CStr& includePath, CStr& out) {
     ~~~~~~~~~~~~^~~~~~~~~~~
/zpool0/gcc7/source/third_party/ogre3d_preprocessor/tests/test_Preprocessor.h: In lambda function:
/zpool0/gcc7/source/third_party/ogre3d_preprocessor/tests/test_Preprocessor.h:220:17: warning: unused parameter 'includePath' [-Wunused-parameter]
     const CStr& includePath, CStr& out) {
     ~~~~~~~~~~~~^~~~~~~~~~~
/zpool0/gcc7/source/third_party/ogre3d_preprocessor/tests/test_Preprocessor.h:220:36: warning: unused parameter 'out' [-Wunused-parameter]
     const CStr& includePath, CStr& out) {
/zpool0/gcc7/source/third_party/ogre3d_preprocessor/test

Link to build: https://jenkins.wildfiregames.com/job/docker-differential/4463/display/redirect
See console output for more information: https://jenkins.wildfiregames.com/job/docker-differential/4463/display/redirectconsole

wraitii edited the summary of this revision. (Show Details)Jan 12 2021, 5:23 PM
wraitii updated this revision to Diff 15190.Jan 12 2021, 5:53 PM

Fix the tests.

I think I'll need to patch SM too, the include should do it on windows for now.

Owners added a subscriber: Restricted Owners Package.Jan 12 2021, 5:53 PM

Build is green

builderr-debug-macos.txt
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libnetwork_dbg.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libsimulation2_dbg.a(precompiled.o) has no symbols
ld: warning: text-based stub file /System/Library/Frameworks//CoreAudio.framework/CoreAudio.tbd and library file /System/Library/Frameworks//CoreAudio.framework/CoreAudio are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//AudioToolbox.framework/AudioToolbox.tbd and library file /System/Library/Frameworks//AudioToolbox.framework/AudioToolbox are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//ForceFeedback.framework/ForceFeedback.tbd and library file /System/Library/Frameworks//Forc

See https://jenkins.wildfiregames.com/job/macos-differential/2801/display/redirect for more details.

Build is green

builderr-debug-gcc7.txt
In file included from ../../../source/third_party/ogre3d_preprocessor/tests/test_Preprocessor.cpp:17:
/zpool0/gcc7/source/third_party/ogre3d_preprocessor/tests/test_Preprocessor.h: In lambda function:
/zpool0/gcc7/source/third_party/ogre3d_preprocessor/tests/test_Preprocessor.h:203:17: warning: unused parameter 'includePath' [-Wunused-parameter]
     const CStr& includePath, CStr& out) {
     ~~~~~~~~~~~~^~~~~~~~~~~
/zpool0/gcc7/source/third_party/ogre3d_preprocessor/tests/test_Preprocessor.h: In lambda function:
/zpool0/gcc7/source/third_party/ogre3d_preprocessor/tests/test_Preprocessor.h:220:17: warning: unused parameter 'includePath' [-Wunused-parameter]
     const CStr& includePath, CStr& out) {
     ~~~~~~~~~~~~^~~~~~~~~~~
/zpool0/gcc7/source/third_party/ogre3d_preprocessor/tests/test_Preprocessor.h:220:36: warning: unused parameter 'out' [-Wunused-parameter]
     const CStr& includePath, CStr& out) {
/zpool0/gcc7/source/third_party/ogre3d_preprocessor/test

See https://jenkins.wildfiregames.com/job/docker-differential/4464/display/redirect for more details.

wraitii updated this revision to Diff 15193.Jan 12 2021, 6:51 PM

I think we're hitting a VS17 bug and I'm not sure which.
Trying a different hash.

Build is green

builderr-debug-macos.txt
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libnetwork_dbg.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libsimulation2_dbg.a(precompiled.o) has no symbols
ld: warning: text-based stub file /System/Library/Frameworks//CoreAudio.framework/CoreAudio.tbd and library file /System/Library/Frameworks//CoreAudio.framework/CoreAudio are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//AudioToolbox.framework/AudioToolbox.tbd and library file /System/Library/Frameworks//AudioToolbox.framework/AudioToolbox are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//ForceFeedback.framework/ForceFeedback.tbd and library file /System/Library/Frameworks//Forc

See https://jenkins.wildfiregames.com/job/macos-differential/2803/display/redirect for more details.

Build is green

builderr-debug-gcc7.txt
In file included from ../../../source/third_party/ogre3d_preprocessor/tests/test_Preprocessor.cpp:17:
/zpool0/gcc7/source/third_party/ogre3d_preprocessor/tests/test_Preprocessor.h: In lambda function:
/zpool0/gcc7/source/third_party/ogre3d_preprocessor/tests/test_Preprocessor.h:203:17: warning: unused parameter 'includePath' [-Wunused-parameter]
     const CStr& includePath, CStr& out) {
     ~~~~~~~~~~~~^~~~~~~~~~~
/zpool0/gcc7/source/third_party/ogre3d_preprocessor/tests/test_Preprocessor.h: In lambda function:
/zpool0/gcc7/source/third_party/ogre3d_preprocessor/tests/test_Preprocessor.h:220:17: warning: unused parameter 'includePath' [-Wunused-parameter]
     const CStr& includePath, CStr& out) {
     ~~~~~~~~~~~~^~~~~~~~~~~
/zpool0/gcc7/source/third_party/ogre3d_preprocessor/tests/test_Preprocessor.h:220:36: warning: unused parameter 'out' [-Wunused-parameter]
     const CStr& includePath, CStr& out) {
/zpool0/gcc7/source/third_party/ogre3d_preprocessor/test

See https://jenkins.wildfiregames.com/job/docker-differential/4466/display/redirect for more details.

wraitii updated this revision to Diff 15196.Jan 12 2021, 7:17 PM

Also revert rP24466 since that is no longer necessary.

Build is green

builderr-debug-macos.txt
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libnetwork_dbg.a(precompiled.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: ../../../binaries/system/libsimulation2_dbg.a(precompiled.o) has no symbols
ld: warning: text-based stub file /System/Library/Frameworks//CoreAudio.framework/CoreAudio.tbd and library file /System/Library/Frameworks//CoreAudio.framework/CoreAudio are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//AudioToolbox.framework/AudioToolbox.tbd and library file /System/Library/Frameworks//AudioToolbox.framework/AudioToolbox are out of sync. Falling back to library file for linking.
ld: warning: text-based stub file /System/Library/Frameworks//ForceFeedback.framework/ForceFeedback.tbd and library file /System/Library/Frameworks//Forc

See https://jenkins.wildfiregames.com/job/macos-differential/2804/display/redirect for more details.

wraitii updated the Trac tickets for this revision.Jan 12 2021, 7:28 PM

Build is green

builderr-debug-gcc7.txt
In file included from ../../../source/third_party/ogre3d_preprocessor/tests/test_Preprocessor.cpp:17:
/zpool0/gcc7/source/third_party/ogre3d_preprocessor/tests/test_Preprocessor.h: In lambda function:
/zpool0/gcc7/source/third_party/ogre3d_preprocessor/tests/test_Preprocessor.h:203:17: warning: unused parameter 'includePath' [-Wunused-parameter]
     const CStr& includePath, CStr& out) {
     ~~~~~~~~~~~~^~~~~~~~~~~
/zpool0/gcc7/source/third_party/ogre3d_preprocessor/tests/test_Preprocessor.h: In lambda function:
/zpool0/gcc7/source/third_party/ogre3d_preprocessor/tests/test_Preprocessor.h:220:17: warning: unused parameter 'includePath' [-Wunused-parameter]
     const CStr& includePath, CStr& out) {
     ~~~~~~~~~~~~^~~~~~~~~~~
/zpool0/gcc7/source/third_party/ogre3d_preprocessor/tests/test_Preprocessor.h:220:36: warning: unused parameter 'out' [-Wunused-parameter]
     const CStr& includePath, CStr& out) {
/zpool0/gcc7/source/third_party/ogre3d_preprocessor/test

See https://jenkins.wildfiregames.com/job/docker-differential/4467/display/redirect for more details.

This revision was not accepted when it landed; it landed in state Needs Review.Jan 12 2021, 7:44 PM
This revision was automatically updated to reflect the committed changes.