Runtime failure Windows

Hi all,
I’m seeing an intermittent runtime error with one of our Windows applications with the following message:

Common\objects.cpp 208
Failure Condition: eventCount >= hook

Any thoughts on what might be the cause or how I could debug?

You must report it. That’s an assertion for a condition the engineers protected with a message and that should not be occurring.

Once you open an Issue report, you start a conversation with the assigned engineer, he may have some ideas.

Please clear caches and try again.

That error comes when Xojo tries to run an event with an event index that is higher than the event table has entries.

We see it sometimes when you update a plugin and the cache is not cleared, so cached compiled code references an event that got a different index.

1 Like

Thanks Christian,

So what you’re saying is that it affects the compiled code. Is there any reason why it would manifest on some systems and not others? Ie, the systems are identical in hardware and software images.

Is there a way to catch and hide this error message or is this outside of our control?

it can happen if you install a new app over an old app and the old DLLs don’t get overwritten. Then event definition in a plugin DLL and the app are not in sync.

Thanks Christian

So in Windows if I drop a folder containing my app in a folder that already contains a folder of my app it asks me to overwrite.

Not knowing the intricacies of Windows, does this replace the whole folder? This is my standard practice.

No, windows does not replace the entire folder. It operates file by file. Obsolete files will remain. They will not be deleted.

My standard practice would always be to delete the existing folder first and then put the new one there.

2 Likes

Thanks all. Very interesting. Will give it a shot and report back.

How do I clear the cache Christian? Isn’t this what happens on startup when Xojo cleans up the plugins?

The preferences dialog has a button.

Also you can manually find the folders and trash them.

So the problem here was improper install of the app on the target machine? Not a compiler cache thing that should not exist at the target machine?

No. Unfortunately the problem still persists.
I can’t find the issue but it appears it only happens when MBS Bluetooth plugins are used and I’m receiving data from a couple of devices simultaneously. I was really hopeful that it was something simple like not copying files correctly but this doesn’t seem to be the case.

Well, now you have something. A guy had a similar crash receiving multiple connections from web. In his case things blown up as a stack overflow probably due to so many events at a pace Xojo could not handle. Something maybe got out of sync for your case too.