dkfans / keeperfx

Open source remake and Fan Expansion of Dungeon Keeper.
https://keeperfx.net/
GNU General Public License v2.0
773 stars 76 forks source link

-connect CLI command crashes with invalid IP #2551

Open yani opened 1 year ago

yani commented 1 year ago

I ran the following command:

wine keeperfx.exe -connect 123.123.123:5556

Result: Game crashes right before main menu.

It behaves correctly when the IP is valid.

Dungeon Keeper FX ver 0.5.0.3165  (standard release) git:d6a523e49
LOG CREATED  @ 09:01:53  20-08-2023

Net: Initializing sessions from command line: 123.123.123:5556
Sync: LbMouseChangeMoveRatio: New ratio 256x256
Sync: CPU AuthenticAMD type 0 family 25 model 1 stepping 2 features 178bfbff
Sync: AMD Ryzen 7 5800X 8-Core Processor             
Sync: Operating System: Windows NT 10.0.18362
Sync: PhysicalMemory 64
Sync: Memory-demanding features enabled.
Warning: load_configuration(line 1): Unrecognized command in Config file.
Warning: load_configuration(line 2): Unrecognized command in Config file.
Warning: load_configuration(line 15): Unrecognized command in Config file.
Sync: LbScreenSetup: Mode 1920x1080x32 setup succeeded
Sync: Moon phase -0.8299
Sync: LbScreenSetup: Mode 1920x1080x32 setup succeeded
LbDataFree: freeing "*PALETTE"...done
LbDataFree: freeing "*SCRATCH"...done
Sync: GraphicsHeap Size 50331648
Sync: SoundHeap Size 50331648
Sync: init_sound_heap_two_banks: Got sound buffer of 50294496 bytes, samples in banks: 1035,126
Found 16 sprite zip file(s), loaded 16 with animations and 3 with icons.
Loaded 150 object types from global objects config
Loaded 150 object types from global objects config
Sync: Pentium Pro polygon rendering on
Sync: setup_game: Speech recognition disabled: KeeperSpeech module not found
Warning: parse_campaign_common_blocks(line 6): Couldn't read "NAME_TEXT_ID" command parameter in A fairy tale Campaign config file.
LbDataFree: freeing "data/pointer64.dat"...done
LbDataFree: freeing "data/pointer64.tab"...done
Sync: LbScreenSetup: Mode 1920x1080x32 setup succeeded
Sync: get_startup_menu_state: Setup client
Sync: Initializing 4-players type 0 network
Net: Selecting TCP/IP SP
Sync: Frontend state change from 0 into 5
Sync: Created menu ID 21 at slot 0, pos (240,0) size (1440,1080)
Net: Enumerate Services called

My log says build 3165, but this crash also happens on build 3465. It also says TCP/IP in the log, but I think this command selects ENET.

I think @SimLV added this CLI command while implementing ENET.

SimLV commented 1 year ago

I will look at this

Loobinex commented 1 year ago

It does connect to TCP/IP (or tries to). Not ENET as Yani thinks.

yani commented 1 year ago

It does connect to TCP/IP (or tries to). Not ENET as Yani thinks.

TheSim told me it was specifically added because he was testing ENET so much and had to start a lot of games. I also asked to be sure. I might have fully misunderstood.

Maybe this is also fixed with the change you did.