locked
aotdata missing from IPA file, very weird problem RRS feed

  • Question

  • User38584 posted

    Hi, I am building my iOS project and producing an IPA file using xbuild on a Mac and i can see the aotdata is missing inside the ipa file. Why i don't know. Any explanation to this ? I have succeeded in building with same tool and environment where the aotdata was produced. The problem is that the app crashes at startup without the aotdata.

    /donnib

    Friday, July 8, 2016 11:22 AM

All replies

  • User37696 posted

    @donnib,

    I've created a bug to tack this here: https://bugzilla.xamarin.com/show_bug.cgi?id=42441

    Please add a comment with the following:

    • Xamarin version information. The easiest way to grab this is by opening Xamarin Studio, navigating to the About Xamarin Studio -> Show Details menu. You can then click the Copy Information to grab all the version data to paste into the bug report.

      Diagnostic build output.

    • Right-click on your iOS App project and select Project Options.

    • Select the iOS Build tab
    • In the Additional mtouch arguments textbox, please add

    -v -v -v -v

    • Press OK to save
    • Rebuild the project
    • Collect the output from the View -> Pads -> Errors -> BuildOutput tab
    • Paste that into a text file and please attach it. Please do not copy/paste this into the bug report. It's too long.

    http://screencast.com/t/yQhU1GF6q

    Note* You can attach files as Private or mark your comments as Private for only Xamarin to see.

    Friday, July 8, 2016 8:29 PM
  • User38584 posted

    John thanks but i have problem building with xbuild and not with Xamarin Studio, with Xamarin studio it works fine. The funny thing is that it doesn't work neither with mdtool which should be what Xamarin Studio uses. I tried on two different macs and the aodata does not get added to the IPA file. You still want the above ? Can i add the -v -v -v -v to the xbuild ?

    Monday, July 11, 2016 10:26 AM
  • User206893 posted

    @donnib, I had the same symptoms as you when producing an IPA file as part of an automated Jenkins build.

    The app would crash on start up with the following crash log:

    Exception Type:  EXC_CRASH (SIGABRT)
    Exception Codes: 0x0000000000000000, 0x0000000000000000
    Triggered by Thread:  0
    
    Thread 0 name:  tid_907  Dispatch queue: com.apple.main-thread
    Thread 0 Crashed:
    0   libsystem_kernel.dylib          0x0000000194c47270 __pthread_kill + 8
    1   libsystem_pthread.dylib         0x0000000194ce516c pthread_kill + 108
    2   libsystem_c.dylib               0x0000000194bbeb14 abort + 108
    3   <redacted>                      0x000000010006b2d4 mono_handle_native_sigsegv (mini-exceptions.c:2387)
    4   libsystem_platform.dylib        0x0000000194cdc958 _sigtramp + 64
    5   libsystem_pthread.dylib         0x0000000194ce516c pthread_kill + 108
    6   libsystem_c.dylib               0x0000000194bbeb14 abort + 108
    7   <redacted>                      0x0000000100166904 monoeg_log_default_handler (goutput.c:203)
    8   <redacted>                      0x00000001001669ec monoeg_assertion_message (goutput.c:133)
    9   <redacted>                      0x000000010003670c load_aot_module (aot-runtime.c:1932)
    10  <redacted>                      0x0000000100086b28 mono_assembly_load_from_full (assembly.c:1854)
    11  <redacted>                      0x0000000100086738 mono_assembly_open_full (assembly.c:1631)
    12  <redacted>                      0x000000010017add0 assembly_preload_hook(_MonoAssemblyName*, char**, void*) (monotouch-main.m:121)
    13  <redacted>                      0x0000000100088568 mono_assembly_load_corlib (assembly.c:1375)
    14  <redacted>                      0x00000001000a44cc mono_init_internal (domain.c:571)
    15  <redacted>                      0x0000000100076b10 mini_init (mini-runtime.c:3600)
    16  <redacted>                      0x000000010017b1dc xamarin_main (monotouch-main.m:413)
    17  <redacted>                      0x0000000100d23968 main (main.arm64.m:99)
    18  libdyld.dylib                   0x0000000194b2ea04 start + 0
    

    When I unzipped a working .ipa file and compared the contents to one that crashed, I could see that the working .ipa had .aotdata files (corresponding to each .dll file in both the .monotouch-32 and .monotouch-64 folders), whereas the crashing .ipa file had none. Comparing the build log files from the working and crashing .ipa builds I could see that the msbuild target "CoreCompile" was being skipped for the crashing .ipa because its outputs were up-to-date.

    The build process was already deleting the contents of the bin folder before calling xbuild, and this had worked fine until recently. I suspect something has changed in a recent update to Xamarin (probably in Cycle 7). The solution for me was to make sure that the contents of the obj folder is also deleted before calling xbuild e.g.

    rm -rf $WORKSPACE/iOS/bin/*
    rm -rf $WORKSPACE/iOS/obj/*
    xbuild ...
    
    Wednesday, July 20, 2016 3:46 PM
  • User38584 posted

    @GregHun thank you, yes exactly the same conclusion and the details i found although i choose to use xbuild with the rebuild option which does the same. It's funny how we did exactly same things, i also unzipped, did see the differences, removed obj and then did see the change in the ipa :)

    Thursday, July 21, 2016 6:13 AM