Mathematica renders fonts incorrectly in Hardy

Bug #197163 reported by scarecrow on 2008-03-01
48
Affects Status Importance Assigned to Milestone
Ubuntu
Undecided
Unassigned
xorg (Ubuntu)
Undecided
Unassigned

Bug Description

Mathematica 6.0.1 and 6.0.2 are unable to properly render the font in code cells when running in Hardy. In Gutsy, both versions work fine. Under Hardy, the letters are rendered in the same color as the background. For example, if you type the word Plot in an input cell, and then choose Format->Options inspector, Global and change the background of the document to say blue, the word Plot then appears in white (the default background color). Starting a new input cell and again typing Plot, the letters are no longer visible - in fact they are in blue. This effect occurs with or without compiz and independently of the chosen font.

Also, the following error messages appear on the console:

X Error of failed request: RenderBadPicture (invalid Picture parameter)
  Major opcode of failed request: 154 (RENDER)
  Minor opcode of failed request: 7 (RenderFreePicture)
    Picture id in failed request: 0x320588a
Serial number of failed request: 224702
  Current serial number in output stream: 224704

X Error of failed request: BadMatch (invalid parameter attributes)
  Major opcode of failed request: 154 (RENDER)
  Minor opcode of failed request: 4 (RenderCreatePicture)
  Serial number of failed request: 224987
  Current serial number in output stream: 224990

:: Solution ::
Upgrade to Mathematica 6.0.3

Are you running compiz? Do you see any error messages on the console? I get some blank windows with compiz & nvidia, and have encountered problems with intel. Try using '-defaultvisual' option for mathematica to see if it helps.

Changed in xorg:
status: New → Incomplete
scarecrow (bray) wrote :

This effect occurs with or without compiz. There are error messages in console, but I get the same error messages under Gutsy and things work fine there.

Regarding compiz and extra kernel windows, if you open Option Inspector, Window Properties, Window Frame and change it from "Normal" to "Generic", the extra windows will not appear when using compiz anymore.

scarecrow (bray) wrote :

Some more information relative to this problem. By experimentation with Mathematica on Hardy, the following seems to be the case. Mathematica has two types of cells, text cells and input cells, the latter for entering Mathematica commands. If one chooses Format->Text for a text cell, all characters typed in to appear as one would expect. However, for an input cell, letters are rendered in the same color as the background. For example, if you type the word Plot in an input cell, and then choose Format->Options inspector, Global and change the background of the document to say blue, the word Plot then appears in white (the default background color). Starting a new input cell and again typing Plot, the letters are no longer visible--in fact they are in blue.
I have reported this problem to Wolfram support; their reply was that they are not interested in examining the problem until Hardy is released.

atreju (atreju-tauschinsky) wrote :

I can confirm this bug on my current hardy install (all updates as of march 15).
I am on 32 bit, interestingly enough also running fglrx on an mobility X1600, but as the OP also tried the open source drivers this does not seem to be the problem.
Starting mathematica from a terminal I get error messages like this:

X Error of failed request: RenderBadPicture (invalid Picture parameter)
  Major opcode of failed request: 157 (RENDER)
  Minor opcode of failed request: 7 (RenderFreePicture)
  Picture id in failed request: 0x4200035
  Serial number of failed request: 34814
  Current serial number in output stream: 35113

X Error of failed request: BadMatch (invalid parameter attributes)
  Major opcode of failed request: 157 (RENDER)
  Minor opcode of failed request: 4 (RenderCreatePicture)
  Serial number of failed request: 29745
  Current serial number in output stream: 29748

Just tried the suggestion above: running

mathematica -defaultvisual

solves this problem for me!

Many thanks!

Timo Aaltonen (tjaalton) wrote :

The bug is in Mathematica and we can't fix that. Just use '-defaultvisual' until Mathematica is fixed.

Changed in xorg:
status: Incomplete → Won't Fix
Joseph Smidt (jsmidt) wrote :

Just wanted to confirm this problem still exists 2 days before the final release. Though I know it is more a Mathematica issue, I still wanted to report it in case it is helpful.

Mathematica is not rendering properly in Hardy. I get this error:

X Error of failed request: RenderBadPicture (invalid Picture parameter)
  Major opcode of failed request: 155 (RENDER)
  Minor opcode of failed request: 7 (RenderFreePicture)
  Picture id in failed request: 0x3200035
  Serial number of failed request: 12017
  Current serial number in output stream: 12252

Running Mathematica using this command:

mathematica -defaultvisual

allows things to work.

c_t (chefturner) wrote :

