Comments (11)
Yes, that fixes problem. I'd change OpeCFILE_fp signature too for sure:
typedef void (*OpenCFILE_fp)(CFILE **handle, const std::filesystem::path &filename, const char *mode);
from descent3.
Adding some additional context from a quick debug (macOS, arm64):
Inside of FindPlayerStarts()
(Player.cpp:1232
) there is this line which sets the start room to -2147473471
:
Players[Objects[i].id].start_roomnum = Objects[i].roomnum;
(i
in this case was 59)
And later in PlayerGetRandomStartPosition()
(Player.cpp:1347
) it tries to access an array with this bogus value:
objnum = Terrain_seg[Players[num].start_roomnum].objects;
(num
in this case was 13)
Backtrace of crash:
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0xfffffff700a085d0)
* frame #0: 0x00000001001aa5a4 Descent3`PlayerGetRandomStartPosition(slot=0) at Player.cpp:1347:58
frame #1: 0x000000010014da64 Descent3`MultiDoServerFrame() at multi_server.cpp:2564:39
frame #2: 0x000000010010e8ac Descent3`MultiDoFrame() at multi.cpp:2246:5
frame #3: 0x00000001000aa13c Descent3`GameFrame() at GameLoop.cpp:3076:3
frame #4: 0x00000001000b24a0 Descent3`GameFrameUI() at gamesequence.cpp:2024:3
frame #5: 0x00000001135cc610 Anarchy.d3m`WaitForPlayersCallback() at dmfcui.cpp:758:5
frame #6: 0x000000010015c47c Descent3`DoUIFrame() at newui_core.cpp:618:7
frame #7: 0x00000001001424e8 Descent3`PollUI() at multi_dll_mgr.cpp:815:3
frame #8: 0x00000001135cccc8 Anarchy.d3m`DMFCBase::DoDMFCUIWaitForPlayers(this=0x000000014ff36800, clients_wait=true) at dmfcui.cpp:836:11
frame #9: 0x00000001135b1ecc Anarchy.d3m`DMFCBase::OnClientShowUI(this=0x000000014ff36800, id=61153, user_data=0x0000000000000000) at dmfcclient.cpp:1009:5
frame #10: 0x00000001135cf0b8 Anarchy.d3m`DMFCBase::CallOnClientShowUI(this=0x000000014ff36800, id=61153, user_data=0x0000000000000000) at dmfcvirtual.cpp:687:5
frame #11: 0x00000001135cfc94 Anarchy.d3m`DMFCBase::TranslateEvent(this=0x000000014ff36800, eventnum=1561, data=0x00000001003e4270) at dmfcvirtual.cpp:956:7
frame #12: 0x0000000113594954 Anarchy.d3m`DLLGameCall(eventnum=1561, data=0x00000001003e4270) at Anarchy.h:99:13
frame #13: 0x000000010009914c Descent3`CallGameDLL(eventnum=1561, data=0x00000001003e4270) at Game2DLL.cpp:735:5
frame #14: 0x00000001000afbf0 Descent3`RunGameMenu() at gamesequence.cpp:2154:7
frame #15: 0x00000001000aecdc Descent3`GameSequencer() at gamesequence.cpp:1219:9
frame #16: 0x0000000100083db8 Descent3`PlayGame() at game.cpp:834:5
frame #17: 0x0000000100071cfc Descent3`MainLoop() at descent.cpp:558:7
frame #18: 0x00000001000717ac Descent3`Descent3() at descent.cpp:513:5
frame #19: 0x0000000100232168 Descent3`oeD3LnxApp::run(this=0x000000016fdfebf0) at lnxmain.cpp:229:16
frame #20: 0x00000001002320a0 Descent3`main(argc=9, argv=0x000000016fdfeec0) at lnxmain.cpp:625:10
frame #21: 0x0000000181cb20e0 dyld`start + 2360
Backtrace of watchpoint (Players[13].start_roomnum
):
* thread #1, queue = 'com.apple.main-thread', stop reason = watchpoint 2
* frame #0: 0x00000001001a9ac0 Descent3`FindPlayerStarts() at Player.cpp:1233:53
frame #1: 0x00000001000f1020 Descent3`LoadLevel(filename="Paranoia.d3l", cb_fn=0x0000000000000000) at LoadLevel.cpp:4064:3
frame #2: 0x00000001001062b8 Descent3`LoadMissionLevel(level=6) at Mission.cpp:1286:8
frame #3: 0x00000001000af5ec Descent3`LoadAndStartCurrentLevel() at gamesequence.cpp:1674:8
frame #4: 0x00000001000aec34 Descent3`GameSequencer() at gamesequence.cpp:1198:33
frame #5: 0x0000000100083db8 Descent3`PlayGame() at game.cpp:834:5
frame #6: 0x0000000100071cfc Descent3`MainLoop() at descent.cpp:558:7
frame #7: 0x00000001000717ac Descent3`Descent3() at descent.cpp:513:5
frame #8: 0x0000000100232168 Descent3`oeD3LnxApp::run(this=0x000000016fdfebf0) at lnxmain.cpp:229:16
frame #9: 0x00000001002320a0 Descent3`main(argc=9, argv=0x000000016fdfeec0) at lnxmain.cpp:625:10
frame #10: 0x0000000181cb20e0 dyld`start + 2360
from descent3.
This also happens when running a CTF game on the Bedlam.mn3 level set. Level 2, Plutonium, the red team first player spawn will trigger the crash. If you start the match on level 1, change team to any other three, end the level and load in level 2, you can spawn successfully. Now, if you switch teams to red team, you will attempt to spawn at the first red team position and crash the server.
from descent3.
Not sure if I should open a new issue, but just tried commit de75a80 and now multiplayer is completely broken
from descent3.
Not sure if I should open a new issue, but just tried commit de75a80 and now multiplayer is completely broken
Thanks for the report, I can reproduce the problem (crash when starting mp server, if that's what you're referring to).
@winterheart it's crashing on cfile.cpp:490
in the new cfopen
, do you have any idea?
from descent3.
@0xFADDAD can you please tell me if this commit fixes the problem ? (on DirectTCP/IP, not PXO) https://github.com/Lgt2x/Descent3/tree/fix-online
from descent3.
OK, got it to build, was using git clone
and it didn't want to build, so I downloaded the .zip instead and that built. Multiplayer, for the one level I chose, works again. No change to the bugged player spawns.
from descent3.
Not sure if I should open a new issue, but just tried commit de75a80 and now multiplayer is completely broken
Thanks for the report, I can reproduce the problem (crash when starting mp server, if that's what you're referring to).
@winterheart it's crashing on
cfile.cpp:490
in the newcfopen
, do you have any idea?
CFile changes API, but DLL export does not reflect that. I'll prepare fix for it.
from descent3.
Not sure if I should open a new issue, but just tried commit de75a80 and now multiplayer is completely broken
Thanks for the report, I can reproduce the problem (crash when starting mp server, if that's what you're referring to).
@winterheart it's crashing oncfile.cpp:490
in the newcfopen
, do you have any idea?CFile changes API, but DLL export does not reflect that. I'll prepare fix for it.
Checkout my fix above doing that partially
from descent3.
It should now be fixed in main branch
from descent3.
Can confirm working. Just need the original bug worked on for player spawn positions crashing servers/clients.
from descent3.
Related Issues (20)
- [Runtime Issue]: v1.5 macOS ARM release does not have the executable set on the Descent3 binary HOT 8
- Separate writable from read-only data paths HOT 2
- Automatic and manual game data paths
- Full controller support
- Logging framework HOT 4
- [Runtime Issue]: MacOS signing configuration
- Gamespy protocol missing HOT 9
- [Runtime Issue]: New renderer slowing down the game HOT 1
- [Runtime Issue]: Can sometimes shoot through ground with very high framerates
- [Runtime Issue]: libmve audio dropping out under Linux with PipeWire audio. HOT 2
- [Runtime Issue]: Lightning weather effect is playing extremely too frequently. HOT 1
- [Runtime Issue]: Unable to run on MacOS ARM - “Descent3” is damaged and can’t be opened. You should move it to the Trash. HOT 2
- [Runtime Issue]: Framerates in outdoor areas drop to half to third of indoor areas and spikes GPU usage. HOT 17
- Add contributor names to the credits
- [Runtime Issue]: Dedicated server crashes on ARM64 when built on Ubuntu 20.04 and running though systemd HOT 5
- Support for custom ship models and properties HOT 5
- [Reminder] Future git tags to be made on the `main` branch HOT 3
- [Runtime Issue]: Cannot move levers/switches or pick up keys in 3rd party levels HOT 2
- [Build Failure]: “plog third-party directory could not be found.” HOT 2
- [Runtime Issue]: Shied orb/Energy pickup loose emissive sound quality after pickup HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from descent3.