Ongoing Font issues [EDIT]


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?

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  	0x01037750 AUBase::SaveState(void const**) + 36
2  	0x01046d15 JuceAU::SaveState(void const**) + 33
3  	0x0103737b AUBase::DispatchGetProperty(unsigned long, unsigned long, unsigned long, void*) + 215
4  	0x0103d3a5 AUBase::ComponentEntryDispatch(ComponentParameters*, AUBase*) + 469
5  	0x01047b39 ComponentEntryPoint<JuceAU>::Dispatch(ComponentParameters*, JuceAU*) + 123
6   ...ple.CoreServices.CarbonCore	0x951edef5 CallComponentDispatch + 29
7	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


Compiled with OSX 10.6.8 - XCode 3.2.6


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.


thanks, but does not help.

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


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


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.



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


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


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


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


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.



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.


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




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.


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.


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…


Hi Jules,
thanks, but the hack does not help :frowning:

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


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


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…