Are you shure, this is a mathematica issue? Everything worked just perfectly until I upgraded from gutsy to hardy (beta)!!!

mathematica -defaultvisual

is a workaround, that's true. But with that switch mathematica will use the ugly fonts that it used in earlier versions (e.g. 5.2 ) and not the nicely anti-aliased Courier-font that mathematica 6 was using in gutsy! Wasn't there any change in Hardy that this could be related to?

Bartek (tschew) wrote :

I get the same problem, compiz or not makes no difference (except for the extraneous windows one gets with compiz.) I'm attaching a screenshot. This is on an intel g35 using the intel graphics driver, compiz is turned off. Installing the t1-xfree86-nonfree (IBM Courier font) package makes no difference.

first line: input as it is
second line: selected input as it is to make it visible
third line: changed the font to bitstream vera sans

Nezard (drazen-zubovic) wrote :

Well I can also confirm the problem with Hardy and Mathematica 6.0.1.
I was waiting for the official release of Hardy to be launched, hoping that this bug would fixed by then - but it is still there.

In my opinion this could NOT be a Mathematica problem, for the program started to misbehave only after I updated from Gutsy. If Mathematica is working with Gutsy flawlessly, it should also work with Hardy the same way. BTW I am not using compiz at all and did also not change anything (willingly) during upgrade.

Another observation is that Hardy release also brings another font bug with its Gnome Terminal. Initially the Terminal comes detached from the settings you are likely to make under Appearance/Fonts. Only after changing settings in /etc/fonts/conf.d the previous (Gutsy) expected functionality is restored.

yangli (yangli320) wrote :

I just got the same problem with Mathematica 6.0.1. It worked fine on Gutsy, but not on Hardy. If you select your input, then you can see it. It looks like the color of the input text is white. I tried to change the color to black but nothing changes. Now the only way working is use

mathematica -defaultvisual

The font looks ugly but it works.

Nezard (drazen-zubovic) wrote :

What do you have to reinforce this statement?
The problem is multiply attested and most obviously always related to the fresh installation or upgrade of Hardy. Nobody experienced the same problem under Gutsy.

Changed in xorg:
status: Won't Fix → Confirmed
binnaeus (binnaeus) wrote :

I confirm the problem. Upgraded from Gutsy to Hardy and quality of fonts in Mathematica (6.0.1) degraded considerably. I use compiz, and the problem is there with or without it. I've also noticed that fonts on Firefox and Adobe have somewhat changed. Sounds like something global that changed with the upgrade rather than something related to Mathematica. I wonder if anyone faced the same with Mathematica 6.0.2.

Nikolaus Rath (nikratio) wrote :

scarecrow, have you heard anything from Wolfram support, now that Hardy is released?

I tested with Mathematica 6.0.2 and it suffers from the same problem.

Nikolaus Rath (nikratio) on 2008-04-27
description: updated
scarecrow (bray) wrote :

I have not heard anything recently from Wolfram. About a month ago their support group sent me an email that the issue had been handed over to the developers. For now I am using the mathematica -defaultvisual command to start mathematica, this works although as others have observed, the fonts are rather ugly. I will push on them again with a link to all these comments (I think I did that before) and see what happens.

Todd Johnson (johnson-todd) wrote :

I'm seeing the same problem. I'd also like to join the chorus of voices curious about how we know it's a Mathematica bug, rather than a Gnome/Hardy/X bug. I'm 100% ready to believe that it's true, but it would be nice to hear the evidence. Especially because, if someone is going to point the Wolfram developers here, I'm sure that information would be useful to them.

Nikolaus Rath (nikratio) wrote :

Note that the same problem occurs if Mathematica runs on Gutsy but connects to an X server on a different machine running Hardy. So there really seems to be some communication problem (because connecting to a Gutsy X11 server works fine)

murphy.md (murphy-md) wrote :

I can also confirm this on Hardy with Mathematica 6.0.2, and also reiterate that it worked without problem on Gutsy (why oh why did I upgrade?).

Anyway, I also noticed that one can instead of using -defualtvisual, you can also disable the Double Buffer option in Notebook Options >> Private Notebook Options, but I don't think this is an improvement.

It would be interesting to hear also what hardware this happens on. I am using a Intel X3100 graphics on a 965 mobile chipset.

Art (grenander) wrote :

I don't get the X Error messages on Hardy in upgrade from Gutsy on an amd64. I do get them on a 32-bit laptop in the same upgrade, but I also got them when on Gutsy and had to use -defaultvisual. On the 32-bit machine, I have the disappearing text problem described here which I was able to fix by modifying /etc/fonts/conf.d/10-* to the correct ones for my machine. Maybe the disappearing font issue is not a Mathematica problem, at least not entirely.

