Random Crashes on Windows App

I have been offering my app for Windows for a long time now, but I could not solve a special problem in all this years:

My app does much with pictures and graphics for displaying an editor. So it needs much memory to generate and buffer images.

  • After some time but randomly, the app crashes often without rising a runtime exception. There are no reproducible steps for these crashes.
  • Sometimes there are random StackOverFlow exceptions too, on methods that are not called recursively.

The move from 32 to 64 bit made it a little better, but not really solved the problem. The app runs with no problem on macOS. My guess is that there are memory leaks somewhere in the windows framework and if the app gets out of memory, the crashes occure. Now I want to go to Windows HIDPI and this will need even more memory.

What do you think, would be the best way to solve this?

  • Open a Feedback case? In this case I have to send my complete source code to Xojo (only the code without resource files is 40MB). And I don’t have steps to reproduce the errors.
  • Contact the Xojo Support directly? Maybe they know a solution.

PS: You can download and try the app here if you want: https://www.fishbeam.com/software/?item=goldfishBeta&system=windows

What debugging have you tried? - windows event viewer? sysinternals dbgview? something else? logging in your own code? - that could point you in the direction of the problem.

Write a little helper app that you run along side goldfish that just writes logs to a database and have goldfish send debug logs of all interactions to that program via an IPCSocket. When goldfish starts and you already have a start logged in the database without a stop message logged then you know a program ending event happened that wasnt planned at which point you can ask the user to report the problem, show them the anonymous data that will be submitted, encrypt it and send it back home. If a start and stop message was logged, everything went ok so you can purge the last run’s log data and start fresh. Log everything, start with entering/leaving events/methods etc. if you can narrow things down then increase the logging in certain areas until you can find a repeat event or a pattern.