Mac ARM (Jun 17)

The bugs we find in our new accounting software keep getting smaller and smaller. So our staff has moved on to the final phase: building an app that other people can use. There are a few steps needed to make that happen.

The first is getting the code to run on new Mac ARM chips: M1, M2 and variations. It requires a jump from Qt5 to Qt6. Early versions of Qt6 had many bugs and missing features, so we waited as long as possible to make the switch. Better to get most of the coding done in a mature framework.

The good news is, it only took a day to update from 5 to 6. Most of the time was spent doing a half dozen clean installs, until we finally had all the correct files. Then, a few small changes in our code was enough for it to compile in the new framework. Surprisingly easy for such a big change.

The bad news is, TurtleSoft Pro crashed immediately when run on an M1 Mac. The app starts by reading in a bunch of data that describes each data class, and it failed there.

In the most recent post, I mentioned that we modernized some old 70’s C++ code to make reports go faster. The ARM version failed in similar ancient code, also inherited from the NeoAccess database. We stepped through it, but the problem was too hard to understand.  Qt6 seemed to lose track of pointers that Qt5 handled properly. It could be a Qt bug, or some quirk in ARM coding, or just bad C++ coding practice that isn’t supported by newer compilers.

Rather than struggle with a mystery bug, our staff took a couple days to rewrite and modernize the descriptor code. Now it’s cleaner and easier to maintain, and it works in Qt6.

The new accounting software still gives other errors when run on M1/M2 Macs. Our staff is tackling them gradually. There’s a Qt developer forum that often is helpful. Some may be lingering bugs in Qt’s support for ARM chips. Qt6 has been out for almost 18 months, but it’s still not perfect.

The really bad news is, we need to use NeoAccess itself to read existing Goldenseal files, before converting them to the new format. Currently, most Neo code fails on newer Macs. They really loved to use void pointers, and that’s what confuses Qt6. A rewrite could take years.

There may be a generic fix, especially if it’s a Qt6 bug. If not, the update from Goldenseal may need to run on an Intel Mac (or Windows). Worst case, our staff will convert user files here and send them back.

Next week, our staff will start building for Windows. That probably won’t have many compatibility problems. Most of the work will be tweaking appearances so they look good. With luck, building on another platform will help to narrow down which problems are Mac ARM, which are Qt6, and which are ours.

Dennis Kolva
Programming Director
TurtleSoft.com

Author: Dennis Kolva

Programming Director for Turtle Creek Software. Design & planning of accounting and estimating software.