After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 149603 - Example application fails with assertion (face != NULL)
Example application fails with assertion (face != NULL)
Status: RESOLVED OBSOLETE
Product: gnome-print
Classification: Deprecated
Component: fonts
2.6.x
Other Linux
: Normal normal
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2004-08-07 22:52 UTC by victormorilla
Modified: 2006-12-03 14:56 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description victormorilla 2004-08-07 22:52:40 UTC
Call to Gnome::Print::Font::find_closest of the example distributed with
gnomeprintmm 2.5.1 fails. 

Console output:
(process:4679): GnomePrint-CRITICAL **: file gnome-font.c: line 291
(gnome_font_find_closest): assertion `face != NULL' failed

Dependencies:
               libgnomeprintmm-2.5.so.2 =>
/usr/local/stow/libgnomeprintmm-2.5.1/lib/libgnomeprintmm-2.5.so.2 (0x40018000)
        libpangomm-1.4.so.1 => /usr/lib/libpangomm-1.4.so.1 (0x40037000)
        libglibmm-2.4.so.1 => /usr/lib/libglibmm-2.4.so.1 (0x4005a000)
        libsigc-2.0.so.0 => /usr/lib/libsigc-2.0.so.0 (0x4009f000)
        libgnomeprint-2-2.so.0 => /usr/lib/libgnomeprint-2-2.so.0 (0x400a5000)
        libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x404eb000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x40512000)
        libart_lgpl_2.so.2 => /usr/lib/libart_lgpl_2.so.2 (0x4057c000)
        libxml2.so.2 => /usr/lib/libxml2.so.2 (0x40593000)
        libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0x4068e000)
        libz.so.1 => /usr/lib/libz.so.1 (0x4069e000)
        libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0x406af000)
        libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0x406e4000)
        libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0x4071e000)
        libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0x40723000)
        libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x40726000)
        libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x407a4000)
        libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0x4085e000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x40881000)
        libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0x4088a000)
        libexpat.so.1 => /usr/lib/libexpat.so.1 (0x409c5000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)


A direct call to the C-API function (gnome_font_find_closest) fails the same
way. An initialization problem ?

My desktop gnome apps print fine
Comment 1 Murray Cumming 2004-09-02 13:45:22 UTC
It's probably a problem with the constructor. Maybe the equivalent C _new()
function does more than just call g_object_new(). If so, we need to do the same
thing in our constructor, or maybe call a _construct() function as well.
Comment 2 Murray Cumming 2004-09-19 13:17:12 UTC
The example works for me. Could you attach a .ps document that reproduces the
problem?

Or maybe this was fixed in recent versions of libgnomeprint?
Comment 3 victormorilla 2004-09-20 22:22:16 UTC
Original example doesn't print a ps file, because refFontLuxi doesn't have a
valid reference:

Glib::RefPtr<Gnome::Print::Font> refFontLuxi =
Gnome::Print::Font::find_closest("Luxi Sans Bold");
if(!refFontLuxi)
{
  std::cerr << "Font is null: Font not found." << std::endl;
  return 1;
}

Anyway, the problem seems to be related with my configuration. I have tried
libgnomeprint "simple" example and got the same error.

Any help ?
Comment 4 Murray Cumming 2004-09-21 08:03:40 UTC
So the problem is that find_closest() fails. Maybe this is normal, or maybe it
should find at least one sans font - I don't know. You might ask on the
gnome-print mailing list.
Comment 5 Murray Cumming 2004-09-21 08:04:48 UTC
Reassiginging to libgnomeprint, because you have the problem there too.
Comment 6 Jody Goldberg 2004-10-14 15:37:28 UTC
What version of libgnomeprint ?
Comment 7 victormorilla 2004-10-14 20:36:14 UTC
2.6.2

The exact output from "simple" test is:

(process:2709): GnomePrint-CRITICAL **: file gnome-font.c: line 291
(gnome_font_find_closest): assertion `face != NULL' failed
 
(process:2709): GnomePrint-CRITICAL **: file gnome-print-stdapi.c: line 875
(gnome_print_setfont): assertion `font != NULL' failed
Done...
Comment 8 André Klapper 2006-09-29 16:35:59 UTC
victor, do you still face this issue nowadays or can this be closed as obsolete? if so, which version of libgnomeprint are you using?
Comment 9 Kjartan Maraas 2006-12-03 14:56:55 UTC
I think we'll close it as obsolete. Please reopen if you can still reproduce this.