Page MenuHomeWildfire Games

Fix random-looking OOS following rP24563
ClosedPublic

Authored by wraitii on Jan 14 2021, 5:46 PM.

Details

Summary

rP24563 uses a GCHashTable to recognize objects.
I originally used MovableCellHasher, but that hit a VS17 bug. I then switched to a PointerHasher, and that seemed to work.
Unfortunately, it doesn't actually work, because it uses the object address and that can move. So I _do_ actually need a MovableCellHasher, as the docs explain.

I'll need to fix the VS17 bug.

Test Plan

Run MP games, the replay them -> you wil llikely get random mismatches without this patch.

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

wraitii created this revision.Jan 14 2021, 5:46 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/2865/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/4524/display/redirect for more details.

wraitii requested review of this revision.Jan 14 2021, 6:15 PM
wraitii updated this revision to Diff 15303.Jan 14 2021, 7:48 PM

Use MovableCellObject<JSObject*>, since that appears to work & per moz devs it should be equivalent.

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/2866/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/4525/display/redirect for more details.

Stan accepted this revision.Jan 14 2021, 8:48 PM
Stan added a subscriber: Stan.

Could finally reproduce with forced hashes (that should be an option)

Patch indeed fixes the issue for me.

This revision is now accepted and ready to land.Jan 14 2021, 8:48 PM
This revision was automatically updated to reflect the committed changes.