But on both machines, I can confirm the error that the Courier (?) Input font is not antialiased properly even with changes to /etc/fonts. But I noticed that it also not aliased on firefox when browsing through the Mathematica online documentation. Can anyone else confirm this? They seem to be both screwed up in the same way. I don't remember it being screwed up on Gutsy with both Firefox 2 or 3b4.

The site is:

http://reference.wolfram.com/mathematica/guide/Mathematica.html

murphy.md (murphy-md) wrote :

The link you gave looks fine to me. But I'm interested in what you mean when you say you were able to fix the disappearing font issue "by modifying /etc/fonts/conf.d/10-* to the correct ones for my machine".

Art (grenander) wrote :

I meant if you browse around the documentation in Firefox, the In[] and Out[] elements are pixelized in Firefox similarly to the Mathematica notebooks for me, for example, in:

http://reference.wolfram.com/mathematica/ref/List.html

Other fonts are hinted, others are antialiased properly. I thought maybe the problems were related.

There is some issue in Hardy which I don't understand with the defaults in /etc/fonts/conf.d overriding user set defaults (as through System->Preferences->Appearance). So for me, the defaults were wrong and were messing up gnome-terminal as well. When I changed these as well as adding an ~/.fonts.conf, the disappearing fonts were fixed.

For example, try deleting /etc/fonts/conf.d/10-* and create ~/.fonts.conf with your hinting, antialiasing and subpixel rendering settings and see if that helps (and restart X). I used this howto:

http://wiki.archlinux.org/index.php/Xorg_Font_Configuration

Tom Kalvoda (kalvotom) wrote :

Hi!

I have probably related problem on xubuntu (hardy). Although, i don't get the error in console mentioned above. Just when I use Format -> Text, or Input, the fonts are messed up (no antialiasing/hinting whatever). But, when I manually select some different font for these cells, then they are displayed correctly. And yes, in Firefox they look the same (as somebody pointed out)...

IMHO this is not Mathematica-related problem - on Ubuntu Gutsy everything was just beautiful (how I was lucky that the ugly motif of Math. 5 is gone.... and now this!). I have somewhere backup of gutsy, so I will try to compare the X configuration.

Tom

Karen Bindash (karenbindash) wrote :

This problem has been seen on Solaris Express Community Edition build b87 too. Starting Mathematica with -defualtvisual, again solves it, although editing the last line of /usr/local/bin/mathematica and adding the option there means you dont have to remeber to do it.

Data (ubuntuaddress) wrote :

I am also experiencing this problem.

A workaround seems to be:

mathematica -defaultvisual

