Bombs in 2024R4.2 on innocent code lines

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?

https://forum.xojo.com/t/is-the-1st-symbol-found-in-the-debugger-part-of-2024r4-or/83179/5

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. :slight_smile:

Well, how do you get SQLDatabaseMBS constructor to crash?

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:

Is it possible that you are using preemptive Threads and have race condittions?

I have an App-level Timer to check if there is a new Security Certificate to download. This runs on once per hour.

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?)

Is it possible the Timer is touching the certificate while a preemptive Thread is touching it?

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.

maybe you like to open the preferences database on app open and then keep it open.
And use a mutex to only have one thread at a time use the database.

I have manually removed the App.Timer (in case it’s presence was an issue) and the problem persists.

maybe you like to open the preferences database on app open and then keep it open.
And use a mutex to only have one thread at a time use the database.

This is what I am doing. I open the App.PreferencesDB on startup and never close it.

Question: why are you posting on testers section? (This topic and the one about the waiting dialog)

Is there a reason not to show this information to non-testers?

1 Like

Because I didn’t notice the issues on the latest release 2024R4.1, but have noticed it in 2024R4.2.

2024r4.2 is already released and not a beta, that’s why I don’t understand why this is in Testers.

Anyway, any problem that is new should be reported.
Can you create a sample project that shows the problem in r4.2 that is not part of r4.1?

You are correct, and I apologise. I have been travelling for 3 weeks and noticed many updates, but assumed that 4.2 was still in beta.

No need, just seemed strange.
Also, I hoped that 2025r1 was already in beta to test :slight_smile:

1 Like

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.

2 Likes