10
$\begingroup$

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?

$\endgroup$
  • 2
    $\begingroup$ 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. $\endgroup$ – halirutan Jan 2 '13 at 4:10
  • $\begingroup$ 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. $\endgroup$ – halirutan Jan 2 '13 at 4:13
  • $\begingroup$ I use KDE desktop. $\endgroup$ – goodluck Jan 2 '13 at 4:57
  • $\begingroup$ And can you debug what Qt libraries are use? If not, you can come to chat and I help you. $\endgroup$ – halirutan Jan 2 '13 at 5:31
14
$\begingroup$

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
| improve this answer | |
$\endgroup$
4
$\begingroup$

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!

| improve this answer | |
$\endgroup$

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