Fixed 1.6.2 is Broken on Windows XP, no K32GetModuleBaseNameA in Kernel32.dll

Puppytine

Slayed dreamer
Posts
2,237
Likes
1,493
I finally just updated my MBII installation to 1.6.2, and turned out I can't play Movie Battles anymore.
I'm on WinXP, and game doesn't start, either via jamp or MBII Client.
When launching via jamp, it crashes with "VM_Create on UI failed", MBII Client displays "The Procedure entry point K32GetModuleBaseNameA could not be located in the dynamic link library KERNEL32.dll" multiple times, then goes to base Jedi Academy.
Dependency Worker shows that all three MBII dlls (cgamex86.dll, jampgamex86.dll, uix86.dll) are using K32GetModuleBaseNameA from Kernel32.dll. That function doesn't exist in Kernel32.dll from Windows XP.
I was able to start up MBII without visible issues (I only did a very short test on tR Deathstar 2 so far) after manually editing import tables of all those mentioned dynamic libraries, replacing a entry for K32GetModuleBaseNameA with a function that is actually exist in XP's Kernel32.dll.
I assume that K32GetModuleBaseNameA is only used to generate crash dumps, and since I did replace it with a pretty different function (GetModuleFileNameA), I think Movie Battles will have very hard times when it will try to generate a crash dump on my PC :)

I uploaded patched files to this post. Here's an instruction for everybody who are on XP:
  1. Download the attachment
  2. Unzip its contest into "Jedi Academy\GameData\MBII", overwriting existing file.
  3. Delete these files from MBII directory: cgamex86.dll, jampgamex86.dll, uix86.dll.
  4. You'll need to repeat overwriting every time you repair installation via Launcher, since Launcher replaces fixed files with those aren't compatible with WinXP.
This will only work until new Movie Battles is released.

Dear MBII devs, I firmly ask you to fix this bug ASAP, so all Windows XP users could play MBII again, without necessary to mess with patched dlls.
It should be pretty easy to fix: just put this:
Code:
#define PSAPI_VERSION 1
Somewhere before this:
Code:
#include <psapi.h>
... And then rebuild MBII dlls.
Surely Movie Battles will work perfectly fine with GetModuleBaseNameA from Psapi.dll, just like it did all earlier versions. K32GetModuleBaseNameA from Kernel32.dll isn't that necessary, really.
More information: Entry point not found-The procedure entry point K32GetModuleBaseNameA could not be located in the dynamic link library kernel32.dll

Screenshots:

f448eb4a5571.png


e10141ec0fcf.png


1b32c895b5e1.png


e051d1901b7b.png


98a44e481d73.png


e2ddf2f6cef0.png
 
Last edited by a moderator:

Defiant

Nerd
Project Leader
Movie Battles II Team
Code Leader
Posts
1,046
Likes
1,518
Sorry puppytine i cant allow you to distribute modified binaries.

I will do an official build with the compiler flag set and post it here shortly.

This is likely a result of bumping the compiler version, this is a requirement for upcoming new features, if we can avoid breaking compatibility with current platforms we will, but ultimately, the world moves on and indefinite support is unlikely.

Edit Official PK3 Attached. Place in GameData/MBII/
 

Attachments

  • MBII.pk3
    1.6 MB · Views: 322
Last edited:

Puppytine

Slayed dreamer
Posts
2,237
Likes
1,493
maybe its finally time to upgrade to a OS with support??
596c86421677.png

I couldn't imagine there being that many XP users anymore if at all
Well, there is me, there is a guy from Discord:

5cd22dd5b1d8.png


ddc8a27463b2.png


And there is this guy, since I believe that Vista is affected as well: Technical Issue - VM_Create on UI failed
Just a three people already. Who knows how many of those who aren't on forums or Discord, who just get their MBII updated, realized it isn't working anymore, shrugged and then deleted the mod.
I remember Chaos said something about he was on Vista back then...
Sorry puppytine i cant allow you to distribute modified binaries.
Ok, as long as you provide fixed binaries officially, I don't care that my files got deleted.
Thank you for fast response.
 
