The app will crash in the OS drawing the window. The log:
0 ...ple.CoreServices.CarbonCore 0x98b4c7bd CSMemGetHandleSize + 35
1 com.apple.HIServices 0x978e82d6 _ISIconSuiteDataInfoGetter(void*, long, unsigned char, _ISIconInfo*) + 93
2 com.apple.HIServices 0x978d52a9 _ISGetBestCGImageForIndexedStorageData + 1620
3 com.apple.HIServices 0x978d408e _ISGetCGImageRefForISImageRef + 836
4 com.apple.HIServices 0x978dab3d PlotISImageRefInContext + 906
5 com.apple.HIServices 0x978ea168 _PlotIconSuiteInContext + 150
6 com.apple.HIToolbox 0x9652a857 HIImageContent::Draw(OpaqueControlRef*, CGContext*, CGRect const&, short, short) + 803
7 com.apple.HIToolbox 0x965076f0 HIBevelButton::DrawSelf(short, __HIShape const*, CGContext*) + 936
8 com.apple.HIToolbox 0x964482e0 HIView::DrawCacheOrSelf(short, __HIShape const*, CGContext*) + 348
9 com.apple.HIToolbox 0x96447fec HIView::SendDraw(short, OpaqueGrafPtr*, __HIShape const*, CGContext*) + 106
10 com.apple.HIToolbox 0x965021df HIView::RecursiveDrawNonComposited(short, OpaqueGrafPtr*, OpaqueRgnHandle*, unsigned char, unsigned char, unsigned char) + 627
11 com.apple.HIToolbox 0x965022b5 HIView::RecursiveDrawNonComposited(short, OpaqueGrafPtr*, OpaqueRgnHandle*, unsigned char, unsigned char, unsigned char) + 841
12 com.apple.HIToolbox 0x96502445 HIView::DrawNonComposited(short, OpaqueGrafPtr*, OpaqueRgnHandle*, unsigned long) + 293
13 com.apple.HIToolbox 0x964f6891 UpdateControls + 209
14 com.apple.HIToolbox 0x9644c0bf HandleWindowEvent(OpaqueEventRef*) + 1088
15 com.apple.HIToolbox 0x9648e6e2 StandardWindowEventHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) + 105
16 com.apple.HIToolbox 0x96421129 DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1567
17 com.apple.HIToolbox 0x964203f0 SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 411
18 com.apple.HIToolbox 0x96442a81 SendEventToEventTarget + 52
19 com.apple.HIToolbox 0x964532cb SendEvent(unsigned long, WindowData*, OpaqueRgnHandle*) + 203
20 com.apple.HIToolbox 0x96453156 PaintWindow(WindowData*, OpaqueRgnHandle*, PaintReason, bool) + 495
21 com.apple.HIToolbox 0x9644600a WindowData::PrepareForVisibility() + 236
22 com.apple.HIToolbox 0x96445589 _ShowHideWindows + 286
23 com.apple.HIToolbox 0x964a807d ShowWindow + 79
24 com.klinksoftware.dim3.editor 0x0000a813 main_wind_open + 2739 (main_window.c:898)
It doesn't crash, but doesn't draw anything in the buttons, and will then usually crash on exit.
I've verified the IconRef under gcc-4.0, and it's correct under clang-llvm.
Also, my other program crashes in drawing the databrowser and all sorts of other core routines (again, all fine under gcc 4.0)