Skip to main content

App crashes with 4.2 iPhone simulator "set start-with-shell off"



I'm writing application which perfectly works on 4.0/4.1 iPhone simulator, but not 4.2.





I'm getting such warning:





Detected an attempt to call a symbol in system libraries that is not present on the iPhone: fcntl$UNIX2003 called from function get_socket_nonblocking in image TestApp. If you are encountering this problem running a simulator binary within gdb, make sure you 'set start-with-shell off' first.





How to set 'set start-with-shell off' on Xcode? I'm tried to add this line to .gdbinit but without luck.





With 4.0/4.1 SDK iPhone Simulator prints warnings about attempt to call symbol that is not present on the iPhone in debug window, but app don't crashes. Using using 4.2 app crashes. How to prevent 4.2 crashes ?





Thanks



Source: Tips4all

Comments

  1. before this cleanAll build then

    In xcode go to Project > set active executable > appname - Iphone 4.0 simulator

    then open simulator then go to Hardware > version > 4.0.2

    then double click urapptarget and in build tab change "ios deployment target = 4.0"

    now run in simulator it will work

    ReplyDelete
  2. File a bug via http://bugreporter.apple.com/

    The debugger within Xcode will read ~/.gdbinit just like gdb at the command line. Try adding that line to ~/.gdbinit.

    ReplyDelete
  3. I was also unsuccessful adding the line to ~/.gdbinit. At the risk of stating the obvious: if you set the simulator version to 4.1 within XCode, you'll avoid the issue. This is what I do now - which is fine as long as I don't need to test an API available only on 4.2 - which we do not (we still target iOS 3.0).

    ReplyDelete
  4. I encountered a similar error:

    Detected an attempt to call a symbol in system libraries that is not present on the iPhone:
    pthread_rwlock_init$UNIX2003 called from function ...

    I was able to fix by unchecking the 'Strip linked Product' Deployment Build Setting of the Project, ie STRIP_INSTALLED_PRODUCT = NO

    Don't forget to do a full clean before rebuilding.



    You probably only want to do this for the simulator. Filling a bug report is still a good idea.

    ReplyDelete
  5. If you are using native libraries, you should recompile them using iOS4 (only the i386 versions, as it works on the device).

    ReplyDelete
  6. The $2003 suffix is generated by the compiler under some circumstances which you can find fully documented in the manual entry for compat

    man compat

    I wrestled with this for some time before finally fixing it by setting

    -mmacosx-version-min=10.3

    Any version prior to 10.4 will do the job.

    Hope this helps.

    ReplyDelete

Post a Comment

Popular posts from this blog

[韓日関係] 首相含む大幅な内閣改造の可能性…早ければ来月10日ごろ=韓国

div not scrolling properly with slimScroll plugin

I am using the slimScroll plugin for jQuery by Piotr Rochala Which is a great plugin for nice scrollbars on most browsers but I am stuck because I am using it for a chat box and whenever the user appends new text to the boxit does scroll using the .scrollTop() method however the plugin's scrollbar doesnt scroll with it and when the user wants to look though the chat history it will start scrolling from near the top. I have made a quick demo of my situation http://jsfiddle.net/DY9CT/2/ Does anyone know how to solve this problem?

Why does this javascript based printing cause Safari to refresh the page?

The page I am working on has a javascript function executed to print parts of the page. For some reason, printing in Safari, causes the window to somehow update. I say somehow, because it does not really refresh as in reload the page, but rather it starts the "rendering" of the page from start, i.e. scroll to top, flash animations start from 0, and so forth. The effect is reproduced by this fiddle: http://jsfiddle.net/fYmnB/ Clicking the print button and finishing or cancelling a print in Safari causes the screen to "go white" for a sec, which in my real website manifests itself as something "like" a reload. While running print button with, let's say, Firefox, just opens and closes the print dialogue without affecting the fiddle page in any way. Is there something with my way of calling the browsers print method that causes this, or how can it be explained - and preferably, avoided? P.S.: On my real site the same occurs with Chrome. In the ex