(from: http://sudan.ubuntuforums.com/showthread.php?t=710418)

Art (grenander) wrote :

I can confirm prior posts that 'mathematica -defaultvisual' does not solve the problem that fonts are not properly antialiased.

Attachment show example of some differences, left is Hardy, right is Gutsy.

Art (grenander) wrote :

Another example of left, Hardy, right Gutsy attached.

These images are the same with and without -defaultvisual.

Tom Kalvoda (kalvotom) wrote :

I am confused:

If I edit my ~/.fonts.conf as in attachment, then:

Input cells in Mathematica are antialiased, but Input cells in Firefox (e.g. here http://reference.wolfram.com/mathematica/ref/List.html) are ugly.

I did not figure how to achieve similar result for the Text cells. Furthermore, If I choose manually some particular font in Mathematica (Format -> Font) then everything works as it should...

It is really messed up :-).

Tom Kalvoda (kalvotom) wrote :

ad the -defaultvisual option: This has no effect on this problem whatsoever.

anu (chandran-gmail) wrote :

In addition to the font issue I have another (related?) problem with the graphics in Mathematica 6.0 with hardy.
The Frame labels in the graphics display are garbled (see attached figure). This used to be fine in Gutsy, also when I open an old notebook in hardy the figure is displayed properly (the figure was generated in Gutsy) till I select the graphics object, at which point the font gets garbled. Also -defaultvisual option has no effect on this behavior. This bug was reproduced both on Ubuntu and Kubuntu (KDE 3.5). With KDE 4, mathematica was showing fonts in the same color as the background which could be rectified with the -defaultvisual option but the graphics font problem persisted.

anu (chandran-gmail) wrote :

In addition to the font issue I have another (related?) problem with the graphics in Mathematica 6.0 with hardy.
The Frame labels in the graphics display are garbled (see attached figure). This used to be fine in Gutsy, also when I open an old notebook in hardy the figure is displayed properly (the figure was generated in Gutsy) till I select the graphics object, at which point the font gets garbled. Also -defaultvisual option has no effect on this behavior. This bug was reproduced both on Ubuntu and Kubuntu (KDE 3.5). With KDE 4, mathematica was showing fonts in the same color as the background which could be rectified with the -defaultvisual option but the graphics font problem persisted.

murphy.md (murphy-md) wrote :

Maybe I'm being an idiot, but aren't the in[] and out[] lines on the Wolfram page gif images? And so I don't think that my font setup has anything to do with this.

murphy.md (murphy-md) wrote :

Things somewhat improve if I put the following in my ~/.fonts.conf

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">

<fontconfig>
<!-- Enable sub-pixel rendering -->
<match target="font" >
        <edit mode="assign" name="rgba" >
                <const>rgb</const>
        </edit>
</match>

<match target="font" >
        <edit mode="assign" name="hinting">
                 <bool>true</bool>
        </edit>
</match>

<match target="font" >
        <edit mode="assign" name="hintstyle">
                 <const>hintfull</const>
        </edit>
</match>

<match target="font" >
        <edit mode="assign" name="antialias">
                <bool>true</bool>
        </edit>
</match>

<match target="pattern" name="family" >
        <test name="family" qual="any" >
                <string>Courier</string>
        </test>
        <edit mode="assign" name="family" >
                <string>Courier New</string>
        </edit>
</match>

<!-- Location of local fonts -->
<dir>~/.fonts</dir>

</fontconfig>

The killer is replacing Courier with Courier New. I believe that this shows that it is somehow a problem with Hardy, in that the fonts have been configured differently from Gutsy.

c_t (chefturner) wrote :

hey murphy: I can confirm both of your statements!
1. The not-anti-aliased stuff on the Wolfram-page are gif-images which has nothing to do with the font-setup!
2. Adding the last <match>-rule to my ~/.fonts.conf improves things a bit. However I had the Impression that the old Courier font in gutsy was looking still a bit nicer than Courier New ... So still I'd love to use anti-aliased Courier font again in hardy!

Tom Kalvoda (kalvotom) wrote :

murphy, c_t: you are right, they are really gif images. Thank you for making that point!

murphy.md (murphy-md) wrote :

Even with the font substitution, I get errors when viewing the documentation where italicised fonts are used. I don't know what font this is, so I don't know how to replace it.

yy2kk (kangyu29) wrote :

In addition to the font issue I have another (related?) problem with the graphics in Mathematica 6.0 with hardy.
The Frame labels in the graphics display are garbled (see attached figure). This used to be fine in Gutsy, also when I open an old notebook in hardy the figure is displayed properly (the figure was generated in Gutsy) till I select the graphics object, at which point the font gets garbled. Also -defaultvisual option has no effect on this behavior. This bug was reproduced both on Ubuntu and Kubuntu (KDE 3.5). With KDE 4, mathematica was showing fonts in the same color as the background which could be rectified with the -defaultvisual option but the graphics font problem persisted.

I confirm anu's post. I also have this problem with framelabel on the y axis.

Also, I have the antialias problem as well. My mathematica can start in compize without problem except it starts with two more empty windows.

yy2kk (kangyu29) wrote :

If I save the notebook/plot to pdf/eps file, it then will be perfect both on the antialias and framelabel cases. Please see the attachment.

anu (chandran-gmail) wrote :

Changing the Font of the labels seems to fix the garbled text issue. I tried changing font to Helvitia and Courier New and both works. The font is still aliased though. Also adding to yy2kk's comment, saving to pdf/eps seems to display everything properly, but importing the eps to other programs like ooimpress, seems to garble the text again.

Tom Kalvoda (kalvotom) wrote :

So, I got the font rendering right now. It seems that the version of Qt libraries supplied by Mathematica are incompatible with Hardy. This procedure worked for me:

1) Make sure you have libqt4-core and libqt4-gui installed (use synaptics or aptitude),
2) remove (delete or backup somewhere) these files:
PathToMathematica/SystemFiles/Libraries/Linux/libQtCore.so.4
PathToMathematica/SystemFiles/Libraries/Linux/libQtGui.so.4
where PathToMathematica is typicaly /usr/local/Wolfram/Mathematica/6.0
(Substitute Linux-x86-64 for Linux if needed.)

Notes:
1) I deleted ~/.fonts.conf, so fonts are set up as on a clean install of Hardy.
2) If you remove only one of these files mentioned above, then Mathematica crashes.
3) I have noticed another bug - which brought me to the idea that our problems are not only font-related - when I tried to print a notebook (File -> Print) then there were no printers in the drop down menu (any one else can confirm this?)! This issue is also solved by the procedure suggested above.

