# Ongoing Font issues \[EDIT\]

**URL:** <https://forum.juce.com/t/ongoing-font-issues-edit/8840>\
**Category:** Audio Plugins\
**Created:** [June 15, 2012, 9:04am UTC](https://forum.juce.com/t/ongoing-font-issues-edit/8840 "2012-06-15T09:04:09Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![chkn](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/chkn/32/3862_2.png) [@chkn](https://forum.juce.com/u/chkn)\
**Post date:** [June 15, 2012, 9:04am UTC](https://forum.juce.com/t/ongoing-font-issues-edit/8840/1 "2012-06-15T09:04:09Z")

</div>

a juce plugin - compiled with SDK 10.6 and Deplyoment Target=10.5 crashes with auval in 10.5. but running fine in 10.6. - whats the reason?

```auto
Process: auvaltool [184]
Path: /usr/bin/auvaltool
Identifier: auvaltool
Version: ??? (???)
Code Type: X86 (Native)
Parent Process: perl [183]

Date/Time: 2012-06-15 10:40:45.894 +0200
OS Version: Mac OS X 10.5 (9A581)
Report Version: 6

Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000000
Crashed Thread: 0

Thread 0 Crashed:
0 ??? 0000000000 0 + 0
1 com.my.testplugin 0x01037750 AUBase::SaveState(void const**) + 36
2 com.my.testplugin 0x01046d15 JuceAU::SaveState(void const**) + 33
3 com.my.testplugin 0x0103737b AUBase::DispatchGetProperty(unsigned long, unsigned long, unsigned long, void*) + 215
4 com.my.testplugin 0x0103d3a5 AUBase::ComponentEntryDispatch(ComponentParameters*, AUBase*) + 469
5 com.my.testplugin 0x01047b39 ComponentEntryPoint<JuceAU>::Dispatch(ComponentParameters*, JuceAU*) + 123
6 ...ple.CoreServices.CarbonCore	0x951edef5 CallComponentDispatch + 29
7 ...apple.audio.units.AudioUnit	0x9241b833 AudioUnitGetProperty + 67
8 auvaltool 0x00003d75 0x1000 + 11637
9 auvaltool 0x00003f72 0x1000 + 12146
10 auvaltool 0x0000969b 0x1000 + 34459
11 auvaltool 0x00003125 0x1000 + 8485
12 auvaltool 0x000101de 0x1000 + 61918
13 auvaltool 0x0001056e 0x1000 + 62830
14 auvaltool 0x00001dfa 0x1000 + 3578
```

---

<div class="post-metadata">

**Author:** ![chkn](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/chkn/32/3862_2.png) [@chkn](https://forum.juce.com/u/chkn)\
**Post date:** [June 15, 2012, 10:12am UTC](https://forum.juce.com/t/ongoing-font-issues-edit/8840/2 "2012-06-15T10:12:47Z")

</div>

Compiled with OSX 10.6.8 - XCode 3.2.6

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [June 15, 2012, 10:14am UTC](https://forum.juce.com/t/ongoing-font-issues-edit/8840/3 "2012-06-15T10:14:00Z")

</div>

Hard to tell, but it could be that the host is passing a null pointer to SaveState(), and that’s making Apple’s own SaveState() method crash.

You could try adding a check to prevent that:

` ComponentResult SaveState (CFPropertyListRef* outData)
    {
        if (outData != nullptr)
        {
            ComponentResult err = JuceAUBaseClass::SaveState (outData);
..etc
`

But it could also be something inside Apple’s SaveState() that’s crashing for some other reason. Or perhaps the whole object is dangling. Can’t tell from that stack trace.

---

<div class="post-metadata">

**Author:** ![chkn](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/chkn/32/3862_2.png) [@chkn](https://forum.juce.com/u/chkn)\
**Post date:** [June 15, 2012, 11:01am UTC](https://forum.juce.com/t/ongoing-font-issues-edit/8840/4 "2012-06-15T11:01:24Z")

</div>

thanks, but does not help.

trying now with compatibility SDK 10.4. but i’m not optimistic ☹

---

<div class="post-metadata">

**Author:** ![chkn](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/chkn/32/3862_2.png) [@chkn](https://forum.juce.com/u/chkn)\
**Post date:** [June 15, 2012, 11:18am UTC](https://forum.juce.com/t/ongoing-font-issues-edit/8840/5 "2012-06-15T11:18:22Z")

</div>

hopefully this is (not) a bug in auval … doing some compatibility checks from a fresh 10.5 installation  
10.4. unable to compile

---

<div class="post-metadata">

**Author:** ![ckk](https://avatars.discourse-cdn.com/v4/letter/c/d26b3c/32.png) [@ckk](https://forum.juce.com/u/ckk)\
**Post date:** [June 15, 2012, 11:52am UTC](https://forum.juce.com/t/ongoing-font-issues-edit/8840/6 "2012-06-15T11:52:35Z")

</div>

Can’t say what’s the reason for the crash, but we’re using 10.5/10.5 as base/deployment SDK which builds non-crashing plugins. I didn’t test with auval but the plugins crashed in different hosts.  
So if that’s an option it might be the easiest solution.

edit: forgot to mention, this was more than a year ago and we haven’t changed the sdk since then, so it might be another cause for the crash in your case.

Chris

---

<div class="post-metadata">

**Author:** ![chkn](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/chkn/32/3862_2.png) [@chkn](https://forum.juce.com/u/chkn)\
**Post date:** [June 15, 2012, 11:56am UTC](https://forum.juce.com/t/ongoing-font-issues-edit/8840/7 "2012-06-15T11:56:34Z")

</div>

thanks for the info!  
just stumbled over this post (last sentence) mmhhhh…

[http://www.kvraudio.com/forum/printview.php?t=340395&start=0](http://www.kvraudio.com/forum/printview.php?t=340395&start=0)

---

<div class="post-metadata">

**Author:** ![chkn](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/chkn/32/3862_2.png) [@chkn](https://forum.juce.com/u/chkn)\
**Post date:** [June 15, 2012, 1:12pm UTC](https://forum.juce.com/t/ongoing-font-issues-edit/8840/8 "2012-06-15T13:12:18Z")

</div>

Just compiling with 10.5/10.5, i get the font-bug in Logic again, how can that be Jules?

---

<div class="post-metadata">

**Author:** ![chkn](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/chkn/32/3862_2.png) [@chkn](https://forum.juce.com/u/chkn)\
**Post date:** [June 15, 2012, 1:20pm UTC](https://forum.juce.com/t/ongoing-font-issues-edit/8840/9 "2012-06-15T13:20:32Z")

</div>

OK, with 10.5/10.5 it WORKS IN 10.5 BUT the destroys the font in 10.6!

---

<div class="post-metadata">

**Author:** ![chkn](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/chkn/32/3862_2.png) [@chkn](https://forum.juce.com/u/chkn)\
**Post date:** [June 15, 2012, 1:21pm UTC](https://forum.juce.com/t/ongoing-font-issues-edit/8840/10 "2012-06-15T13:21:59Z")

</div>

it seems that fonts which the “bold” attribute, don’t have the problem.

---

<div class="post-metadata">

**Author:** ![chkn](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/chkn/32/3862_2.png) [@chkn](https://forum.juce.com/u/chkn)\
**Post date:** [June 15, 2012, 2:13pm UTC](https://forum.juce.com/t/ongoing-font-issues-edit/8840/11 "2012-06-15T14:13:59Z")

</div>

i modified the juce demo, to reconstruct the problem.  
The only thing you have to do is set Base SDK And Target SDK to 10.5.

[attachment=0]juciss.png[/attachment]

---

<div class="post-metadata">

**Author:** ![sonic59](https://avatars.discourse-cdn.com/v4/letter/s/a8b319/32.png) [@sonic59](https://forum.juce.com/u/sonic59)\
**Post date:** [June 15, 2012, 3:01pm UTC](https://forum.juce.com/t/ongoing-font-issues-edit/8840/12 "2012-06-15T15:01:33Z")

</div>

I took a look. This is not the same bug as last time, this is something completely different.  
The problem lies somewhere in the old font code (Cocoa).  
I had no hand in writing that code so I won’t be fixing this problem in my own free time.  
If you’d like me to look at it further, shoot me a PM and maybe we can work something out.

---

<div class="post-metadata">

**Author:** ![chkn](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/chkn/32/3862_2.png) [@chkn](https://forum.juce.com/u/chkn)\
**Post date:** [June 15, 2012, 6:20pm UTC](https://forum.juce.com/t/ongoing-font-issues-edit/8840/13 "2012-06-15T18:20:26Z")

</div>

thanks for your offer, i just made a test, with the latest April check-in (before the big one), and it works (with 10.5 base sdk), so this must be a new issue

---

<div class="post-metadata">

**Author:** ![chkn](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/chkn/32/3862_2.png) [@chkn](https://forum.juce.com/u/chkn)\
**Post date:** [June 18, 2012, 1:41pm UTC](https://forum.juce.com/t/ongoing-font-issues-edit/8840/14 "2012-06-18T13:41:42Z")

</div>

_bump_

---

<div class="post-metadata">

**Author:** ![chkn](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/chkn/32/3862_2.png) [@chkn](https://forum.juce.com/u/chkn)\
**Post date:** [June 19, 2012, 6:30pm UTC](https://forum.juce.com/t/ongoing-font-issues-edit/8840/15 "2012-06-19T18:30:09Z")

</div>

In the current state, its just impossible to create AU-Plugins which are compatible with 10.5/10.6.  
To be compatible with Logic under 10.5 you need to compile against base(!) sdk 10.5 , but this destroys the font rendering.

---

<div class="post-metadata">

**Author:** ![atom](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/atom/32/113_2.png) [@atom](https://forum.juce.com/u/atom)\
**Post date:** [June 19, 2012, 7:37pm UTC](https://forum.juce.com/t/ongoing-font-issues-edit/8840/16 "2012-06-19T19:37:29Z")

</div>

I’d like to attach myself to the problem i see the same results with my plugin on OSX  
On the right side there is a normal PropertyPanel with some standard and non-standard PropertyComponents, there is no LookAndFeel class involved so i was not changing any fonts manually.  
[attachment=0]labels.jpg[/attachment]

---

<div class="post-metadata">

**Author:** ![jules](https://avatars.discourse-cdn.com/v4/letter/j/41988e/32.png) [@jules](https://forum.juce.com/u/jules)\
**Post date:** [June 20, 2012, 6:41am UTC](https://forum.juce.com/t/ongoing-font-issues-edit/8840/17 "2012-06-20T06:41:20Z")

</div>

Sorry, I’ve not got time to debug this right now, but you can probably temporarily hack it by disabling this bit of code:

`bool CoreGraphicsContext::drawTextLayout (const AttributedString& text, const Rectangle<float>& area)
{
   #if 0 //JUCE_CORETEXT_AVAILABLE
`

I’ve no idea what the host is doing that would bugger-up the fonts like that - presumably they’ve overridden something so they can draw with that music font, and I really don’t know how we could avoid it…

---

<div class="post-metadata">

**Author:** ![chkn](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/chkn/32/3862_2.png) [@chkn](https://forum.juce.com/u/chkn)\
**Post date:** [June 20, 2012, 9:40am UTC](https://forum.juce.com/t/ongoing-font-issues-edit/8840/18 "2012-06-20T09:40:28Z")

</div>

Hi Jules,  
thanks, but the hack does not help ☹

> [@](#):
>
> can draw with that music font, and I really don’t know how we could avoid it…

the bug was introduced with new font code in the beginning of may…

---

<div class="post-metadata">

**Author:** ![devOrosys](https://avatars.discourse-cdn.com/v4/letter/d/e9c0ed/32.png) [@devOrosys](https://forum.juce.com/u/devOrosys)\
**Post date:** [June 20, 2012, 1:03pm UTC](https://forum.juce.com/t/ongoing-font-issues-edit/8840/19 "2012-06-20T13:03:06Z")

</div>

For now you could specify the use of an alternative font rather than the default one.  
That seems to work.

---

<div class="post-metadata">

**Author:** ![chkn](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/chkn/32/3862_2.png) [@chkn](https://forum.juce.com/u/chkn)\
**Post date:** [June 20, 2012, 1:34pm UTC](https://forum.juce.com/t/ongoing-font-issues-edit/8840/20 "2012-06-20T13:34:58Z")

</div>

thanks, is there a method to use another font that applies to all components? (LookAndFeel?) And which font is available on 10.5 - 10.8 and looks like the standard one?  
hacking Font::getDefaultSansSerif… does not work…

[Next page](https://forum.juce.com/t/ongoing-font-issues-edit/8840.md?page=2)
