I’ve been using Xojo 2024 Release 4.2 (64485) and it’s been going OK, but every so often I get a bomb on an innocent line (see below). Sometimes I relaunch and it works OK and sometimes it occurs consistently on the same innocent line.
I have never had bombs in my code until this release. Returning to Xojo 2024 Release 4.1 solves the issues, but I want to stay on the latest version.
All of these bombs occur in code accessing an SQLDatabaseMBS, so this might be a cause (I’m running the latest MBS 25.1 plugins).
How can I stop these bombs? Is there something I need to be looking for in my code to fix this?
Does this mean that the culprit is within SQLDatabaseMBS? Not sure I can do anything about that, so I might be forced to revert to Xojo 2024 Release 4.1 if @Christian_Schmitz can’t find the problem.
No, the debugger can only show a suspected or probable position in the code at such a moment.
I’m sure @William_Yu could explain this better than I could. A Xojo blog post on the topic by William would certainly be very interesting.
While bombs are indeed a new concept in Xojo release 4.2, the equivalent behaviour in 4.1 and earlier would be your app to crash (that’s what the bombs are supposed to catch). Thus, I’d logically expect there’s another difference in 4.2 that trigger the fault in the first place.
FWIW this is a Web App and the bomb is within a generic Method to connect to a Preferences SQLite database. Even setting the basic values before I even check if the database exists or can connect causes a bomb:
And you’ve made sure that the thread has exclusive access to required resources while it’s running? That absolutely (really absolutely) any resource in use by the thread will never be touched by anything else at the same time? (F.e. by using semaphores?)
I have no preemptive Threads. The Timer is defined as an App-level property. It is defined as a Timer and NOT a WebTimer. AFAIK there is no way to make this a preemptive Timer. I have turned off this Timer (commented out the App.CertificateUpdateTimer = New Timer code) and the issue persists.
Success, I tried using the older MBS-Xojo-Plugins250 with the latest Xojo 2024R4.2 and it ran fine ie no bombs!
But both MBS-Xojo-Plugins251pr1 and MBS-Xojo-Plugins251pr2 bombed with SQLDatabaseMBS calls. It seems something odd has crept into the latest MBS Plugins.