Hope it helps.

scarecrow (bray) wrote :

Tom, thank you for the discovery. I followed your suggestions and now everything seems to be working fine--including the printing problem which I had not noticed before. I have notified <email address hidden> about this, as I had reported the problem to them earlier.

murphy.md (murphy-md) wrote :

For people who report multiple windows opening under Compiz, I fixed this problem with the option Notebook Properties >> Window Properties >> WindowFrame to "Generic" (just search for the option WindowFrame).

I can also confirm that the procedure suggested by Tom Kalvoda works for me in Hardy 64bit with Mathematica 6.0.2.

anu (chandran-gmail) wrote :

Can confirm that Tom's solution works.
Thanks a lot Tom.. and every one else...

Art (grenander) wrote :

Thanks Tom! You're a genius. I can confirm that this fixes the font issues. It also fixes issues with blocky fonts I had in printed output which I also had in Gutsy. That's a huge help.

I found deleting the libQt files in the mathematica distribution and linking to the libQt files (.so.4) in /usr/lib also works. If I didn't replace them, the printing box came up with Qt widgets rather than Gnome widgets. It also defaulted to printing to file rather than to Cups. Maybe Tom this will solve your printing problem.

Tom Kalvoda (kalvotom) wrote :

Art> Yes the replacement solves the printing problem. The linking is probably equivalent to simple delete, since if Mathematica does not find the libraries in its folder, then it tries to load libraries provided by the system.

Nikolaus Rath (nikratio) wrote :

Closing this bug because it is a Mathematica bug that can be fixed by replacing the QT libraries shipped with Mathematica by those provided by Hardy.

Changed in xorg:
status: Confirmed → Invalid
yy2kk (kangyu29) wrote :

Thank you Tom, Thank you murphy.md. Now my mathematica works like a charm!

jackdyson31 (jackdyson31) wrote :

Hi Tom thankyou very much for all the research into this problem - I use mathematica a great deal and well its just great you found the answer. Small curiosity for those running flgrx "ATI accelerated driver", does anybody else get 2 null mathematica window frames opening when using this driver? Also if running this driver one has to use the -defaultvisual flag or the X Error incompatibility messages swamp the launch terminal. With the previous solution (font substitution) I used to be able to click on the menu region of the empty windows and get rid of them that way. However with the correct Qt libraries for Hardy you can't get rid of the windows until you close Mathematica itself. Mathematica is expensive, and it should run consistently on Linux like it does with Windows, I wonder what Wolfram are going to do about this. Next week a representative of Wolfram visits my university and I think I will point this out to him. All the best to everyone for such a great effort ... Cheers

jackdyson31 (jackdyson31) wrote :

Excuse me guys I forgot to add that having .fonts.conf in the following form seems to double font resolutions generally (certainly in Mathematica, where I have simply removed the Courier substitution line from the previous version given above):

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">

<fontconfig>
<!-- Enable sub-pixel rendering -->
<match target="font" >
        <edit mode="assign" name="rgba" >
                <const>rgb</const>
        </edit>
</match>

<match target="font" >
        <edit mode="assign" name="hinting">
                 <bool>true</bool>
        </edit>
</match>

<match target="font" >
        <edit mode="assign" name="hintstyle">
                 <const>hintfull</const>
        </edit>
</match>

<match target="font" >
        <edit mode="assign" name="antialias">
                <bool>true</bool>
        </edit>
</match>

<!-- Location of local fonts -->
<dir>~/.fonts</dir>

</fontconfig>

drkirkby (david-kirkby) wrote :

I've put a few notes to work around some issues with Matheamatica on Solaris. It is probable that most are not an issue on linux, but this issue is affecting Solaris too, as someone else pointed out.

http://www.g8wrb.org/mathematica/

I get the feeling mma is less well tested on Solaris than Windows/Linux, so it is perhaps not surprising there are more bugs on Solaris.

One thing worth noting is that Matheamatica caches certain things, so if you crash it, the cache can be in an unstable state. -cleanstart tends to fix that.

I dont use Mathematica on Linux myself, but found this page when searching to find a solution to this issue.

sotiris (sotiriss) wrote :

Thank you Tom and murphy.md.

murphy.md (murphy-md) wrote :

jackdyson31, I think I have already pointed out the fix for the mutiple windows under compiz in my post above.

https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/197163/comments/40

jackdyson31 (jackdyson31) wrote :

Hi murphy.md, excuse me for the oversight, yes indeed its ok now and cheers for pointing it out again.

