RuntimeErrors after upgrading to 15.68.8.7

Originally posted by mcpm on October 09, 2024

Hello,

I recently upgraded to the latest version of TestComplete, and unfortunately, I’m experiencing issues. I’m still facing a RuntimeError originating from TestComplete’s native functions (I’m using it with Python scripts). The errors occur with functions like Log.Message, Log.AppendFolder, and others. However, the problem is quite random, as it’s not always the same line of code that fails. As a result, I’m unable to execute any tests at the moment and will need to downgrade to the previous version.
Is anyone facing this problem as well?

Originally posted by rraghvani on October 09, 2024

If you’re facing an issue after upgrading TC, then it’s worth opening a ticket via https://support.smartbear.com/testcomplete/message/

Originally posted by mcpm on October 09, 2024

Yes, that’s probably how it ends, but before that, I just wanted to know if anyone else has seen this as well.

Originally posted by rraghvani on October 09, 2024

Are you calling any third-party Python libraries?

Originally posted by mcpm on October 09, 2024

Yes, I am. We’ve been doing this for a long time, nothing has changed in this regard (same libraries as always). Is that any problem?

Originally posted by rraghvani on October 11, 2024

Yes, see https://support.smartbear.com/testcomplete/docs/scripting/specifics/python.html

Originally posted by mcpm on October 11, 2024

Yes, I know this article. If I added a new library now and it didn’t work, I would understand. The problem is that something that has worked for years has stopped working after this upgrade. Additionally, so far there is no evidence that it’s related to these 3rd party libraries; the error is not coming from them.
Anyway, I reported a ticket.

Originally posted by rraghvani on October 11, 2024

I don’t know if the latest version of TC, includes an updated version of Python core library files, which has now caused it not to work.

Originally posted by Muhammet_KAYA on October 30, 2024

I have the exact same issue. Testing a desktop application. Using python for scripts. Runtime error happens on TestComplete native functions.

Originally posted by Emilie on January 17, 2025

Did you get a solution for this problem? I am in 15.71.4.7 and have the same problem on test wich where usually working before upgrading

Originally posted by mcpm on January 21, 2025

Unfortunately, I did not. I’m still in contact with tech support, but things are not going very well. We are still forced to use version 15.67, the last version without these problems. However, this is valuable input for me (sorry :blush:) because it shows once again that this is not just our problem.

Originally posted by Emilie on January 21, 2025

ok thank you i opened an ticket too

Originally posted by MiguelAlvarez on March 05, 2025

Yes me too.

Originally posted by moonlight on July 25, 2025

Did anyone find the workaround or solution?

This issue is still exists in 15.74 version.

Originally posted by mcpm on September 24, 2025

Unfortunately, no - we’re still stuck with version 15.67.

Originally posted by moonlight on September 24, 2025

I found a simple workaround.

Just create an OnStartTestEvent function, hook it up to TestComplete’s OnStartTestEvent, and add this line inside:

gc.collect()

Don’t forget to put import gc at the top of your module.

What this does: OnStartTestEvent is triggered right at the start of the test run, so calling gc.collect() there forces Python’s garbage collector to clean up memory before your tests begin.

Originally posted by mcpm on November 04, 2025

Hello,

What are your experiences with this workaround so far?
To be honest, I’m a bit hesitant to add this line to our codebase — our project is quite large.
On the other hand, staying stuck on the old version isn’t ideal either, and it seems unlikely that a fix from the development team will arrive anytime soon…