Posts
68
Likes
18
How do you people not listen to some of us?
maybe we don't wanna upgrade.
1stly. Why?
2nd. Maybe we don't have money to upgrade
-Guy from Discord
 

Defiant

Nerd
Project Leader
Movie Battles II Team
Code Leader
Posts
1,046
Likes
1,518
How do you people not listen to some of us?
maybe we don't wanna upgrade.
1stly. Why?
2nd. Maybe we don't have money to upgrade
-Guy from Discord

From an MBII perspective there are three reasons.

Firstly new technologies are not developed for older systems. If new features had required say the 2015 or 2017 runtime, I don't think these will even install on XP, maybe they will but eventually the steady march of progress will mean MBII will have a prerequisite that won't be available to old operating systems.

Secondly since XP is so uncommon its unlikely either a developer or beta tester is using it, so builds are not tested against it. This means that if we add platform dependent code (Such as discord in the last release) it won't be tested and may not work. I think it's fair to say that XP and Vista have moved beyond active support and are now on a 'best endevours' basis because of these reasons.

Finally, since Microsoft no longer support XP, Vista or 7 there is no guarantee tools will continue to even build code that will run on these platforms. The current in vouge thought process in the industry tends to be to not constrain yourself to backward compatibility - unlike the good old days.
 

Defiant

Nerd
Project Leader
Movie Battles II Team
Code Leader
Posts
1,046
Likes
1,518
Thats right - More than ever. a 100% increase. Two games now run properly, a massive increase from the one previous option.
 

Noob

Just a Guy
Donator
Movie Battles II Team
Posts
1,524
Likes
1,638
Forgot to mention Windows 10 is pretty much free if you dont mind watermarks and not being able to customize your desktop
 

Puppytine

Slayed dreamer
Posts
2,237
Likes
1,493
😂
Oh god
This is so scary
I'm literally shaking right now
Who could thought that I'm in such a danger, a vulnerability that put my computer at huge risk! It's literally a giant hole in the security of the OS I have installed, at any moment some pesky hacker can connect to my PC and steal all my accounts, delete all data I have, format all my partitions!

... Or, more precisely, a hacker *could* do it.
If only RDS/Terminal Services wasn't disabled for decades on my computer (who the hell keeps it enabled anyway?!)
If only my PC wasn't behind a router with a NAT turned on, which has only very limited number of ports forwarded (and 3389 isn't in list).

But aside from that, I'm surely in great danger, and I probably will hacked even before I'm finished typing this reply!
Firstly new technologies are not developed for older systems.
I understand that, but there is also a little nuance: Movie Battles isn't a standalone game, it's rather a mod. A mod of a game from XP era, and that already sets up a lot of limitations, so keeping compatibility with XP shouldn't be a such a huge issue, comparing if MBII was just brand new game, or even a game not mod from old times.
Indeed, if you want a game running via DirectX 12 there is no choice other from ditching Windows XP, but Jedi Academy also doesn't really help using DX12.
If new features had required say the 2015 or 2017 runtime, I don't think these will even install on XP
Not true.
VC 2017 runtime installs just fine on Windows XP, so there is a good chance it will work as well.

823843ebef7e.png

there is no guarantee tools will continue to even build code that will run on these platforms.
Well, as I understand, their tools are able to produce XP-compatible code so far.
Let's save talks about MS compilers not generating binaries for XP for when it happens.
Linux exists, and now more than ever supports most games.
LOL
Using Linux on outdated hardware maybe even more challenging than using WinXP on the same hardware in 2020, gl with that!
Forgot to mention Windows 10 is pretty much free if you dont mind watermarks and not being able to customize your desktop
Why do you believe it's about price of OS? 😅😂
Edit Official PK3 Attached. Place in GameData/MBII/
And here's the most important part of my reply:
Turned out this new official files also doesn't work on Windows XP, still broken.
The new issue is with cgamex86.dll, which, in turn, linked to discord_game_sdk.dll, which is linked to multiple functions missing in Windows XP, and even to a whole library, ktmw32.dll, not available on XP.
Please rebuild cgamex86.dll without implicit linking to discord_game_sdk.dll -- use delay-load mechanics, or call LoadLibrary and GetProcAdress manually. Do not try to use discord integration on Windows XP.

