Runtime Error ... Failure condition: usageCount ???

Got this error in my application yesterday.

Failure Condition: usageCount

Any ideas what caused this? Is there a fix?


Accessing MySQL too frequently within a set time period — that was it for me anyway.

I have the same behavior currently but I can’t reproduce it reliably.
This case is closed but if you have something to add…

It has something to do with MySQL indeed.

This may be a bug with MySQL plugin not doing reference count of objects correct.

But I think we may need to have Xojo Engineer tell us what the condition in REALstring.cpp:207 is exactly.

Appears nothing can (or has) been done to rectify it so I wonder then how I could trap for that error so that the program would not crash?

In my case:

“Universal\REALstring.cpp: 134
Failure Condition: usageCount”

Database: MySQL/MariaDB
Standalone Web Application

If I run this command in my app, I get the usageCount error (Universal\REALstring.cpp: 134
Failure Condition: usageCount) :

UPDATE customers,transactions,txitems SET customers.lists = ‘qSHP Customersq’ where
transactions.customerid = customers.serial AND txitems.txid = transactions.serial AND instr(txitems.description,‘SHP’) <> 0

If I run it in SequelPro, it executes perfectly and reports the correct number of rows affected. Would be nice to see this resolved.

A small and reproducible test case on a bug report would help.

I get a ‘Universal\REALstring.cpp:122’, Failure Condition: usageCount error on Windows when using a ComboBox with autocomplete, each time you write a character a Valentina query is executed to show matches. I get the error after typing 2 or 3 character, the database has only a couple of records…so 2 or 3 subsequent Valentina queries cause this problem? Note that after displaying the error, my application freezes along with the whole system. I have to reboot the whole computer. No problem on Mac OS. I have seen that ComboBox on windows have lots of bugs awaiting for a fix, I wonder if one of those bugs is not calling the autocomplete function too often…

This often happens if the plugin developer releases the string object too often.
So if you know which command sequence causes this, the developer of the plugin can look for it.

It is weird that the app only shows this problem from MS Windows and especially from a ComboBox. Nowhere else. The app is huge, there are places where thousands of SQL queries are done flawlessly on DBs with over 20k records. In that precise case I can crash the whole computer with 2 simple queries and 2 records in the DB. Amazing…

I’m getting this without running any code – it happens when Xojo is starting up while loading my project:

Location: Universal/REALstring.cpp:130
Condition: usageCount

It then happens at other time such as when switching to a different window, dragging an asset into the project list, etc, and eventually Xojo crashes. This all happens without running my project at all. Using Xojo 2018.4 on macOS Mojave 10.14.2.

[quote=425291:@Jay Jennings]Location: Universal/REALstring.cpp:130
Condition: usageCount[/quote]

This suggests a plugin doing something wrong in designtime. It can be a Xojo plugin or a third party plugin that usually represents a Control. As was said a number of years ago, It is the locking or unlocking of a string, aka REALstring that goes wrong. To figure this out, you need to remove third-party plugins one by one and see what happens. My guess is that you see this on the windows platform? If you don’t have third-party plugins then it points to a Xojo plugin. That should then trigger Xojo engineers to ask you more of the same.