• 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
Re: CreateCustomControl crash (Urs...?)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CreateCustomControl crash (Urs...?)


  • Subject: Re: CreateCustomControl crash (Urs...?)
  • From: Urs Heckmann <email@hidden>
  • Date: Fri, 25 Oct 2002 23:03:21 +0200

Howard Moon:

Hi...

I have managed (with help from Urs) to create a custom control inside the Pan AudioUnit. I thought everything was fine, until I selected another AudioUnit, then went back and selected Pan again. It crashed on the call to CreateCustomControl. Looking at the variables bing passed I see that the output parameter (the ToolboxObjectClassRef*) from RegisterToolboxObjectClass - that gets passed to the CreateCustomControl as part of the ControlDefSpec - is NULL (0)!. The verify_noerr wrapper around the call to RegisterToolboxObjectClass does not trap the fact that it is returning -22080. (BTW, how do I look up that error code???)

I tried calling UnregisterToolboxObjectClass when the AudioUnit view is being destroyed, but that crashes, too! If I trap the error from RegisterToolboxObjectClass and return it as the result of CreateUI, there's no crash...it simply does not draw the rest of my controls.

How can I properly re-register the classref when re-instantiating my view and its controls? Is there some way to get the existing classref and use it again when I get this -22080 error? Any help would be greatly appreciated...this is driving me batty! :-) Thanks...

-Howard


Hi,

I know what you're talking about, but I don't know the answer anymore (has been probably late of night when I found the cure)...

However, I never Unregistered a Control, cause that crashed when the control was still in use (I think this relies to the order of calling inherited destructors, a problem I never really got enlightment of despite intensive Stroustrup studies). I never had any problems with registering it twice, maybe because my handler is static C code and the System being too surprised to complain :-)

What I noticed is, that the control handler gets called already _before_ all the other objects are ready to use. Hence I do intensive NULL pointer checking before calling any additional callbacks or drawing graphics.

I have no practical advice for your current situation, but as my latest code seems to be not crashing (though not exactly working perfectly nor being free of hacks), I can send you a current snapshot. If you have patience till Sunday, I hope to get source of my whole CoreGraphics-AU-GUI framework (CAUGui) out to the list members.

Cheers,

;) Urs
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: CreateCustomControl crash (Urs...?)
      • From: Howard Moon <email@hidden>
References: 
 >CreateCustomControl crash (Urs...?) (From: Howard Moon <email@hidden>)

  • Prev by Date: Re: Using OMS from Carbon under OS9
  • Next by Date: Re: Filing of User Presets - naming convention
  • Previous by thread: CreateCustomControl crash (Urs...?)
  • Next by thread: Re: CreateCustomControl crash (Urs...?)
  • Index(es):
    • Date
    • Thread