Unrelated event on the stack locks application

Hi, I have a problem driving me nuts. While I’m executing a sqlExecute in a timer event on a postgres database a totally unrelated shell.completed event is added upon the stack. And when this added event also tries to access the database the application locks up. Anyone who knows why this happens? I’ve tried in Xojo 2014 r1 and r3.1 on Macbook Pro/Yosemite.

well ,while a query runs, CPU time is yielded to other parts of your app.
That causes the sockets and shell classes to handle events.
You may need to detect that and run a timer from Completed event and do the work in timer a millisecond later.

Thanks, that worked, odd I haven’t stumbled upon that before, I have 800 different sql-calls in this app and don’t recall ever have seen this behavior. I thought sqlexecute always locked the main thread when called from there.

Well, first you could make a feedback case and complain about that behavior.
Maybe there is an easy solution.

Second you could try running timer from Completed event and do things shortly after.

Did you recently change which version of the IDE you are using? Perhaps we fixed a bug in how PostgreSQL plugin yields?

Perhaps this has an impact on the main thread.

PostgreSQLDatabase.MultiThreaded

@Christian Schmitz Yes, I did so, and the problem is solved. I was just worried about it happening elsewhere.

@Frederick Roller I tried setting multithreaded to false, but that didn’t went well in other parts.

@Greg O’Lone I’ve used mostly 2014r3.1 since last december iirc but haven’t done much work with this project in the past 1-2 years previous to that. So that could be the case.

Anyway, I think I can deal with it now. Thanks everybody!