• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
clang-llvm: Tracking core OS crashes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

clang-llvm: Tracking core OS crashes


  • Subject: clang-llvm: Tracking core OS crashes
  • From: Brian Barnes <email@hidden>
  • Date: Wed, 9 Sep 2009 21:49:27 -0400

I've tracked my third bug.  Under gcc-4.0, this code works perfectly.  Under clang-llvm, it crashes in the OS.  Here's one example:

If you use code like this:

icon_info.contentType=kControlContentIconSuiteHandle;
icon_info.u.iconSuite=piece_icon[n];
CreateBevelButtonControl(mainwind,&box,NULL,kControlBevelButtonSmallBevel,kControlBehaviorToggles,&icon_info,0,0,0,&piece_ctrl[n]);

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)

If you change it to IconRef (instead of IconSuiteHandle):

icon_info.contentType=kControlContentIconRef;
icon_info.u.iconRef=piece_icon_ref[n];

CreateBevelButtonControl(mainwind,&box,NULL,kControlBevelButtonSmallBevel,kControlBehaviorToggles,&icon_info,0,0,0,&piece_ctrl[n]);

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)

Any ideas?

[>] Brian
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: clang-llvm: Tracking core OS crashes
      • From: Rich Siegel <email@hidden>
  • Prev by Date: Re: GCD and blocks cross development
  • Next by Date: Re: clang-llvm: Tracking core OS crashes
  • Previous by thread: Re: GCD and blocks cross development
  • Next by thread: Re: clang-llvm: Tracking core OS crashes
  • Index(es):
    • Date
    • Thread