yy2kk (kangyu29) wrote :

new problem raised because of remove Qt files.

Now, I find that if I try to add a kernel from "kernel configuration options", the mathematica crashes. And the error message as bellow.

/usr/local/Wolfram/Mathematica/6.0/SystemFiles/FrontEnd/Binaries/Linux/Mathematica: symbol lookup error: /usr/local/Wolfram/Mathematica/6.0/SystemFiles/Libraries/Linux/libQt3Support.so.4: undefined symbol: _ZN14QUnicodeTables8categoryEj

Can anyone confirm this?

atreju (atreju-tauschinsky) wrote :

yes, same thing happening here, so I can confirm it. but I guess it should be a different bug.

Tom Kalvoda (kalvotom) wrote :

Yes you are right, work around is:

remove /usr/local/Wolfram/Mathematica/6.0/SystemFiles/Libraries/Linux/libQt3Support.so.4

(Notice that also libQt3Support.so.4 is provided by hardy - package libqt4-qt3support - so make sure you have it installed... I am not sure if it is installed implicitely or you have to do it manualy)

Wolfram should release some patch, or something, this is really annoying... Soon there will be problem that can not be solved this way :-).

Cheers

yy2kk (kangyu29) wrote :

Thanks again Tom, I suppose I should know the "workaround" (sudo rm ... :-)) by now!

I just wondering, why we think this is a Mathematica problem since Mathematica was working fine in Gutsy, at least I didn't have to remove anything to have it working properly?

Tom Kalvoda (kalvotom) wrote :

Well, I am not an expert, but I think that it is Mathematica problem mainly because it installs some libraries, but it does not care if they are already installed in the system, nor if they are at least compatible. You should be or warned during the install that these libraries are duplicit and their versions do not match, and probably asked to decide which one you would like Mathematica to use...

Obviously if you are developing program for an open source system, which is in never ending development you should care about these questions (dependencies, etc.)

Tom Kalvoda (kalvotom) wrote :

And concerning Gutsy - probably the Qt libraries in Gutsy are older or compatible with those in Mathematica, so it is inessential which one are loaded. The fact that the libraries in Hardy are newer, is not bug in Hardy :-). But Mathematica does not handle this with care...

sjeerd (sjeerd) wrote :

Thanks alot everybody. The Qt workaround works great!

drkirkby (david-kirkby) wrote :

This looks to me like a Qt issue. In many ways it is safer if Mathematica used only its own libraries, and ignored any later ones which might be present on the operating system. But often there are advantages in using later versions - like on Solaris one cant get Mathematica working on an Intel CPU, whereas the library shipped with Mathematica will only run on an AMD CPU.

jackdyson31 (jackdyson31) wrote :

Hi everybody, has anybody had the update for 9th May 2008 and found the following messages at the command prompt when Mathematica is run ?

QObject: Do not delete object, 'unnamed', during its event handler!
QObject: Do not delete object, 'unnamed', during its event handler!
...

I am not sure but I think my Qt libs got updated on the 9th and this started happening, aliasing etc works etc, but these messages start appearing and I am not using the fglrx driver on this machine.

All the best...

jackdyson31 (jackdyson31) wrote :

I don't think its the Qt libraries upgrade, in changing mathematica back to the old libraries, I still get the same error, perhaps its something else. My advice is update with care ! This is a scary business. I referred this page to Wolfram technical support and I am waiting to hear back.

ineslina (nada-ange) wrote :

Hi everybody,
someone can help me about the windows pop up in mathematica.
I just tried the solution given in :
https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/197163/comments/40
it doesen't work for me..
______
how can i change the font size. in the ppreferences menu, the font size is 12, and I can't change it;
thanxxx.
---------
have a look to this :http://linuxexpert.wordpress.com/2007/08/25/how-to-install-mathematica-6linuxubuntu/#comment-161

larsno (kostuk-gmail) wrote :

I'm running 6.0.1 on a fresh Hardy install -
 If you have the environment variable:

export XLIB_SKIP_ARBG_VISUALS=1

and run 'mathematica' from a terminal, the fonts are fine without having to adjust the Qt libraries.

drkirkby (david-kirkby) wrote :

Where did you find the XLIB_SKIP_ARBG_VISUAL variable documented? Is that Mathematica specific, Linux specific, or some general Unix environment variable like PATH, HOME and TERM?

Tom Kalvoda (kalvotom) wrote :

larsno> It does not work for me.

