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 750017 - tests test-layout and testiter fail on OS X in pango_core_text_fontset_new
tests test-layout and testiter fail on OS X in pango_core_text_fontset_new
Status: RESOLVED FIXED
Product: pango
Classification: Platform
Component: coretext
1.37.x
Other Mac OS
: Normal normal
: ---
Assigned To: gtk-quartz maintainers
pango-maint
Depends on:
Blocks:
 
 
Reported: 2015-05-28 09:27 UTC by Ryan Schmidt
Modified: 2015-05-30 20:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
test suite log (403 bytes, text/plain)
2015-05-28 09:27 UTC, Ryan Schmidt
  Details
test-layout crash log (38.56 KB, text/plain)
2015-05-28 09:28 UTC, Ryan Schmidt
  Details
testiter crash log (38.07 KB, text/plain)
2015-05-28 09:29 UTC, Ryan Schmidt
  Details
patch (2.29 KB, patch)
2015-05-29 19:36 UTC, Kristian Rietveld
none Details | Review
patch: handle locale set through environment variables for testing (1.18 KB, patch)
2015-05-29 20:14 UTC, Kristian Rietveld
none Details | Review

Description Ryan Schmidt 2015-05-28 09:27:32 UTC
Created attachment 304134 [details]
test suite log

In pango 1.37.0 on OS X 10.10.4, two tests -- test-layout and testiter -- fail in strlen called from CFStringCreateWithCString called from pango_core_text_fontset_new. That suggests to me that you might be calling CFStringCreateWithCString with NULL instead of a pointer to a valid string.
Comment 1 Ryan Schmidt 2015-05-28 09:28:53 UTC
Created attachment 304135 [details]
test-layout crash log
Comment 2 Ryan Schmidt 2015-05-28 09:29:12 UTC
Created attachment 304136 [details]
testiter crash log
Comment 3 Kristian Rietveld 2015-05-29 07:14:19 UTC
Thanks for the detailed report -- I will have a look this weekend. It seems related to the recent change related to cascading. It's strange that my testing with GTK+ tests didn't turn up these problems.
Comment 4 Kristian Rietveld 2015-05-29 19:36:36 UTC
Created attachment 304287 [details] [review]
patch

Turns out key->language is in some cases NULL, in this case we cannot set a language preference list for CoreText.

After this patch, testiter passes, but test-layout still fails. Investigating.
Comment 5 Kristian Rietveld 2015-05-29 20:14:58 UTC
Created attachment 304288 [details] [review]
patch: handle locale set through environment variables for testing

This patch makes language detection work similar as on Windows: first check environment variables, then use the platform-native API. After applying this patch all unit tests pass on OS X.
Comment 6 Behdad Esfahbod 2015-05-29 21:29:13 UTC
See if you can reuse pango_language_get_default().
Comment 7 Behdad Esfahbod 2015-05-29 21:30:09 UTC
Oh my bad.  Looks good to me.  Please push.
Comment 8 Kristian Rietveld 2015-05-30 20:06:58 UTC
Thanks, pushed.