|
|
Home » U++ TheIDE » U++ TheIDE: Other Features Wishlist and/or Bugs » wierd segmentation fault when execute theide
wierd segmentation fault when execute theide [message #8141] |
Mon, 12 February 2007 16:33 |
rodchang02
Messages: 1 Registered: February 2007
|
Junior Member |
|
|
My platform is Gentoo Linux x86, and the version of Ultimate++ is 2007.1 beta3
When I execute theide as a root, everything goes fine.
However, if I execute it as general user, it goes to segmentation fault.
I used the gdb to check this problem and it appears
Starting program: /usr/bin/theide
(no debugging symbols found)
Failed to read a valid object file image from memory.
[Thread debugging using libthread_db enabled]
[New Thread -1215047488 (LWP 20873)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1215047488 (LWP 20873)]
0xb7dcec55 in XftCharExists () from /usr/lib/libXft.so.2
Since I am new, I can't figure out what's going on.
Any help would be appreciated.
|
|
|
|
|
|
|
|
|
|
Re: wierd segmentation fault when execute theide [message #9594 is a reply to message #8141] |
Fri, 18 May 2007 16:11 |
tomek
Messages: 1 Registered: May 2007
|
Junior Member |
|
|
Hi,
I have very simlar error on my gentoo. I made some debug and here is result:
file: upp-2007.1/uppsrc/Draw/DrawTextXft.cpp
funciton: static bool sCheckComposed(const char *face)
XftFontOpen() sometimes cannot open font, (in my case it is "ProFont" font) then it returns NULL. There is no checking so invalid pointer is used in XftCharExists() function.
Im not sure about logic of this function, but it should look like this to avoid segmentation fault:
static bool sCheckComposed(const char *face)
{
XftFont *xftfont = XftFontOpen(Xdisplay, Xscreenno,
XFT_FAMILY, XftTypeString, (char *)face,
XFT_PIXEL_SIZE, XftTypeInteger, 20,
(void *)0);
/// ---------
if( xftfont == NULL )
return false;
/// ---------
int n = 0;
for(int c = 0; c < 128; c++)
if(!XftCharExists(Xdisplay, xftfont, c + 256))
n++;
XftFontClose(Xdisplay, xftfont);
return n > 10;
}
Probably font which cannot be opened should not be either collected by Draw::InitPlatformFonts() function.
Could someone fix it and provide new ebuild ?
When upp will be available in "standard" gentoo-portage tree?
Thanks,
Tom
|
|
|
Goto Forum:
Current Time: Mon Jun 10 13:55:35 CEST 2024
Total time taken to generate the page: 0.01696 seconds
|
|
|