The Jackbox Utility's state, or why a small update can take days to be published

The Jackbox Utility's state, or why a small update can take days to be published

It's July 29, 2024, and the Jackbox team is publishing their new tool called the Jackbox Megapicker. This app aims to launch Jackbox games faster without navigating through a pack menu.
Sound familiar? Yes, Jackbox Utility does the same... But in a different way. That’s where the problems began.

A new way to launch games

Jackbox Games create their party pack using their own engine called "Talkshow". This engine compiles games into a list of .jet (JSON files) and .swf files (the now-defunct Adobe Flash format).

To enhance speed, Jackbox Utility modifies these files by removing unnecessary elements, known as "loaders." This allows users to skip the title screen and menu, launching games with a single click. Initially, this method worked well since the games were not updated post-release. However, just a week before the Megapicker's launch, Jackbox updated all their games to implement a new way of launching games without modifying any files.

After the update, we found ourselves replacing files with outdated versions, causing crashes upon game startup.


To fix this mess, we had two choices :

  • Update all of our loaders (over 50 files).
  • Adopt the new method used by the Megapicker, which involves using a parameter given to the party pack to launch games faster.

As these two choices have downsides, we decided to choose both of them. By default, Jackbox Utility would use the new parameter, as it’s officially supported by Jackbox Games. However, for some games where this method doesn't work, we would continue using our loaders until Jackbox addressed the issues.

Thanks to our testers, we quickly integrated this new functionality. But, there was something unexpected that prevented us to update the app.

The responsible library

For every game, we show a description, images and most importantly, a video. Adding a video to the app is not something we can do natively for the engine we use, so we need to use a library.

The only library we found that was compatible with the major desktop platforms was media_kit, a cross-platform video player and audio player for Flutter and Dart.

When we attempted to add this library, we encountered issues with our operating systems:

  • Linux: A native library needs installation, which isn’t possible as the app isn’t bundled.
  • Windows: The app size doubled after adding the library.

Even with these issues, we decided to add the library as it was a great addition to Jackbox Utility and because the majority of the users are on Windows.

It worked great, until something clearly unexpected happened.

A small Windows compiler update

Shortly after our last release, the Visual Studio compiler received an update that altered behaviors related to a DLL called msvcp140, required by media_kit. This change caused the app to crash on Windows when launched.

We were not the only one with this problem, as an issue was created for it on the repository of Github actions and on media_kit. To resolve this issue, it was mandatory to define an internal variable in the library which the library owner quickly addressed. Despite this, crashes persisted in parts of the app not using the library. We suspected another issue related to the DLL, which seemed to vanish when we removed it.

As we needed to push the update fast, we decided to remove the video library so we could build an update. By doing this, we successfully removed the dll that was previously needed by the app, and it worked perfectly.

However, there was another problem that prevented us to publish the update, and it was still linked to this dll.

The Auto-updater

To keep the application up-to-date, we are using our home-made tool, the auto-updater. The complexity with it is that it can't be updated (or we should have an auto-updater for the auto-updater). If the app is not up-to-date, it will download the newest version and extract it to a folder called "app". The only problem with this behavior is that it doesn't delete the old version first, that means that if a file was present in the old version and is deleted in the new version, then it will still be present.

In our latest version, the msvcp140.dll was included. With the auto-updater’s behavior, this DLL wouldn’t be removed post-update. To resolve this, we created a new tool, media_kit_remover, to delete faulty files and restart the utility.

That way we were able to successfully remove this dll from the folder, and the utility was working fine, so we launched the 1.4.0 version of the app 🎊

The return of the DLL

As we published the latest version, everything was working fine, and it was wonderful to see all the users trying the new version. But, for some of them, the app crashed as if the dll was still in the app folder.

The strange part is that it happened only to some users that were on Windows 10 and that were using the app for the first time on the latest version. So we searched a lot and we found two things :

  • The problem fixed itself when you download the flutter tools to build the app
  • We were able to reproduce the problem using a windows fresh installation

After a few hours of testing and asking ourselves what was the problem, we tried to create a dump of the crash by using WinDbg and changing values in the Windows registries. The dump in hand, we found that there was still a mention of the msvcp140.dll even though we removed it. Then, we found out that the System32 folder has a version of the dll in it and that the app was using it. So, we tried to take the dll from a user with a working app and put it in the app folder of a user with a faulty app and... It worked flawlessly!

Conclusion

With this information, we determined that the users experiencing issues likely had an outdated version of msvcp140. Flutter seems to first search for the DLL in its folder before checking the System32 directory.

Armed with this knowledge, we can now include the latest version of the DLL in the app to ensure functionality.


I want to thank the Jackbox Utility team for helping me to get that update ready for all the users. Special thanks to Jaywalker for helping identify the source of the bug.

And thank you for reading until the end!