Fixing Bugs

Posted on by Jan

Unfortunately, even the best apps contain bugs. Sometimes these bugs are never discovered; usually, they’re merely annoying. But once in a while, they make your app unusable. This time, a user discovered the latter in RailControl Pro.

Getting to the issue

When a user reports an issue, I usually ask them for a few things to help me fix the issue.

The first thing I ask for is a backup of the CS3 where the issue happens. Märklin CS3s are pretty complex devices, and every configuration is different. Some people have three locomotives, while others have over 200. Most of the issues are caused by a configuration for which RailControl Pro is not prepared. In such cases, I can simulate the issue from the backup and easily fix it.

If a backup doesn’t solve the problem, things get a bit more complicated. Device settings, network settings, and other factors are harder to replicate remotely. In that case, I ask the user for a screen recording or video to show me what’s actually going on.

Crashing at launch

But sometimes that’s not enough. This time, a user reported that RailControl Pro for Mac crashed immediately upon launch. Every time. That’s not something that should ever happen, and I’m deeply embarrassed about it.

After importing the backup and running it on my system, things still worked as they should on my end. Hmmm. Since this issue occurred on Mac, the user also sent over the crash log. Usually very useful, but now it didn’t provide much information, except that the crash occurred right at launch. I also found the crashes in the Xcode Organizer (see screenshot), but there wasn’t much I could make out of that either.

The stack trace in Xcode

The fix

Eventually, after some TestFlight builds and follow-up questions, it became clear that RailControl Pro launched as it should the first time after installation.

However, it crashed after entering the IP address and kept doing so when relaunching the app. The user then tried reinstalling it a few times from the App Store, but with the same result.

Now, this was information I could work with. I tried bypassing the validation on the IP address field, and bingo! A stupid bug, causing a lot of trouble, was fixed with two lines of code.

It turned out the user entered the MAC address, instead of the IP address. Easy to mix up, especially because they’re shown almost next to each other in the CS3 settings.

This bug caused a lot of frustration for the user. When you pay for an app, it should work out of the box, right? It also frustrated me because it took a while before I could identify and fix the issue. Luckily, this time, we were able to solve the issue together and update the app.

Bug-free software doesn’t exist, so if you ever happen to come across any issue, big or small, do not hesitate: let me know, and we’ll fix it.