[X2Go-Dev] @Mihai: rebuild x2goclient for Mac OS

Mihai Moldovan ionic at ionic.de
Fri Feb 24 07:10:35 CET 2012


Hi Mike,


* On 23.02.2012 06:12 PM, Mike Gabriel wrote:
> I prefer quality!

Alright, here you go: http://www.ionic.de/x2goclient-3.99.1.0-release.dmg

I have removed most static linking (only libssh linked statically,
though I could change that too.)

Qt 4.7.4 is now shipped as a dynamic library framework.

Yes, 4.7.4, because I tried my best to build and use Qt 4.8.0, but ran
into a very weird bug.

After connecting to the server and hovering over the session list,
x2goclient would crash. However, the crash does not happen in x2goclient
but actually in Qt... more specifically, in this part of code:
(src/gui/image/qpixmap_mac.cpp)

 1.
    CGImageRef qt_mac_create_imagemask(const QPixmap &pixmap, const
    QRectF &sr)
 2.
    {
 3.
        QMacPixmapData *px =
    static_cast<QMacPixmapData*>(pixmap.data.data());
 4.
        if (px->cg_mask) {
 5.
            if (px->cg_mask_rect == sr) {
 6.
                CGImageRetain(px->cg_mask); //reference for the caller
 7.
                return px->cg_mask;
 8.
            }
 9.
            CGImageRelease(px->cg_mask);
10.
            px->cg_mask = 0;
11.
        }
12. [...]


Why? Because px->cg_mask is null in line 9. "But, line 4 already checks,
if px->cg_mask is not null", you may say. And so did I. But it seems
like there is some weird race condition due to multithreading.
I couldn't really figure the root cause out... tried to debug, but the
backtrace consists of 75 functions, mostly Qt and CoreFoundation/Cocoa
ones...  no joy to look into this. I have diffed the file in question,
only to find no code changes in the affected function.
Some people suggested looking for QPixmaps in the code, as they must
only be used in the main thread. I checked if the thread-IDs of the
corresponding functions match the main thread and everything looked
fine, so it's not "this" problem either.

Did anyone else test x2goclient with Qt 4.8.0 yet on Linux/Windows?

Anyway, as 4.7.4 is working fine, I'll stick to that for now and check
every now and then for patches or the like.

Ricardo, can you please check this version for me?

Best regards,


Mihai




-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4369 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.x2go.org/pipermail/x2go-dev/attachments/20120224/9e8a16e5/attachment.bin>


More information about the x2go-dev mailing list