088626fac3c9.png


787617bab20f.png
 
Last edited:

Spaghetti

Ghost
R2D2
Movie Battles II Team Retired
Posts
1,637
Likes
1,640
Oh god
This is so scary
I'm literally shaking right now
Who could thought that I'm in such a danger, a vulnerability that put my computer at huge risk! It's literally a giant hole in the security of the OS I have installed, at any moment some pesky hacker can connect to my PC and steal all my accounts, delete all data I have, format all my partitions!

... Or, more precisely, a hacker *could* do it.
If only RDS/Terminal Services wasn't disabled for decades on my computer (who the hell keeps it enabled anyway?!)
If only my PC wasn't behind a router with a NAT turned on, which has only very limited number of ports forwarded (and 3389 isn't in list).

But aside from that, I'm surely in great danger, and I probably will hacked even before I'm finished typing this reply!
Any device sitting inside your local network could potential exploit a vulnerable service (remember never to let friends or family use your wifi or otherwise connect to the same network). A guest wifi network properly isolated and software firewall on XP could mitigate that if done properly, but even executed perfectly, you've still forfeited a layer of security (properly patched network services).

A direct remote exploit is less likely than compromise via browser though (browser exploit > local exploit > game over man). Not even Firefox ESR supports XP anymore, and anything Chromium based hasn't for many years. That pretty much just leaves very niche browsers which will be resource starved, so who knows how well patched they are. This all assumes you're even trying to use a patched browser though... if not, the situation is pretty much hopeless. You will be compromised eventually and probably won't even know it (unless it's crypto malware lol).

Computer security can never be perfect. Done properly it's about throwing up as many layers as possible (within reason for your risk tolerance) to reduce odds of compromise and mitigate damage when it does happen. Choosing to run an OS like XP with many known vulnerabilities that will never be patched (and lacking modern mitigation design which helps with unknown ones) is utterly reckless.
 

Defiant

Nerd
Project Leader
Movie Battles II Team
Code Leader
Posts
1,046
Likes
1,518
I understand that, but there is also a little nuance: Movie Battles isn't a standalone game, it's rather a mod. A mod of a game from XP era, and that already sets up a lot of limitations, so keeping compatibility with XP shouldn't be a such a huge issue, comparing if MBII was just brand new game, or even a game not mod from old times.

Its not quite as simple as that. MBII/JKA does not exist in a vacuum. Be it underlying software, hardware or interfaces, all of them combine to make the operating environment. As that environment changes and we want to do more modern things it will become increasingly difficult to keep it going on Windows XP.

Infact i think its fair to say that MBII does not support Windows XP any more. We obviously have been unable to test on that platform so we cannot guarantee it will work or continue to work on that platform. If you are running on XP or Vista you should consider yourself at risk because we will have no advanced notice of breaking changes happening on these platforms. Whilst I will take a best efforts approach and will happily investigate and offer assistance to to these platforms there may well be a day where the engineering effort becomes too great or it simply becomes impossible.

At the end of the day, when JKA Launched it also supported Windows 2k, Windows 98 and PowerPC Macs, just like at some point these quietly slipped beyond what we can offer full development effort for, Windows XP is approaching that point now.
 

Noob

Just a Guy
Donator
Movie Battles II Team
Posts
1,524
Likes
1,638
@Puppytine Reply so late im not invested anymore. If you wanna argue every single point to make others think you look savvy or something, go ahead, take the security risk 👍
 
Top