User Tag List

  1. v1nc3nt's Avatar
    Hi MMi-Community,
    I got Hackintosh 10.5.8 to work on my AMD system a while ago.
    I just installed it to get to program iPhone apps.
    And I do.
    In iPhone Simulator myapp runs perfectly and does what it should.
    But when I do Build and Debug or build with a faked code-sign and put the app on my iPod, the app crashes just at the loading screen.
    This happens, equal what app I try to Run and Debug, even if I try to run one of Apple's raw App templates for example TabBar Application, so I guess it won't be a memory error as I said first.
    Cause when I display console after Build and Debu, it prompts:
    [Session started at 2010-02-22 19:12:43 +0000.]
    GNU gdb 6.3.50-20050815 (Apple version gdb-967) (Tue Jul 14 02:11:58 UTC 2009)
    Copyright 2004 Free Software Foundation, Inc.
    GDB is free software, covered by the GNU General Public License, and you are
    welcome to change it and/or distribute copies of it under certain conditions.
    Type "show copying" to see the conditions.
    There is absolutely no warranty for GDB.  Type "show warranty" for details.
    This GDB was configured as "i386-apple-darwin".sharedlibrary apply-load-rules all
    Attaching to process 697.
    gdb-i386-apple-darwin(698,0x778720) malloc: *** mmap(size=1420296192) failed (error code=12)
    *** error: can't allocate region
    *** set a breakpoint in malloc_error_break to debug
    gdb stack crawl at point of internal error:
    [ 0 ] /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/libexec/gdb/gdb-i386-apple-darwin (align_down+0x0) [0x1222d8]
    [ 1 ] /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/libexec/gdb/gdb-i386-apple-darwin (xstrvprintf+0x0) [0x12336c]
    [ 2 ] /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/libexec/gdb/gdb-i386-apple-darwin (xmalloc+0x28) [0x12358f]
    [ 3 ] /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/libexec/gdb/gdb-i386-apple-darwin (dyld_info_read_raw_data+0x50) [0x1659af]
    [ 4 ] /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/libexec/gdb/gdb-i386-apple-darwin (dyld_info_read+0x1bc) [0x168a58]
    [ 5 ] /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/libexec/gdb/gdb-i386-apple-darwin (macosx_dyld_update+0xbf) [0x168c9c]
    [ 6 ] /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/libexec/gdb/gdb-i386-apple-darwin (macosx_solib_add+0x36b) [0x169fcc]
    [ 7 ] /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/libexec/gdb/gdb-i386-apple-darwin (macosx_child_attach+0x478) [0x17dd11]
    [ 8 ] /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/libexec/gdb/gdb-i386-apple-darwin (attach_command+0x5d) [0x64ec5]
    [ 9 ] /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/libexec/gdb/gdb-i386-apple-darwin (mi_cmd_target_attach+0x4c) [0x15dbd]
    [ 10 ] /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/libexec/gdb/gdb-i386-apple-darwin (captured_mi_execute_command+0x16d) [0x17427]
    [ 11 ] /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/libexec/gdb/gdb-i386-apple-darwin (catch_exception+0x41) [0x7a99a]
    [ 12 ] /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/libexec/gdb/gdb-i386-apple-darwin (mi_execute_command+0xa9) [0x16f63]
    /SourceCache/gdb/gdb-967/src/gdb/utils.c:1144: internal-error: virtual memory exhausted: can't allocate 1420296192 bytes.
    A problem internal to GDB has been detected,
    further debugging may prove unreliable.
    The Debugger has exited with status 1.The Debugger has exited with status 1.
    I am using XCode 3.1.4 with iPhone SDK 3.1.2 as I only have Leopard. not SL, I will dl iPhone SDK 3.1.2 now, and try it with that, but I guess this will not solve the problem.
    Build and Go(Debug) works perfectly, Start with performance too, and when I try to Debug a Mac OS X application, it will work, too, so it is a iPhone SDK specific problem.

    virtual memory exhausted: can't allocate 1420296192 bytes.
    This are 1354,5 MB, I have 4Gb ram installed, and when I launch with Performance Tools->Object Allocations it says 1736396 Overall Bytes (1,66 MB) at all Allocations. And Performace tool for leaks doesn't find any, too.
    I reinstalled XCode(so without fake codesign) but same error...

    I hope you can help me, app is working nice in Simulator and I wanted to host it on Cydia (MMi repo) soon.

    I am not sure whether this is because of my Hackintosh or a general problem.
    Plz help me.
    2010-02-22 06:25 PM
  2. storm1988's Avatar
    I had the same problem. try using ldid to sign the code. the "Make your own certificate" did not work for me too but ldid work well. you point it to your app executable in your package and you should be good to go. if you get an error like "Unknown architecture fag" then type this in before you run ldid.

    $ CODESIGN_ALLOCATE=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/codesign_allocate codesign

    2010-02-23 03:11 PM
  3. v1nc3nt's Avatar
    I reinstalled XCode(so without fake codesign) but same error...
    This does not seem to be a codesign error, does it?
    The error appears in Buld and Debug mode, too, not only on the actual iPod.
    I had fake-codesigned this way: [ame=]YouTube - 3.0! How to Fake Code Sign Your App, For Submission to Cydia[/ame]

    So, I actually used ldid to patch my app on iPod... without success...
    I installed newest iPhone SDK yesterday -> still the same error. ;(

    I need help... plz...

    2010-02-23 07:12 PM
  4. storm1988's Avatar
    There is an osx version of ldid you can use on you computer. Try that one, I use it. Never tried the ipod one. It sounds like the code signing is failing to me. Also when using ldid you need to set you code signing to "Don't sign code" in xcode.

    Hope you get it going!

    Also you need to sign the code just to debug on the ipod. I never have the ipod connected when testing. I just build and test it to get a result. The simulator is good for getting it going and then transfer it over and see what happens.
    Last edited by storm1988; 2010-02-23 at 09:24 PM.
    2010-02-23 09:17 PM
  5. mako34's Avatar
    hi, Im getting the
    error too (hackintosh)
    almost the same, just change the memory

    gdb-i386-apple-darwin(698,0x778720) malloc: *** mmap(size=1420296192) failed (error code=12)
    *** error: can't allocate region

    did you fix it??
    thank you
    2010-11-06 04:16 PM
  6. v1nc3nt's Avatar
    Yeah i got it to work.
    Just downgrade Kernel to Version 9.6.0(from OS 10.5.6)
    This worked for me. Not exactly sure which kernel I used, but I guess it was
    AnV XNU Kernel V1.4 - InsanelyMac Forum

    2010-11-06 07:43 PM
  7. mako34's Avatar
    I checked and my kernel version is 9.5.0
    using ideneb 10.5.8

    so 9.6.0 woul be an upgrade?
    would this fix it?
    2010-11-07 11:17 PM
  8. v1nc3nt's Avatar
    Yeah, sure it would be an upgrade
    And this should fix it then...
    2010-11-08 05:09 PM