Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

Ubuntu 12.04 x86_64 kernel 3.2.0-35-generic Mathematica 9 linux version (x86_64) crashes with errors:

X Error of failed request: BadGC (invalid GC parameter)
Major opcode of failed request: 59 (X_SetClipRectangles)
Resource id in failed request: 0x0
Serial number of failed request: 2266
Current serial number in output stream: 2268

X Error of failed request: BadGC (invalid GC parameter)
Major opcode of failed request: 59 (X_SetClipRectangles)
Resource id in failed request: 0x0
Serial number of failed request: 2267
Current serial number in output stream: 2268

...

The above errors occur when I run command mathematica as a general user. It crashes before GUI is started. However, if I run it as root sudo mathematica, all work well.

Can someone fix this problem?

share|improve this question
2  
How good are you with the command-line? This answer suggests, that it is a problem with the wrong Qt-libraries. You could use ldd to find out which libraries are used but it's a bit of work. –  halirutan Jan 2 '13 at 4:10
    
Antoher thing: Which desktop-environment are you using? I use the classic gnome (otherwise I have the same system as you) and everything works fine. Have you tried to select a different one? You can do this at the login-screen. –  halirutan Jan 2 '13 at 4:13
    
I use KDE desktop. –  goodluck Jan 2 '13 at 4:57
    
And can you debug what Qt libraries are use? If not, you can come to chat and I help you. –  halirutan Jan 2 '13 at 5:31
add comment

2 Answers

Since this question was the only page I found on the Web that actually led to the solution of my problems with Mathematica 9.0 installation, let me summarize the steps I had to take to make it working on my x86_64 kubuntu desktop:

  1. I had to remove from /usr/local/Wolfram/Mathematica/9.0/SystemFiles/Libraries/Linux-x86-64 the libQt*.so.4 files (indeed I made backups). This solved the error "Qt issued a fatal error: Cannot mix incompatible Qt library (version 0x40704) with this library (version 0x40703)", but mathematica still crashed with other error.

  2. Then I put the prefix QT_GRAPHICSSYSTEM=native into the mathematica startup script and mathematica 9.0 now works.

Thanks to Mr. goodluck!

share|improve this answer
add comment
up vote 14 down vote accepted

Thank halirutan very much! It's really the problem of a setting for QT. Mathematica9 crashes when "systemsettings -> Qt Graphics System -> Raster" is selected. This changes the file ~/.kde/env/qt-graphicssystem.sh and hence the QT_GRAPHICSSYSTEM envirenment variable.

QT_GRAPHICSSYSTEM=native  mathematica   # work
QT_GRAPHICSSYSTEM=raster  mathematica   # crash
QT_GRAPHICSSYSTEM=opengl  mathematica   # work
share|improve this answer
add comment

protected by Community Sep 15 '13 at 13:56

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.