Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to next message
rodchang02 is currently offline  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 #8144 is a reply to message #8141] Mon, 12 February 2007 20:08 Go to previous messageGo to next message
guido is currently offline  guido
Messages: 169
Registered: April 2006
Experienced Member

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


I can only guess.

Maybe a bogus font pointer passed to XftCharExists().
Depending on what fonts you have and how they are configured in /etc/fonts, upp might not be able to find a matching font and ends up with an unitialized pointer. That would be a bug.

LG Guido
Re: wierd segmentation fault when execute theide [message #8150 is a reply to message #8141] Mon, 12 February 2007 22:24 Go to previous messageGo to next message
ebojd is currently offline  ebojd
Messages: 225
Registered: January 2007
Location: USA
Experienced Member
I also use Gentoo and have not seen this problem. I'll email you off-list once I get the new source (rc1) compiled so we can figure out what the difference might be. I'll also look at throwing together an experimental ebuild.
Re: wierd segmentation fault when execute theide [message #8152 is a reply to message #8150] Mon, 12 February 2007 23:18 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
ebojd wrote on Mon, 12 February 2007 16:24


I'll also look at throwing together an experimental ebuild.



Actually, that would be great.

Mirek
Gentoo ebuild [message #8157 is a reply to message #8152] Tue, 13 February 2007 05:51 Go to previous messageGo to next message
ebojd is currently offline  ebojd
Messages: 225
Registered: January 2007
Location: USA
Experienced Member
OK... I've sat down to start writing the ebuild. Since rc1 does not appear to be up quite yet on sourceforge I'm starting with beta3.

I have the following questions that I'm pretty sure I know the answers to, but I'm going to ask anyway Wink

1) what is the distribution license? <GPL-2 LGPL-2>

2) what is the one line description for U++? <DESCRIPTION="Cross Platform Integrated Development Environment">

3) is http://www.ultimatepp.org/ the official homepage?

4) what is the default install directory? <I've temporially chosen /opt/upp>

5) should we have multiple slots (for version 602, 605...)? The question here is should we allow for multiple instances simultaniously?

Last I did a bit of hackage to the Makefiles. Could I get some reviews and comments before I post them? The first (top Makefile) is attached. The forum interface would only allow me to post one file at a time...


Re: Gentoo ebuild [message #8158 is a reply to message #8157] Tue, 13 February 2007 05:53 Go to previous messageGo to next message
ebojd is currently offline  ebojd
Messages: 225
Registered: January 2007
Location: USA
Experienced Member
Here is the second Makefile (from uppsrc/ide)...

Re: Gentoo ebuild [message #8159 is a reply to message #8158] Tue, 13 February 2007 05:55 Go to previous messageGo to next message
ebojd is currently offline  ebojd
Messages: 225
Registered: January 2007
Location: USA
Experienced Member
ps: The comments are rather simple but used to explained what changes I made. Once they are OK'ed I'll clean them up and submit.

Re: Gentoo ebuild [message #8160 is a reply to message #8158] Tue, 13 February 2007 06:23 Go to previous messageGo to next message
ebojd is currently offline  ebojd
Messages: 225
Registered: January 2007
Location: USA
Experienced Member
oops... The uppsrc/ide/Makefile was not the newest. The proper version uses "pkg-config gtk+-2.0 --cflags" to set CINC, etc. I have to get some sleep and will post a few changes tomorrow.
Re: wierd segmentation fault when execute theide [message #9594 is a reply to message #8141] Fri, 18 May 2007 16:11 Go to previous message
tomek is currently offline  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
Previous Topic: assembly variable idea
Next Topic: small bug - more a mite :)
Goto Forum:
  


Current Time: Fri Mar 29 10:27:24 CET 2024

Total time taken to generate the page: 0.01314 seconds