• 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
Mac app crashes using library built with Xcode4.3+, which used to work with Xcode4.2
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Mac app crashes using library built with Xcode4.3+, which used to work with Xcode4.2


  • Subject: Mac app crashes using library built with Xcode4.3+, which used to work with Xcode4.2
  • From: Beinan Li <email@hidden>
  • Date: Thu, 09 Aug 2012 16:08:03 -0400

Hello Xcode,

I was using Xcode4.2 to develop C++ plugin for an external Mono-based app.
After upgrading to Xcode4.3, the app starts to crash using my plugin.
I traced down and found that this was related to one of my plugin libs for audio decoding (PCM/AAC/OggVorbis).
I wonder if there are any compiler changes that I need to pay attention to.

Here are some clues:
  1. The lib built with Xcode4.2 works fine.
  2. If rebuilt using Xcode4.3 or 4.4, using the same xcodeproj, it crashes when working with OggVorbis or AAC.
  3. PCM always works when the lib is built with either Xcode4.2 or 4.3+.

I'm in a difficult situation where the external app is copy-right protected and I cannot attach Xcode debugger to it.

Printf/fwrite based debug led me to the finding that the crash happens at a memcpy call in my lib.

What it does is basically like this (pseudo code):

void MyBuffer::Write(void* in_data, uint32_t in_size)

{

          uint8_t* buf_data = (uint8_t*) m_dataBlocks.pData + m_writeOffset;

          memcpy(buf_data, in_data, in_size);

          m_writeOffset += in_size;

}

I also found that if I hack the in_size, e.g., use in_size/2 instead of in_size. Then the crash stopped from happening

with Xcode4.3+, although my plugin would not work as expected apparently.


I would appreciate it if anybody can share some ideas about any subtle compiler changes in Xcode4.3+.


Thanks!!


 _______________________________________________
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: Mac app crashes using library built with Xcode4.3+, which used to work with Xcode4.2
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Framework MIA (NI488) after upgrading Xcode (4.2.1 -> Version 4.4)
  • Next by Date: Re: Mac app crashes using library built with Xcode4.3+, which used to work with Xcode4.2
  • Previous by thread: Re: Framework MIA (NI488) after upgrading Xcode (4.2.1 -> Version 4.4)
  • Next by thread: Re: Mac app crashes using library built with Xcode4.3+, which used to work with Xcode4.2
  • Index(es):
    • Date
    • Thread