Skip navigation

crash possibly due to bad symbol lookup

3580 Views 13 Replies Latest reply: Jan 19, 2013 8:58 PM by wrabbit99 RSS
wrabbit99 Calculating status...
Currently Being Moderated
Jan 19, 2013 7:47 AM

I have a c++ app running on OS/X Lion which crashes in a call to glIsBuffer(0). The XCode 4.5 stack trace states:

error: address doesn't contain a section that points to a section in a object file

and DYLD_PRINT_APIS shows:

dlopen(/System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreGraphics.framework/CoreGraphics, 0x00000009) ...

dlsym(0x7f9288d00cd0, gliCopyAttributes)

dlsym(0x7f9288d00cd0, gliGetVersion) dlsym(0x7f9298d70620, __CGBitmapContextDelegateCreate)

dlsym(0xffffffffffffffff, CGSCopyCoreGraphicsCapabilities)

Segmentation fault: 11

The last call to dlsym() appears to have been passed a rather strange library handle. I looked at the return values for dlopen, but it should be returning NULL on error. There are no errors reported for the dlopen calls in the log.

CGSCopyCoreGraphicsCapabilities is a Core Graphics call, though Google doesn't turn up any docs on it. My current hypothesis is that dlsym is using an invalid library handle. Perhaps the proper Core Graphics library is not loaded or has been unloaded.

Running otool shows a few version mismatches:

/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)

/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 52.0.0)

but I don't know enough to say whether they are relevant.

Can anyone help to decipher what might be the problem?

thanks!

Mac mini (Mid 2011), Mac OS X (10.7.5)
  • etresoft Level 7 Level 7 (23,900 points)
    Currently Being Moderated
    Jan 19, 2013 11:14 AM (in response to wrabbit99)

    You will have to post the source code stack trace.

  • etresoft Level 7 Level 7 (23,900 points)
    Currently Being Moderated
    Jan 19, 2013 11:57 AM (in response to wrabbit99)

    There are a lot of things in there that are not standard Mac stuff. You aren't running "a c++ app", you are doing some very specific things with specific libraries. Most Mac developers would have no idea about any of that. You are going to have to provide a whole lot more context.

  • xnav Level 5 Level 5 (6,625 points)
    Currently Being Moderated
    Jan 19, 2013 12:24 PM (in response to wrabbit99)

    Thread 1

    com.apple.main-thread

    0 0x00000000

    1 BufferObject::clear()

    but, thread 0 is the one that's crashing somewhere in the boost library....

     

    What's at?

    8   vdb_view                            0x000000010e976428 main + 3032

     

    This is probably the culprit:

    7   vdb_view                            0x000000010eadad7b Viewer::view(std::vector<boost::shared_ptr<openvdb::v0_103_1::GridBase const>, std::allocator<boost::shared_ptr<openvdb::v0_103_1::GridBase const> > > const&, int, int) + 331

    Message was edited by: xnav

  • etresoft Level 7 Level 7 (23,900 points)
    Currently Being Moderated
    Jan 19, 2013 4:24 PM (in response to wrabbit99)

    wrabbit99 wrote:

     

    What do you mean by a "c++ app"?  This is written in c++, has a main(), is built by a makefile, and probably does not resent being called a "c++ app".

    I was making a reference to your initial categorization of your program as "a c++ app". It isn't. It is an OpenGL application written in C++, using Boost, glfw, vdb_view, valgrind, and who knows what else.

     

    For this app, you asked for assistance in an Apple Development forum. That probably wasn't the best approach. Your app is only superficially a Mac app. You appear to have resolved the problem on your own. In the future, if you are working with specific open-source libraries using their build scripts, it would probably be best to go to the authors of those libraries first. It isn't that your questions aren't welcome here, it is just that you aren't likely to find a speedy answer here.

  • xnav Level 5 Level 5 (6,625 points)
    Currently Being Moderated
    Jan 19, 2013 4:47 PM (in response to wrabbit99)

    Interesting, I would have expected make to spit out a link error or warning.

  • etresoft Level 7 Level 7 (23,900 points)
    Currently Being Moderated
    Jan 19, 2013 7:03 PM (in response to wrabbit99)

    They are around but those are very specific technologies. I am not going to install and test something on that order of difficulty. If it was something I already knew or something I thought might be interesting to learn, then I would might go for it.

     

    It isn't that OS X has BSD roots, but that it is wearing a BSD wig. It is a compatibility layer. There is not a strong connection between the BSD/Linux community and the Mac world. These cross-platform, open-source libraries are particularly difficult. They often have hacks to run on one specific version of OS X and those hacks are rarely updated. That can be a problem on OS X because Apple doesn't shy away from breaking old code.

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.