Segmentation fault on startup
On Sat, Sep 11, 2010 at 09:51:32PM +0100, James Lovejoy wrote:
Hi,
Fltk was compiled already with xft support.
OK, but are the fonts installed? -- Cheers Jorge.-
Hi, I managed to get a backtrace from GDB: #0 0x080ba0f4 in fltk::setfont(fltk::font*, float) () #1 0x080f0e9a in fltk::Widget::measure_label(int&, int&) const () #2 0x08051126 in UI::make_filemenu_button (this=0x813de58) at ui.cc:531 #3 0x08052691 in UI::make_panel (this=0x813de58, ww=780) at ui.cc:626 #4 0x08052e48 in UI (this=0x813de58, x=0, y=0, ww=780, wh=580, label=0x81110c4 "Dillo", cur_ui=0x0) at ui.cc:724 #5 0x08054fbb in a_UIcmd_browser_window_new (ww=780, wh=580, xid=0, vbw=0x0) at uicmd.cc:433 #6 0x0804f753 in main (argc=1, argv=0xbffffd34) at dillo.cc:334 James ----- Original Message ----- From: "Jorge Arellano Cid" <jcid@dillo.org> To: "Dillo mailing list" <dillo-dev@dillo.org> Sent: Saturday, September 11, 2010 10:21 PM Subject: Re: [Dillo-dev] Segmentation fault on startup
On Sat, Sep 11, 2010 at 09:51:32PM +0100, James Lovejoy wrote:
Hi,
Fltk was compiled already with xft support.
OK, but are the fonts installed?
-- Cheers Jorge.-
_______________________________________________ Dillo-dev mailing list Dillo-dev@dillo.org http://lists.auriga.wearlab.de/cgi-bin/mailman/listinfo/dillo-dev
James wrote:
I managed to get a backtrace from GDB:
#0 0x080ba0f4 in fltk::setfont(fltk::font*, float) () #1 0x080f0e9a in fltk::Widget::measure_label(int&, int&) const () #2 0x08051126 in UI::make_filemenu_button (this=0x813de58) at ui.cc:531 #3 0x08052691 in UI::make_panel (this=0x813de58, ww=780) at ui.cc:626 #4 0x08052e48 in UI (this=0x813de58, x=0, y=0, ww=780, wh=580, label=0x81110c4 "Dillo", cur_ui=0x0) at ui.cc:724 #5 0x08054fbb in a_UIcmd_browser_window_new (ww=780, wh=580, xid=0, vbw=0x0) at uicmd.cc:433 #6 0x0804f753 in main (argc=1, argv=0xbffffd34) at dillo.cc:334
If you edit dillorc to specify fonts that you have, does it work?
Changing all fonts to lucida gets rid of the warnings but it still segfaults. Sent from my iPod On 12 Sep 2010, at 17:17, "corvid" <corvid@lavabit.com> wrote:
James wrote:
I managed to get a backtrace from GDB:
#0 0x080ba0f4 in fltk::setfont(fltk::font*, float) () #1 0x080f0e9a in fltk::Widget::measure_label(int&, int&) const () #2 0x08051126 in UI::make_filemenu_button (this=0x813de58) at ui.cc:531 #3 0x08052691 in UI::make_panel (this=0x813de58, ww=780) at ui.cc:626 #4 0x08052e48 in UI (this=0x813de58, x=0, y=0, ww=780, wh=580, label=0x81110c4 "Dillo", cur_ui=0x0) at ui.cc:724 #5 0x08054fbb in a_UIcmd_browser_window_new (ww=780, wh=580, xid=0, vbw=0x0) at uicmd.cc:433 #6 0x0804f753 in main (argc=1, argv=0xbffffd34) at dillo.cc:334
If you edit dillorc to specify fonts that you have, does it work?
_______________________________________________ Dillo-dev mailing list Dillo-dev@dillo.org http://lists.auriga.wearlab.de/cgi-bin/mailman/listinfo/dillo-dev
James wrote:
Changing all fonts to lucida gets rid of the warnings but it still segfaults.
If you compile fltk with -g, does the backtrace reveal anything interesting? I don't immediately know that it would matter in this case since I didn't notice any relevant hardcoding in fltk, but just in case...do you know whether fontconfig is set up properly so that "sans" points to a font that you have?
Sent from my iPod
Is there a way to disable that advertisement?
Ok, I'll compile with -g this afternoon after school. I don't have fontconfig on the target system. Is it required? James On 13 Sep 2010, at 00:54, "corvid" <corvid@lavabit.com> wrote:
James wrote:
Changing all fonts to lucida gets rid of the warnings but it still segfaults.
If you compile fltk with -g, does the backtrace reveal anything interesting?
I don't immediately know that it would matter in this case since I didn't notice any relevant hardcoding in fltk, but just in case...do you know whether fontconfig is set up properly so that "sans" points to a font that you have?
Sent from my iPod
Is there a way to disable that advertisement?
_______________________________________________ Dillo-dev mailing list Dillo-dev@dillo.org http://lists.auriga.wearlab.de/cgi-bin/mailman/listinfo/dillo-dev
On Mon, 13 Sep 2010 02:06:52 -0400, James Lovejoy <jameslovejoy@tiscali.co.uk> wrote:
Ok, I'll compile with -g this afternoon after school. I don't have fontconfig on the target system. Is it required?
James
If you don't have fontconfig installed, I'm frankly surprised you can get X to start at all. Yes, I'd say it's required. ~Benjamin
In that case I must have fontconfig because in the text editor there are several fonts and font sizes I can pick from. On 13 Sep 2010, at 12:52, "Benjamin Johnson" <obeythepenguin@gmail.com> wrote:
On Mon, 13 Sep 2010 02:06:52 -0400, James Lovejoy <jameslovejoy@tiscali.co.uk> wrote:
Ok, I'll compile with -g this afternoon after school. I don't have fontconfig on the target system. Is it required?
James
If you don't have fontconfig installed, I'm frankly surprised you can get X to start at all. Yes, I'd say it's required.
~Benjamin
_______________________________________________ Dillo-dev mailing list Dillo-dev@dillo.org http://lists.auriga.wearlab.de/cgi-bin/mailman/listinfo/dillo-dev
James wrote:
In that case I must have fontconfig because in the text editor there are several fonts and font sizes I can pick from.
Is other software showing antialiased fonts? You said that this was a minimalist distribution, so I don't know whether fltk with xft configured is important to you...
I'm not sure what xft really does. And I wouldn't say they are antialiased because at font size 12 they look very jagged. On 13 Sep 2010, at 17:12, "corvid" <corvid@lavabit.com> wrote:
James wrote:
In that case I must have fontconfig because in the text editor there are several fonts and font sizes I can pick from.
Is other software showing antialiased fonts? You said that this was a minimalist distribution, so I don't know whether fltk with xft configured is important to you...
_______________________________________________ Dillo-dev mailing list Dillo-dev@dillo.org http://lists.auriga.wearlab.de/cgi-bin/mailman/listinfo/dillo-dev
If you check my prior email I have included an updated backtrace. On further examination of the source it looks to me like fltk is trying to hardcode my fonts?!? On 13 Sep 2010, at 19:44, "corvid" <corvid@lavabit.com> wrote:
James wrote:
I'm not sure what xft really does. And I wouldn't say they are antialiased because at font size 12 they look very jagged.
I don't know in any detail myself, but if jagged characters don't bother you, maybe you'll be happy with xft disabled in fltk.
_______________________________________________ Dillo-dev mailing list Dillo-dev@dillo.org http://lists.auriga.wearlab.de/cgi-bin/mailman/listinfo/dillo-dev
James wrote:
If you check my prior email I have included an updated backtrace. On further examination of the source it looks to me like fltk is trying to hardcode my fonts?!?
To the best of my knowledge, fltk::HELVETICA, COURIER, TIMES, etc., actually meant Helvetica, Courier, Times, etc., with the old font system, but with xft, they just mean sans, mono, serif, etc. And then in the fontconfig files, sans and friends are set to some specific font (e.g., looking quickly in mine, it seems that fonts.conf makes sans an alias for sans-serif, and then conf.d is full of files that specify that, for the sans-serif family, here are a bunch of specific font families in order of preference...).
Where should fonts.confirm be and how can I make sure fontconfig is installed. On 13 Sep 2010, at 20:34, "corvid" <corvid@lavabit.com> wrote:
James wrote:
If you check my prior email I have included an updated backtrace. On further examination of the source it looks to me like fltk is trying to hardcode my fonts?!?
To the best of my knowledge, fltk::HELVETICA, COURIER, TIMES, etc., actually meant Helvetica, Courier, Times, etc., with the old font system, but with xft, they just mean sans, mono, serif, etc.
And then in the fontconfig files, sans and friends are set to some specific font (e.g., looking quickly in mine, it seems that fonts.conf makes sans an alias for sans-serif, and then conf.d is full of files that specify that, for the sans-serif family, here are a bunch of specific font families in order of preference...).
_______________________________________________ Dillo-dev mailing list Dillo-dev@dillo.org http://lists.auriga.wearlab.de/cgi-bin/mailman/listinfo/dillo-dev
On Mon, 13 Sep 2010 15:49:39 -0400, James Lovejoy <jameslovejoy@tiscali.co.uk> wrote:
Where should fonts.confirm be and how can I make sure fontconfig is installed.
Not meaning this personally, but are you *sure* you're experienced enough to roll your own distro? I used to do that kind of work myself, and two things you really need to know are (1) what every package on the system does, at least in very general terms; and (2) how to work with the base system's tools (package management, etc.) I believe fonts.conf is in /etc/fonts.d/ or /etc/fontconfig/ or some similar location; you should be able to find it using find /etc -name fonts.conf As far as checking if fontconfig is installed, see if you have /usr/bin/fc-cache or /usr/lib/libfontconfig* on your system. The easiest way to check for a package in general is to use your system's package management tools, but unfortunately I'm not that familiar with dkpg -- I've always used Slackware-based systems myself. ~Benjamin
Mostly I'm just doing this for educational purposes and I'll just sort of learn as I go along. From what you have told me I can pretty much say that the target system does not have fontconfig on it (I don't ever remember installing it). I will 1. Install it 2. Try fltk without xft. On 13 Sep 2010, at 21:23, "Benjamin Johnson" <obeythepenguin@gmail.com> wrote:
On Mon, 13 Sep 2010 15:49:39 -0400, James Lovejoy <jameslovejoy@tiscali.co.uk> wrote:
Where should fonts.confirm be and how can I make sure fontconfig is installed.
Not meaning this personally, but are you *sure* you're experienced enough to roll your own distro? I used to do that kind of work myself, and two things you really need to know are (1) what every package on the system does, at least in very general terms; and (2) how to work with the base system's tools (package management, etc.)
I believe fonts.conf is in /etc/fonts.d/ or /etc/fontconfig/ or some similar location; you should be able to find it using find /etc -name fonts.conf
As far as checking if fontconfig is installed, see if you have /usr/bin/fc-cache or /usr/lib/libfontconfig* on your system. The easiest way to check for a package in general is to use your system's package management tools, but unfortunately I'm not that familiar with dkpg -- I've always used Slackware-based systems myself.
~Benjamin
_______________________________________________ Dillo-dev mailing list Dillo-dev@dillo.org http://lists.auriga.wearlab.de/cgi-bin/mailman/listinfo/dillo-dev
I can confirm that dillo runs successfully with fltk compiled with --disable-xft Thanks! On 14 Sep 2010, at 07:01, James Lovejoy <jameslovejoy@tiscali.co.uk> wrote:
Mostly I'm just doing this for educational purposes and I'll just sort of learn as I go along. From what you have told me I can pretty much say that the target system does not have fontconfig on it (I don't ever remember installing it). I will 1. Install it 2. Try fltk without xft.
On 13 Sep 2010, at 21:23, "Benjamin Johnson" <obeythepenguin@gmail.com> wrote:
On Mon, 13 Sep 2010 15:49:39 -0400, James Lovejoy <jameslovejoy@tiscali.co.uk> wrote:
Where should fonts.confirm be and how can I make sure fontconfig is installed.
Not meaning this personally, but are you *sure* you're experienced enough to roll your own distro? I used to do that kind of work myself, and two things you really need to know are (1) what every package on the system does, at least in very general terms; and (2) how to work with the base system's tools (package management, etc.)
I believe fonts.conf is in /etc/fonts.d/ or /etc/fontconfig/ or some similar location; you should be able to find it using find /etc -name fonts.conf
As far as checking if fontconfig is installed, see if you have /usr/bin/fc-cache or /usr/lib/libfontconfig* on your system. The easiest way to check for a package in general is to use your system's package management tools, but unfortunately I'm not that familiar with dkpg -- I've always used Slackware-based systems myself.
~Benjamin
_______________________________________________ Dillo-dev mailing list Dillo-dev@dillo.org http://lists.auriga.wearlab.de/cgi-bin/mailman/listinfo/dillo-dev
_______________________________________________ Dillo-dev mailing list Dillo-dev@dillo.org http://lists.auriga.wearlab.de/cgi-bin/mailman/listinfo/dillo-dev
With -g backtrace shows: #0 0x080ba0f4 in fltk::setfont(font=0x08172a18, size=12) at x11/Font_xft.cxx:318 #1 0x080f0e9a in fltk::Widget::measure_label(int&, int&) const () #2 0x08051126 in UI::make_filemenu_button (this=0x813de58) at ui.cc:531 #3 0x08052691 in UI::make_panel (this=0x813de58, ww=780) at ui.cc:626 #4 0x08052e48 in UI (this=0x813de58, x=0, y=0, ww=780, wh=580, label=0x81110c4 "Dillo", cur_ui=0x0) at ui.cc:724 #5 0x08054fbb in a_UIcmd_browser_window_new (ww=780, wh=580, xid=0, vbw=0x0) at uicmd.cc:433 #6 0x0804f753 in main (argc=1, argv=0xbffffd34) at dillo.cc:334 On 13 Sep 2010, at 18:18, James Lovejoy <jameslovejoy@tiscali.co.uk> wrote:
I'm not sure what xft really does. And I wouldn't say they are antialiased because at font size 12 they look very jagged.
On 13 Sep 2010, at 17:12, "corvid" <corvid@lavabit.com> wrote:
James wrote:
In that case I must have fontconfig because in the text editor there are several fonts and font sizes I can pick from.
Is other software showing antialiased fonts? You said that this was a minimalist distribution, so I don't know whether fltk with xft configured is important to you...
_______________________________________________ Dillo-dev mailing list Dillo-dev@dillo.org http://lists.auriga.wearlab.de/cgi-bin/mailman/listinfo/dillo-dev
_______________________________________________ Dillo-dev mailing list Dillo-dev@dillo.org http://lists.auriga.wearlab.de/cgi-bin/mailman/listinfo/dillo-dev
On Mon, 13 Sep 2010 13:18:51 -0400, James Lovejoy <jameslovejoy@tiscali.co.uk> wrote:
I'm not sure what xft really does. And I wouldn't say they are antialiased because at font size 12 they look very jagged.
Xft = Freetype = font rasterization engine. Basically it gives your program support for things like anti-aliasing and TrueType fonts. Try building FLTK2 with ./configure --disable-xft and see what it does. ~Benjamin
On Sun, Sep 12, 2010 at 02:39:17PM +0100, James Lovejoy wrote:
Hi,
I managed to get a backtrace from GDB:
#0 0x080ba0f4 in fltk::setfont(fltk::font*, float) () #1 0x080f0e9a in fltk::Widget::measure_label(int&, int&) const () #2 0x08051126 in UI::make_filemenu_button (this=0x813de58) at ui.cc:531 #3 0x08052691 in UI::make_panel (this=0x813de58, ww=780) at ui.cc:626 #4 0x08052e48 in UI (this=0x813de58, x=0, y=0, ww=780, wh=580, label=0x81110c4 "Dillo", cur_ui=0x0) at ui.cc:724 #5 0x08054fbb in a_UIcmd_browser_window_new (ww=780, wh=580, xid=0, vbw=0x0) at uicmd.cc:433 #6 0x0804f753 in main (argc=1, argv=0xbffffd34) at dillo.cc:334
It shows the problem is in FLTK's font handling, as in the suggested thread. Please take a look in dillorc, fonts section, to find some hints on how to diagnose. My guess is the target system doesn't have the requested fonts installed, FLTK panics -> segfault. -- Cheers Jorge.-
participants (4)
-
corvid@lavabit.com
-
jameslovejoy@tiscali.co.uk
-
jcid@dillo.org
-
obeythepenguin@gmail.com