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
297 stars 287 forks source link

Unable to Start New Firing Phase in Space Battle #84

Closed mkerensky closed 7 years ago

mkerensky commented 8 years ago

337th or WordAir.sav.gz

Firing phase fails to start after moving all units. I'm running two separate windows clients on the same computer, each saved in a different directory with independent logs and configuration files.

The server doesn't seem to die, as I can still issue commands and even skip the WordAir player. Skipping sends me to the offboard phase report, but then I can't move on to the firing phase. I tried reverting to another save (337th) from the end of the previous turn. New initiative on turn 11 is rolled and I can move all units, but again the firing phase doesn't start.

The server log shows this sometimes, but the log timestamp doesn't show it being updated at the exact time of the issue.

Exception in thread "Packet Pump" java.lang.NullPointerException at megamek.common.Entity.loadWeaponWithSameAmmo(Entity.java:3350) at megamek.common.Entity.loadWeaponWithSameAmmo(Entity.java:3315) at megamek.common.Entity.reloadEmptyWeapons(Entity.java:5633) at megamek.server.Server.resetEntityPhase(Server.java:1696) at megamek.server.Server.prepareForPhase(Server.java:2425) at megamek.server.Server.changePhase(Server.java:2280) at megamek.server.Server.endCurrentPhase(Server.java:2848) at megamek.server.Server.changeToNextTurn(Server.java:3178) at megamek.server.Server.endCurrentTurn(Server.java:2265) at megamek.server.Server.receiveMovement(Server.java:4990) at megamek.server.Server.handle(Server.java:29426) at megamek.server.Server$PacketPump.run(Server.java:346) at java.lang.Thread.run(Unknown Source)

337th.sav.gz

Full log file is attached, though it contains a start, a skip and an attempt to replace WordAir with a bot in order to move to the next phase. The bot can't get past the offboard attack report either. megameklog.txt

arlith commented 8 years ago

Did you launch this game from MHQ? Did you have bombs mounted on any aeros?

Did you dump any ammo during the movement phase? If I just done through all of the entities, I don't get the NPE you're reporting. The NPE is happening when weapons are trying to reload ammo. I'm wondering if you were doing something during movement that I am not which was causing this NPE.

That NPE should halt the server... I'm also not experieincing your issue with the firing phase getting skipped.

mkerensky commented 8 years ago

I did not start the game from MHQ - I ought to try it out sometime, but I don't use it currently. I did have bombs. All of the 337th squadrons were carrying AAA or LAA missiles and have fired them all at the save point I attached. All bombs were added to the squadron, not the individual fighters in it.

I did not dump ammo, but because I had fighter units with ammo-fed weapons, I did get the bug where all ammo counts on a specific unit show (#in Clip or ton/0) a few times. This is one I've reported before and I'm used to working around it by reordering my weapons lists and not firing ammo-fed weapons for a turn. I think that all of the fighter squadrons with non-bomb ammo weapons have had this problem and recovered from it at least once during the game.

I do think one of the fighter squadrons suffered a bomb critical hit and lost an AAA missile. I later fired the AAA missile weapon and it worked. I also noticed that I seemed to get more than one shot with the bomb weapons. The AAA missile showed 1/6 for ammo count and let me fire it a second time in a later turn before running out of ammo. The lost bomb weapon showed an ammo count of (1/5).

All of the dropships were evading during movement, but the fighters were not. I use end over, roll, yaw and standard turn and accelerate actions in various combinations, but that's it.

Your report of being able to click Done through all the entities sounds familiar. I think I was able to get through a whole turn doing that too, but if I tried to fire any weapons on any entities I got the NPE, even if it was during the next turn.

mkerensky commented 7 years ago

I think this has been fixed and I'm closing it. If I run across it again, I'll fix it.