MegaMek / megamek

MegaMek is a networked Java clone of BattleTech, a turn-based sci-fi boardgame for 2+ players. Fight using giant robots, tanks, and/or infantry on a hex-based map.
http://www.megamek.org
GNU General Public License v2.0
299 stars 288 forks source link

Game not starting, possibly "none colour" issue #2884

Closed Tecmes closed 3 years ago

Tecmes commented 3 years ago

[49.2 "small unit fix" release] Got a game generated by StratCon that won't start. It hangs at "transmitting game data". Here's the log, which has a lot of colour errors. I tried changing the colours of the team, and I note that two groups had none selected when trying to change it. However it didn't change the issue of the game non-starting.

megameklog.txt

Tecmes commented 3 years ago

Happening still with 49.2+410. Tried with default options. Game not starting, unplayable.

Windchild292 commented 3 years ago

The "None" PlayerColour errors shouldn't occur, but is not the cause. That's a message that writes only when parsing fails, and it then sends the fallback instead. I'd like a campaign file with customs to assist in bugfixing the player colour parsing bug.

Tecmes commented 3 years ago

OK. I thought it could be an issue because the color picker has a strange behaviour. Depending on the camo chosen, when you click to change it, sometimes it has the color selected, sometime a seemingly random page, sometime none at all. Not a bug per se, but was odd. Yet indeed that issue appears before i even attempt to launch the game, so could hardly be criticial...

Anyway, here's a save, though I kind of suspect that it will start for anyone but me... not_starting.sav.gz

Note that a simple standalone MM game works. The above savegame, started in standalone MM, doesn't work, with the same issue of being stuck in the Transmitting game data stage.

Windchild292 commented 3 years ago

Interesting... you somehow have a player with a non-set camouflage. That shouldn't be possible...

Tecmes commented 3 years ago

Note that a simple standalone MM game works. The above savegame, started in standalone MM, doesn't work, with the same issue of being stuck in the Transmitting game data stage, with a more interesting log error, here: megameklog.txt

HammerGS commented 3 years ago

From the Log

Exception in thread "Packet Pump" java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 8 at megamek.common.LandAirMech.addBomb(LandAirMech.java:2009) at megamek.common.LandAirMech.addEquipment(LandAirMech.java:2059) at megamek.common.IBomber.applyBombs(IBomber.java:139) at megamek.server.Server.checkEntityExchange(Server.java:2633) at megamek.server.Server.executePhase(Server.java:2591) at megamek.server.Server.changePhase(Server.java:2194) at megamek.server.Server.endCurrentPhase(Server.java:2729) at megamek.server.Server.checkReady(Server.java:1979) at megamek.server.Server.handle(Server.java:31264) at megamek.server.Server$PacketPump.run(Server.java:183) at java.base/java.lang.Thread.run(Thread.java:829) c:Contents of Send Queue: c:Contents of Send Queue: client: died

Windchild292 commented 3 years ago

Already looking into the pair. Found the colour camouflage bug in MekHQ, now looking into the array index one.

Tecmes commented 3 years ago

Just to confirm: removing the one LAM from the roster (as well sa setting a color for the group missing its camo) allows the game to start!

Windchild292 commented 3 years ago

That is correct and will fix the two issues raised here. I just merged the LAM Bomb error fix, but there's still the original problem that I don't know the region of the code well enough to handle so I'm opening a new bug for that.