Patch 1.26: Resource Load Order Broken + Workaround
Patch 1.26: Resource Load Order Broken + Workaround
The release of Patch 1.26 for the Warsmash Mod Engine has brought about a significant change in the way the emulator loads game resources. However, this change has also introduced a critical bug that causes the game to crash on launch. In this article, we will delve into the details of the bug, its causes, and a workaround to get the game up and running smoothly.
When running the emulator with Patch 1.26 game files, users are met with a crash that is characterized by a NullPointerException
. The error message is as follows:
java.lang.NullPointerException: Attempt to invoke interface method 'void com.etheller.warsmash.parsers.fdf.frames.UIFrame.setVisible(boolean)' on a null object reference
at com.etheller.warsmash.viewer5.handlers.w3x.ui.menu.BattleNetUI.<init>(BattleNetUI.java:170)
at com.etheller.warsmash.viewer5.handlers.w3x.ui.MenuUI.main(MenuUI.java:1409)
at com.etheller.warsmash.WarsmashGdxMenuScreen.show(WarsmashGdxMenuScreen.java:237)
at com.badlogic.gdx.Game.setScreen(Game.java:63)
at net.warsmash.phone.android.engine.activity.EngineActivity.launchGame$lambda$0(EngineActivity.kt:85)
at net.warsmash.phone.android.engine.activity.EngineActivity.$r8$lambda$JSVIwB409R9bE0qWTV64D7Y6yFo(Unknown Source:0)
at net.warsmash.phone.android.engine.activity.EngineActivity$ExternalSyntheticLambda0.accept(D8$SyntheticClass:0)
at com.etheller.warsmash.WarsmashGdxMultiScreenGame.create(WarsmashGdxMultiScreenGame.java:18)
at com.badlogic.gdx.backends.android.AndroidGraphics.onSurfaceChanged(AndroidGraphics.java:319)
at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1557)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1272)
The bug is caused by a change in the way the emulator loads game resources. After the change, the emulator scans the game files directory for mpq
files and loads any mpq
files it comes across. However, the list of mpq
files is not sorted, causing the files to get loaded in readdir()
order. This order is often random, leading to the game crashing on launch.
Fortunately, there is a workaround to get the game up and running smoothly. The workaround involves renaming the War3Patch.mpq
file to War3xlocalPatch.mpq
. This change ensures that the mpq
files are loaded in the correct order, which is essential for the game to function properly.
To implement the workaround, follow these steps:
- Locate the
War3Patch.mpq
file: Navigate to the game files directory and locate theWar3Patch.mpq
file. - Rename the file: Rename the
War3Patch.mpq
file toWar3xlocalPatch.mpq
. - Set the
MaxPlayers
setting: In the app settings, set theMaxPlayers
setting to16
. This setting is recommended by Retera for Patch 1.22 - 1.28 game versions.
The release of Patch 1.26 has introduced a critical bug that causes the game to crash on launch. However, with the workaround outlined in this article, users can get the game up and running smoothly. By renaming the War3Patch.mpq
file and setting the MaxPlayers
setting, users can enjoy the game without any issues.
Patch 1.26: Resource Load Order Broken + Workaround - Q&A
In our previous article, we discussed the bug introduced by Patch 1.26 in the Warsmash Mod Engine and provided a workaround to get the game up and running smoothly. However, we understand that some users may still have questions about the bug and the workaround. In this article, we will address some of the frequently asked questions (FAQs) related to the bug and the workaround.
A: The bug is caused by a change in the way the emulator loads game resources. After the change, the emulator scans the game files directory for mpq
files and loads any mpq
files it comes across. However, the list of mpq
files is not sorted, causing the files to get loaded in readdir()
order. This order is often random, leading to the game crashing on launch.
A: The readdir()
order is important because it determines the order in which the game resources are loaded. If the resources are not loaded in the correct order, the game may crash or behave erratically.
A: The workaround involves renaming the War3Patch.mpq
file to War3xlocalPatch.mpq
. This change ensures that the mpq
files are loaded in the correct order, which is essential for the game to function properly.
A: To implement the workaround, follow these steps:
- Locate the
War3Patch.mpq
file: Navigate to the game files directory and locate theWar3Patch.mpq
file. - Rename the file: Rename the
War3Patch.mpq
file toWar3xlocalPatch.mpq
. - Set the
MaxPlayers
setting: In the app settings, set theMaxPlayers
setting to16
. This setting is recommended by Retera for Patch 1.22 - 1.28 game versions.
A: No, the workaround will not affect your game saves. The workaround only changes the order in which the game resources are loaded, and it does not modify any of the game data.
A: Yes, you can revert to the previous version of the game if you prefer. However, please note that the previous version may have its own set of bugs and issues.
A: You can find more information about the bug and the workaround on the Warsmash Mod Engine GitHub page. Additionally, you can join the Warsmash Mod Engine community forum to discuss the bug and the workaround with other users.
We hope that this Q&A article has provided you with the information you need to understand the bug and the workaround. If you have any further questions or concerns, please don't hesitate to reach out to us. We are always here to help.