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 675239 - emtpy font preview and critical warning
emtpy font preview and critical warning
Status: RESOLVED FIXED
Product: gnome-font-viewer
Classification: Core
Component: general
git master
Other Linux
: Normal critical
: ---
Assigned To: gnome-font-viewer-maint
gnome-font-viewer-maint
Depends on:
Blocks:
 
 
Reported: 2012-05-01 13:50 UTC by Christian Persch
Modified: 2012-05-02 17:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshot (75.68 KB, image/png)
2012-05-01 14:11 UTC, Christian Persch
Details

Description Christian Persch 2012-05-01 13:50:16 UTC
In the attached screenshot, there's a completely empty square at the top left position with not even the font name shown. Clicking on it, there is one critical warning:

GLib-CRITICAL **: g_utf8_to_ucs4_fast: assertion `str != NULL' failed

(gdb) where
  • #0 g_log
    at gmessages.c line 791
  • #1 g_return_if_fail_warning
    at gmessages.c line 801
  • #2 g_utf8_to_ucs4_fast
    at gutf8.c line 720
  • #3 check_font_contain_text
    at sushi-font-widget.c line 112
  • #4 build_strings_for_face
    at sushi-font-widget.c line 221
  • #5 font_face_async_ready_cb
    at sushi-font-widget.c line 500
  • #6 g_simple_async_result_complete
    at gsimpleasyncresult.c line 837
  • #7 font_load_job_callback
    at sushi-font-loader.c line 106
  • #8 mainloop_proxy_func
    at gioscheduler.c line 286
  • #9 g_idle_dispatch
    at gmain.c line 4657
  • #10 g_main_dispatch
    at gmain.c line 2539
  • #11 g_main_context_dispatch
    at gmain.c line 3075
  • #12 g_main_context_iterate
    at gmain.c line 3146
  • #13 g_main_context_iteration
    at gmain.c line 3207
  • #14 g_application_run
    at gapplication.c line 1496
  • #15 main
    at font-view.c line 704
  • #7 font_load_job_callback
    at sushi-font-loader.c line 106
$4 = 0x82fc2a8 "file:///home/......./.fonts/MyaZedi_M17N.ttf"

which you can download from here: http://www.myazedi.com/mmfonts/v1.2/

After the critical warning, the font preview itself is complely blank.
Comment 1 Christian Persch 2012-05-01 14:11:34 UTC
Created attachment 213210 [details]
screenshot
Comment 2 Cosimo Cecchi 2012-05-01 21:07:58 UTC
I wasn't able to reproduce this exact situation, not even with the suggested font file, but the code was indeed not correct.
I pushed a fix to master which should solve this; I would appreciate if you could test again.
Comment 3 Christian Persch 2012-05-02 17:28:02 UTC
The critical warning is gone. However the square is still completely empty, since the font appears not to even have a name. Maybe use the display-name for the URI if the font name is an empty string? Not sure why the preview is empty too instead of the placeholder icon...