Also, I observed another strange thing: On my computer if I remove the libraries, then the Print dialog is fine. But if the libraries are removed on my collegue's computer (also Ubuntu Hardy), then he gets the Print dialog without printers (WITH the libraries it is OK). At least the fonts are fine on both computers.

Tom Kalvoda (kalvotom) wrote :

I forgot to mention that I am using 6.0.2, so maybe this is the difference...

ineslina (nada-ange) wrote :

 murphy.md wrote on 2008-05-06: (permalink)

For people who report multiple windows opening under Compiz, I fixed this problem with the option Notebook Properties >> Window Properties >> WindowFrame to "Generic" (just search for the option WindowFrame).

I try this tuto but It' doesn't work for me...(I've hardy....)
..
somoneelse can have another solution
thanxxxx

joder (cricek) wrote :

larsno> If you have the environment variable:
larsno>
larsno> export XLIB_SKIP_ARBG_VISUALS=1

I think that should be XLIB_SKIP_ARGB_VISUALS (ARGB not ARBG). This works for me (debian user, same problem):

XLIB_SKIP_ARGB_VISUALS=1 mathematica

and I prefer it to

mathematica -defaultvisual

which also works for me. But I don't want to (re)move libraries. I found the variable here:
http://mathforum.org/kb/message.jspa?messageID=6222093&tstart=0

I was quite disappointed that Mathematica did not work out of the box with Hardy. I mean the problem was known before the official release of Hardy and the Ubuntu developers could have done something about that. It does not matter for the end user who is to blame (Ubuntu or Mathematica) but just that it works.

Bryce Harrington (bryce) wrote :

In the comments everyone says it's a Qt issue, so why is this filed against xorg?

Changed in xorg:
status: New → Won't Fix
Data (ubuntuaddress) wrote :

changed
"affects: Ubuntu invalid"
to
"affects: Ubuntu New"

I know it's not really a bug in Ubuntu, but the bugreport will just vanish in launchpad (at least show up nowhere) when it's set to invalid.
I hope this is OK for everyone?

I seem to have found a really strange bug.. there are several SVG files that come with Mathematica 6.0 in the directory,

/usr/local/Wolfram/Mathematica/6.0/SystemFiles/Fonts/SVG

Try setting one of these SVG files as the icon for Mathematica and your settings program immediately crashes. Worse, if you even open up this directory with Nautilus, it crashes.

Worst, if you copy one of these SVG files to another mundane directory, such as your home directory, Nautilus crashes when you navigate to that harmless directory!! It is as if these SVG files are kryptonite for Hardy Heron..

Does anyone know what this could be? Another file to delete? Confirmation of this bug?

(My system handles other svg files, often icons for programs, just fine.. just the Mathematica folder is radioactive.)

J Tanner (jtanner-wolfram) wrote :

Note - this is not an "official" Wolfram response, I just wanted to let you all know we're aware of the issues...

With that in mind, a few comments:

The original error messages are due to X11 providing an incorrect visual buffer to draw on - the 'export XLIB_SKIP_ARBG_VISUALS=1' command tells X to discard any composite visuals (which is what compiz and the like uses to do window effects) when we request a new visual. The reason we are getting a bad visual is complicated, but should be resolved by the next major release of Mathematica.

The extra windows are supposed to be hidden, and will go back into hiding with 6.0.3 (coming very soon).

The font rendering issues are related to Hardy's lack of some fonts we normally assume to be installed by default, namely a decent Courier and Times fonts. Some adjustments were made for 6.0.3, but if these do not resolve your issues, you may want to adjust the substitution rules (Option Inspector->Global Options->Menu Settings->FontSubstitutions) to point to fonts installed on your system.

On deleting/replacing libQt* - this is not recommended, as we ship a commercial version of the Qt library, which can potentially differ from the open source version. If it works for now, that's fortunate, but I would not consider that a permanent fix. We will be updating our shipping version of Qt with our next major release, most likely from the Qt 4 .3 version tree, as 4.4 is causing some compatibility issues (the above mentioned QObject warnings)

I'll be watching this thread if anyone has any additional questions or concerns, or you can email Tech Support (support.wolfram.com)

Jon

atreju (atreju-tauschinsky) wrote :

hardybug:
I suppose your bug is related to #196996 which is a bug in librsvg. It also happens with other svg's created in mathematica.
Please check if your bug is the same as #196996, and open a seperate bug report if that is not the case.

Timo Aaltonen (tjaalton) wrote :

People with font issues can try installing gsfonts-x11 (or msttcorefonts) to see if it helps.

Matthew D. Mower (mdmower) wrote :

Timo: In my case installing gsfonts-x11 made Mathematica command outputs go from bad to worse

J Tanner: Thanks for the update, I look forward to Mathematica 6.0.3.

Following J Tanner's advice, I changed my font substitution rules slightly (Option Inspector->Global Options->Menu Settings->FontSubstitutions).
Remove substitution: Courier New
Add substitution: Courier --> Courier New

While this isn't going to fix all of the problems mentioned in the thread so far (including the print dialog issue), the input and output of Mathematica commands render nicely.

Sebastian Urban (surban) wrote :

Mathematica looks in /etc/printcap for printers which is deprecated on Ubuntu. Just write the name of your printers (one per line) in that file and it should work.

@Wolfram:
Can you please switch to client side font rendering in Mathematica 7?
Server side font rendering is really deprecated and causes problems with forwarding over SSH/NX.

J Tanner (jtanner-wolfram) wrote :

Both printing and font handling are due for an update in 7.

Fibonacci (fibonacci-prower) wrote :

I wanted to confirm that the font display bug was present in my machine, and that removing libQtCore.so.4 and libQtGui.so.4 solves almost all issues. That is, fonts are now rendering fine, but I still am getting a lot of "X Error of failed request: RenderBadPicture (invalid Picture parameter)" messages on my console - which I don't remember ever getting under Gutsy.
Of course, "mathematica 2>/dev/null" would be a way to prevent my console from becoming cluttered, but I suspect something is still not right with fonts display.

murphy.md (murphy-md) wrote :

It would be nice to have a short list of the fonts that are most often getting screwed up in Hardy.

Is it just Courier and Times that are used by Mathematica?

John B. (jbuncher) wrote :

I don't mean to be too off-topic, but as mentioned previously you need /etc/printcap for Mathematica to find your printers. You can generate this in hardy by adding

Printcap /etc/printcap

to your /etc/cups/cupsd.conf file, and then restarting cupsys via

sudo /etc/init.d/cupsys restart

This might be useful for those that wish to restore printing without removing the Mathematica-provided qt libraries.

I am using Debian Lenny (xorg-server 1.4.2, xserver-xorg-video-intel 2:2.3.2, libqt4-core and libqt4-gui in version 4.4.0, Mathematica 6.01) and am suffering from the same (or a very similar) font rendering bug in Mathematica.

On my system all ordinary letters are invisible (sometimes very small parts are shown) in input, output and text cells. Subsections sections and so on display as usual. In addition most special letters, like lower greek or braces, are displayed just fine also in input, output and text cells. The problem seams to be that the text color is white (same as the background color), as the "invisible" letters can be made visible by selecting them with the cursor (this makes them display white on black) or by setting the background color using Format->Background Color. However it is not possible to change the text color via Format->Text Color. It always remains white.

During startup I get the error messages that are mentioned in the very first post. Launching Mathematica with the -defaultvisual parameter or setting the variable XLIB_SKIP_ARGB_VISUALS resolves the problem, but then the fonts from Mathematica 5.2 are used, which looks really ugly. Renaming the QT libs changes the overall look of Mathematica but did nothing about the font rendering bug.

BUT: I figured out a workaround while I was playing with xrandr!

The problem completely goes away after setting the screen resolution temporarily to some lower value, retuning to the original resolution and restarting mathematica. For me

xrandr --output LVDS --mode 1280x1024
xrandr --output LVDS --mode 1400x1050

does the job. After this procedure I am also able to change the text color using Format->Text. However Mathematica still outputs the same error messages as before.

Font rendering remains normal even if I suspend the computer or go into hibernation. Restarting the xserver makes the bug reappear.

It would be nice if someone could try if this is really the same bug.

Hope that helps!

Just after sending the above report I notices that smaller fonts, like super- or subscripts are sometimes still not rendered correctly. By changing the magnification Window->Magnification this can be resolved, but then normal text again becomes cluttered.

I'm confirming it due to the number of comments, but regarding comment #73 it's clearly a Mathematica issue and not a Ubuntu one (invalid would be more appropriate) and the next major release of Mathematica should resolve most of this issues.

J Tanner (jtanner-wolfram) wrote :

Just to let everyone know - We've isolated the issues to partly us, partly Qt (which is why removing our Qt libs did the trick for some). So we have compiled a more recent set of Qt libraries (from Qt 4.3.5), which can be available on request from Tech Support (support.wolfram.com), just mention you've been having issues with font rendering on Hardy.

Jon

natousayni (natousayni) wrote :

Same problem here. After an upgrade to Mathematica 6.0.3, everything went find... without any additional configuration.
++

Closing due to the last comment confirming this is a Mathematica issue.

Thanks for your help.

description: updated
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers