Using DBG() from inside a thread

Jules, I’ve been getting a lot of X errors that I couldn’t track down, then I noticed that they’re barely there in my Release build. I looked more closely, and it looks like there’s a strong, but not 100% correlation between DBG calls and the error, which is:

Error: X returned BadMatch (invalid parameter attributes) for Operation Unknown

Now these are my threads using Juce::Thread, and they’re doing X work using a separate X display connection.

Is the DBG code in the end doing anything that could trigger it?


Well, looking at the linux DBG code, it just does an fprintf, so can’t think why that’d be thread-unsafe…?

Me either, but it seems that when debugging something is triggering X server errors.

It doesn’t happen in the Release build. This is all in Code::Blocks on Arch Linux, BTW.

I hate to just ignore it, but trying to get a whole X debug build installed right now is equally unpalateable.


Well, I really can’t think of anything to suggest. I don’t claim to be much of an X expert, but why the windowing system would interact with a basic fprintf is a mystery…