Yes, you are right, this is exactly the reason. I ran into this bug ust before we released 4.5.2a in the development branch, and fixed it there. But when I tried it out in the v4.5.x branch, it already seemed to work, (I got a nice popup with ust the OK and cancel button with Crafty), so I dit not apply the patch there. I thought it had to do with displaying the OK and cancelbutton on the same line as theprevious control elements, which involved an out-of-bounds array access if there were no previous elements. Later I discovered that the 'fix' did not work in the development branch either, and that it could still crash with Crafty. But not always. When I tried to debug it by putting in print statements to locate the point of the crash, it turned out the print statements could make the crash disappear.
I now solved the problem in the development branch by popping up a message box in stead of the settings dialog, when the engine has no options.
I think we are plagued by a bug in the Athena widget-set library here, for auto-sizing buttons. I just discovered the size of buttons is quite unpredictable (if you don't specify it yourself, which is difficult in case of the engine-settings dialog, where there could be any text on it). In the Tags and Comment popups they were sometimes ridiculously wide, more than doubling the total width of the dialogs.Also in the settings dialog of glaurung, below, you can see there is something badly wrong with the sizing of the Clear Hash button. It is like the library at some point uses an uninitialized variable when determining button size, and that whatever happens to be on the stack left rom previous actions is then used. This would explain how a preceding printf could make the crash go away.