10

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?

halirutan
  • 112,764
  • 7
  • 263
  • 474
goodluck
  • 605
  • 4
  • 12
  • 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 02 '13 at 04: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 02 '13 at 04:13
  • I use KDE desktop. – goodluck Jan 02 '13 at 04:57
  • And can you debug what Qt libraries are use? If not, you can come to chat and I help you. – halirutan Jan 02 '13 at 05:31

2 Answers2

14

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
Renan
  • 731
  • 9
  • 21
goodluck
  • 605
  • 4
  • 12
4

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!

user7666
  • 41
  • 1
  • 1