• 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: debugging crashes in dyld?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: debugging crashes in dyld?


  • Subject: Re: debugging crashes in dyld?
  • From: Don Quixote de la Mancha <email@hidden>
  • Date: Tue, 27 Sep 2011 14:19:39 -0700

On Tue, Sep 27, 2011 at 2:06 PM, Martin Wierschin <email@hidden> wrote:
> I have a user reporting a crash whenever they try to first save a file. It is reproducible for the user (though not be me) and I'm wondering how to best debug this problem remotely. I've included the crash stack below (all other threads are waiting/trapped).

Your stack includes the dlopen function.  What that does is "manually"
load a dynamic library, that is, code that either you are Apple's
engineers wrote is loading a dynamic library by name at runtime,
rather than being linked at build time and loaded by the system at
application launch.

The dtruss command will print out the system calls that your app makes
- or that frameworks that your app links to call:

http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/dtruss.1m.html

http://humberto.digi.com.br/blog/2008/02/25/strace-on-mac-os-x-leopard/

Write a shell script to have your user run, that will launch your app
under dtruss while saving its output to a text file, then ask your
user to send you that text file.  Search in it for "dlopen", and it
should show you which shared library is being loaded.

That library may be the executable withing a framework, or it may be a
vanilla dylib in /usr/bin or some such.

If it's not enough to just find out which dylib is causing the crash,
it might be worthwhile to write your own "shim" dylib that is inserted
in place of the real one somehow, that has all the same entry points
but records all their parameters, then loads the real shared library
and passes the call on.

 If you are careful about it you could have your user replace his
original shared library with yours, while moving the original to some
other name that your shim knows how to load.  This would be a little
dangerous; if the dylib is important and you screw up, your user might
have to reinstall OS X, so make sure you get it right.
--
Don Quixote de la Mancha
email@hidden

   Custom Software Development for the iPhone and Mac OS X
   http://www.dulcineatech.com/custom-software-development/
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >debugging crashes in dyld? (From: Martin Wierschin <email@hidden>)

  • Prev by Date: Re: delegate of an NWindowController's window
  • Next by Date: iTunes problem related to free space on device (iPad, iPod ) when transferring data to device.
  • Previous by thread: Re: debugging crashes in dyld?
  • Next by thread: Trouble creating dictionary
  • Index(es):
    • Date
    • Thread