Operating System - HP-UX
1752662 Members
5615 Online
108788 Solutions
New Discussion юеВ

Re: Xrender cause memory fault

 
Rick Burge_3
Occasional Advisor

Xrender cause memory fault

Recently I added Xft, Xrender, fontconfig and freetype to my system (hpux 11.11, pa risc).

I had some applications (using QT) that were not displaying "pretty" fonts and we decided it was that anti-aliasing was not being done.

After doing the install and rebuilding the supporting libraries, apps have started issuing a memory fault core dump in Xrender.

I don't really have much to go on and am looking for some hints that may help unravel the problem.

Thanks,
Rick
5 REPLIES 5
Alessandro Pilati
Esteemed Contributor

Re: Xrender cause memory fault

Hi Rick...
too generic informations... you should try to analyze the coredump generated to find out what component is causing the fault.

Check this past forum:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=870452


Regards,
Alessandro
if you don't try, you'll never know if you are able to
Rick Burge_3
Occasional Advisor

Re: Xrender cause memory fault

This is what I get.

#0 0x77972eac in () from /usr/local/lib/libXrender.sl
#1 0x77973618 in () from /usr/local/lib/libXrender.sl
#2 0x7797fd3c in () from /usr/local/lib/libXft.sl
#3 0x779801b4 in () from /usr/local/lib/libXft.sl
#4 0x77980ac0 in () from /usr/local/lib/libXft.sl
#5 0x77983924 in () from /usr/local/lib/libXft.sl
#6 0x771c9b28 in loadEngine (script=Latin, fp=0x40010d40, request=@0x77ff39f4, family=0x40012250, foundry=0x4023c5b8, style=0x40257668, size=0x4012c418, encoding=0x4025e0f8, forced_encoding=false) at kernel/qfontdatabase_x11.cpp:1556
#7 0x771cd8a8 in QFontDatabase::findFont (script=Latin, fp=0x40010d40, request=@0x77ff39f4, force_encoding_id=-1) at kernel/qfontdatabase.cpp:1123
#8 0x7711612c in QFontPrivate::load (this=0x40010d40, script=Latin) at kernel/qfont_x11.cpp:411
#9 0x771bbcb0 in QFontMetrics::width (this=0x77ff3660, str=@0x77ff2d08, len=12) at kernel/qfont.cpp:2263
#10 0xd598 in Hello::paintEvent (this=0x77ff2c94, No.Identifier=0x77ff32a0) at /disk2_b/usr/local/qt/examples/hello/hello.cpp:75
#11 0x772878e4 in QWidget::event (this=0x77ff2c94, e=0x77ff32a0) at kernel/qwidget.cpp:4779
#12 0x7719a1a8 in QApplication::internalNotify (this=0x77ff2c48, receiver=0x77ff2c94, e=0x77ff32a0) at kernel/qapplication.cpp:2635
#13 0x77199a2c in QApplication::notify (this=0x77ff2c48, receiver=0x77ff2c94, e=0x77ff32a0) at kernel/qapplication.cpp:2523
#14 0x770f6cd0 in QETWidget::translatePaintEvent (this=0x77ff2c94, event=0x77ff2e7 at kernel/qapplication_x11.cpp:5637
#15 0x770ef404 in QApplication::x11ProcessEvent (this=0x77ff2c48, event=0x77ff2e7 at kernel/qapplication_x11.cpp:3490
#16 0x77112354 in QEventLoop::processEvents (this=0x40018a50, flags=4) at kernel/qeventloop_x11.cpp:192
#17 0x771b395c in QEventLoop::enterLoop (this=0x40018a50) at kernel/qeventloop.cpp:198
#18 0x771b3720 in QEventLoop::exec (this=0x40018a50) at kernel/qeventloop.cpp:145
#19 0x7719a4ac in QApplication::exec (this=0x77ff2c4 at kernel/qapplication.cpp:2758
#20 0xea1c in main (argc=1, argv=0x77ff274c) at /disk2_b/usr/local/qt/examples/hello/main.cpp:40
A. Clay Stephenson
Acclaimed Contributor

Re: Xrender cause memory fault

This is not going to be easy but it is doable. You need to download the source code for these tools + the source code for the libraries and compile/link them. You need to change the makefiles to use the -g option and no optimizing so that meaningful debug information is included with the object files. You then start the program and allow it to dump core and now use the debugger to do a stack trace. With the -g information, the debugger can actually pinpoint the offending line and file of source code. Often when these steps are followed, the problem goes away because compiling the code on the target machine fixes them.
If it ain't broke, I can fix that.
Rick Burge_3
Occasional Advisor

Re: Xrender cause memory fault

Ok I got the source and the results are that the Xrender lib fails on calls to LockDisplay.

Now a little more background which I failed to layout the first go around. And some more info since last posting.

The application is hosted on hpux 11.11. The host box in question is always remotely logged into. However I have discovered that if the box is remotely logged in from either a pc running reflectionX or another unix box the app runs fine. If I remotely log in from a linux box I have the problem. Xrender core dumps on the remote box when making the LockDisplay call. So it would appear that there is some sort of problem with what the xserver on the linux box is returning (just a guess).

The application in question is compiled with thread support. I compiled the xrender with thread support. I have more than one application that fails. Some in XRenderQueryFormats and some in XRenderCreateGlyphSet but always when the LockDisplay happens.

Your help is appreciated.
Rick Burge_3
Occasional Advisor

Re: Xrender cause memory fault

I have for the moment found enough of a work around. There is a problem with the display lock call. So while it messes with the multi threading I simply removed the display lock calls until I can figure out how to fix.