Bug 30072 - Crash when signing Android app
Summary: Crash when signing Android app
Status: VERIFIED FIXED
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Android Add-in (show other bugs)
Version: 5.9
Hardware: Macintosh Mac OS
: High normal
Target Milestone: 5.9.2 (C5SR2)
Assignee: Greg Munn
URL:
: 30107 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-05-14 07:36 UTC by Ryan
Modified: 2015-06-23 13:23 UTC (History)
7 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Crash log (93.53 KB, application/octet-stream)
2015-05-14 07:37 UTC, Ryan
Details

Description Ryan 2015-05-14 07:36:38 UTC
Since updating to the new Xamarin Studio this morning, I can no longer build Android apps.

I select the new 'Build/Archive For Publishing' option. Once the archive has been produced I click 'Sign and Distribute'.

I click 'AdHoc/Save to Disk' and then click 'Import an existing key'. I click 'Browse' and select my keystore. A popup appears asking for the password. I enter it and click ok.

About 5 seconds later Xamarin crashes to desktop.

I have repeated these steps on a seperate machine in the office, using a different project / keystore and exactly the same crash happens, so I am confident it is not my configuration.

I tried updating my Android SDK and restarting my machine, but this did not help.

I have attached the crash log.

Cheers,
Ryan
Comment 1 Ryan 2015-05-14 07:37:21 UTC
Created attachment 11200 [details]
Crash log
Comment 2 Ryan 2015-05-14 07:48:34 UTC
The system log also shows this when it crashes:

14/05/2015 12:46:55.744 XamarinStudio[1236]: GetDYLDEntryPointWithImage(/System/Library/PrivateFrameworks/CacheDelete.framework/CacheDelete,CacheDeleteCopyPurgeableSpaceWithInfo) failed.
14/05/2015 12:47:19.269 com.apple.debugserver-@(#)PROGRAM:debugserver  PROJECT:debugserver-330.0.44
[1273]: debugserver-@(#)PROGRAM:debugserver  PROJECT:debugserver-330.0.44
 for x86_64.
14/05/2015 12:47:19.269 com.apple.debugserver-@(#)PROGRAM:debugserver  PROJECT:debugserver-330.0.44
[1273]: Got a connection, waiting for process information for launching or attaching.
14/05/2015 12:47:19.546 com.apple.debugserver-@(#)PROGRAM:debugserver  PROJECT:debugserver-330.0.44
[1273]: Attach succeeded, ready to debug.
14/05/2015 12:47:20.700 com.apple.LLDB.framework[1272]: warning: (i386) /Library/Frameworks/Mono.framework/Versions/Current/lib/libglib-2.0.0.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.
14/05/2015 12:47:20.702 com.apple.LLDB.framework[1272]: warning: (i386) /Library/Frameworks/Mono.framework/Versions/4.0.0/lib/libintl.8.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.
14/05/2015 12:47:20.703 com.apple.LLDB.framework[1272]: warning: (i386) /Library/Frameworks/Mono.framework/Versions/4.0.0/lib/libgtk-quartz-2.0.0.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.
14/05/2015 12:47:20.711 com.apple.LLDB.framework[1272]: warning: (i386) /Library/Frameworks/Mono.framework/Versions/4.0.0/lib/libgdk-quartz-2.0.0.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.
14/05/2015 12:47:20.713 com.apple.LLDB.framework[1272]: warning: (i386) /Library/Frameworks/Mono.framework/Versions/4.0.0/lib/libpangocairo-1.0.0.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.
14/05/2015 12:47:20.713 com.apple.LLDB.framework[1272]: warning: (i386) /Library/Frameworks/Mono.framework/Versions/4.0.0/lib/libpango-1.0.0.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.
14/05/2015 12:47:20.714 com.apple.LLDB.framework[1272]: warning: (i386) /Library/Frameworks/Mono.framework/Versions/4.0.0/lib/libgthread-2.0.0.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.
14/05/2015 12:47:20.714 com.apple.LLDB.framework[1272]: warning: (i386) /Library/Frameworks/Mono.framework/Versions/4.0.0/lib/libatk-1.0.0.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.
14/05/2015 12:47:20.715 com.apple.LLDB.framework[1272]: warning: (i386) /Library/Frameworks/Mono.framework/Versions/4.0.0/lib/libcairo.2.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.
14/05/2015 12:47:20.718 com.apple.LLDB.framework[1272]: warning: (i386) /Library/Frameworks/Mono.framework/Versions/4.0.0/lib/libpixman-1.0.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.
14/05/2015 12:47:20.719 com.apple.LLDB.framework[1272]: warning: (i386) /Library/Frameworks/Mono.framework/Versions/4.0.0/lib/libfontconfig.1.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.
14/05/2015 12:47:20.720 com.apple.LLDB.framework[1272]: warning: (i386) /Library/Frameworks/Mono.framework/Versions/4.0.0/lib/libexpat.1.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.
14/05/2015 12:47:20.720 com.apple.LLDB.framework[1272]: warning: (i386) /Library/Frameworks/Mono.framework/Versions/4.0.0/lib/libfreetype.6.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.
14/05/2015 12:47:20.722 com.apple.LLDB.framework[1272]: warning: (i386) /Library/Frameworks/Mono.framework/Versions/4.0.0/lib/libgdk_pixbuf-2.0.0.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.
14/05/2015 12:47:20.722 com.apple.LLDB.framework[1272]: warning: (i386) /Library/Frameworks/Mono.framework/Versions/4.0.0/lib/libpng14.14.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.
14/05/2015 12:47:20.723 com.apple.LLDB.framework[1272]: warning: (i386) /Library/Frameworks/Mono.framework/Versions/4.0.0/lib/libgio-2.0.0.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.
14/05/2015 12:47:20.727 com.apple.LLDB.framework[1272]: warning: (i386) /Library/Frameworks/Mono.framework/Versions/4.0.0/lib/libgmodule-2.0.0.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.
14/05/2015 12:47:20.728 com.apple.LLDB.framework[1272]: warning: (i386) /Library/Frameworks/Mono.framework/Versions/4.0.0/lib/libgobject-2.0.0.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.
14/05/2015 12:47:20.729 com.apple.LLDB.framework[1272]: warning: (i386) /Library/Frameworks/Mono.framework/Versions/4.0.0/lib/libffi.6.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.
14/05/2015 12:47:20.736 com.apple.LLDB.framework[1272]: warning: (i386) /Library/Frameworks/Mono.framework/Versions/4.0.0/lib/gtk-2.0/2.10.0/engines/libxamarin.so empty dSYM file detected, dSYM was created with an executable with no debug info.
14/05/2015 12:47:20.737 com.apple.LLDB.framework[1272]: warning: (i386) /Library/Frameworks/Mono.framework/Versions/4.0.0/lib/gtk-2.0/2.10.0/engines/libquartz.so empty dSYM file detected, dSYM was created with an executable with no debug info.
14/05/2015 12:47:21.105 com.apple.LLDB.framework[1272]: warning: (i386) /Library/Frameworks/Mono.framework/Versions/4.0.0/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so empty dSYM file detected, dSYM was created with an executable with no debug info.
14/05/2015 12:47:21.145 com.apple.LLDB.framework[1272]: warning: (i386) /Library/Frameworks/Mono.framework/Versions/4.0.0/lib/pango/1.8.0/modules/pango-basic-coretext.so empty dSYM file detected, dSYM was created with an executable with no debug info.
14/05/2015 12:47:21.151 com.apple.LLDB.framework[1272]: warning: (i386) /Library/Frameworks/Mono.framework/Versions/4.0.0/lib/gtk-2.0/2.10.0/immodules/im-quartz.so empty dSYM file detected, dSYM was created with an executable with no debug info.
14/05/2015 12:47:21.162 com.apple.LLDB.framework[1272]: warning: (i386) /Library/Frameworks/Mono.framework/Versions/4.0.0/lib/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-jpeg.so empty dSYM file detected, dSYM was created with an executable with no debug info.
14/05/2015 12:47:21.163 com.apple.LLDB.framework[1272]: warning: (i386) /Library/Frameworks/Mono.framework/Versions/4.0.0/lib/libjpeg.8.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.
14/05/2015 12:47:21.980 com.apple.debugserver-@(#)PROGRAM:debugserver  PROJECT:debugserver-330.0.44
[1273]: 1 +0.000000 sec [04f9/030b]: Disabling breakpoints and watchpoints, and detaching from 1236.
14/05/2015 12:47:21.980 com.apple.debugserver-@(#)PROGRAM:debugserver  PROJECT:debugserver-330.0.44
[1273]: 2 +0.000111 sec [04f9/030b]: error: ::ptrace (request = PT_THUPDATE, pid = 0x04d4, tid = 0x1703, signal = -1) err = Invalid argument (0x00000016)
14/05/2015 12:47:21.981 com.apple.debugserver-@(#)PROGRAM:debugserver  PROJECT:debugserver-330.0.44
[1273]: 3 +0.000387 sec [04f9/1103]: error: ::read ( 3, 0x10995ba40, 1024 ) => -1 err = Bad file descriptor (0x00000009)
14/05/2015 12:47:21.981 com.apple.debugserver-@(#)PROGRAM:debugserver  PROJECT:debugserver-330.0.44
[1273]: Exiting.
14/05/2015 12:47:21.991 com.apple.xpc.launchd[1]: (com.apple.ReportCrash[1275]) Endpoint has been activated through legacy launch(3) APIs. Please switch to XPC or bootstrap_check_in(): com.apple.ReportCrash
14/05/2015 12:47:22.963 com.apple.xpc.launchd[1]: (com.xamarin.monodevelop.84664[1236]) Service exited due to signal: Abort trap: 6
14/05/2015 12:47:23.011 ReportCrash[1275]: Saved crash report for XamarinStudio[1236] version 5.9.1.3 (5.9.1.3) to /Users/ryanpalmer/Library/Logs/DiagnosticReports/XamarinStudio_2015-05-14-124723_Ryans-iMac.crash
14/05/2015 12:47:23.108 Problem Reporter[1277]: Failed to connect (_imageWell) outlet from (ProblemReportWindowController) to (NSImageView): missing setter or instance variable
14/05/2015 12:47:23.273 system_profiler[1279]: platformPluginDictionary: Can't get X86PlatformPlugin, return value 0
14/05/2015 12:47:23.274 system_profiler[1279]: platformPluginDictionary: Can't get X86PlatformPlugin, return value 0
Comment 3 Ryan 2015-05-14 08:18:26 UTC
I just tried switching to the Alpha channel, but this didn't help.
Comment 4 Greg Munn 2015-05-15 11:00:10 UTC
Can you also attach the Xamarin Studio logs as well (Help | Open Log Directory). It's not clear exactly what XS was doing in the thread that crashed in the crash dump.

Can you also try to import the keystore from Preferences | Publishing | Android Signing Keys and see if that makes a difference.
Comment 5 Greg Munn 2015-05-15 11:34:53 UTC
@Ryan, I think I have it sorted out. I was able to reproduce the error if I tried to import a key several times. I'll be submitting the patch for the next service release.

In the mean time, to work around the issue and get builds you can publish, set the signing properties into the project file - just don't check the changed into your source control if you don't want the password stored there.  Project Options | Android Package Signing.

Then you can use Project | Create Android Package and distribute that as well as Archive for Publishing.
Comment 6 Greg Munn 2015-05-15 11:47:20 UTC
*** Bug 30107 has been marked as a duplicate of this bug. ***
Comment 7 Parmendra Kumar 2015-05-18 11:09:06 UTC
@Greg

To verify this issue, I have tried to reproduce it and not able to reproduce. I am successfully import signing key and XS doesn't crash.

Screencast for the same: http://www.screencast.com/t/F8SJWAqgu

Please follow  the screencast and let me know if I have missed anything.

Environment info:

Xamarin Studio  5.9 (build 464)

Installation UUID: 1a096c6f-0678-402e-89b2-a2c10f7e80e4
Runtime: Mono 4.0.1 ((detached/11b5830)
Operating System  Mac OS X 10.9.4
Comment 8 Greg Munn 2015-05-18 11:13:00 UTC
If the alias details show up in the dialog, cancel and repeat. It's the update of the alias details in the details box that crashes if it's done in a thread other than the UI thread.

It may be more difficult to reproduce on some machines than others. I did reproduce it after a few tries myself.
Comment 9 Peter Collins 2015-05-19 17:50:07 UTC
I'm still able to reproduce this using steps similar to what you've mentioned in Comment #8:
http://screencast.com/t/xZ5o5k7hvFq

> 1. Open project -> View Archives/Archive For Publishing.
> 2. Click Sign And Distribute and proceed until reaching the Android Signing Identity window.
> 3. Click Import An Existing Key.
> 4. Browse for keystore, select it and enter password.
> 5. Repeat step 4 a few times without fully importing it.

IDE Log:
https://gist.github.com/pjcollins/1a268873810137520dd5

Environment:
https://gist.github.com/pjcollins/74f337b439518265f0f8
Comment 10 xamarin-release-manager 2015-05-28 08:13:47 UTC
Fixed in version 6.0.0.735 (profiler-xm-support)
Comment 11 Peter Collins 2015-06-05 12:35:38 UTC
I'm no longer able to reproduce this using master/df17b7b.
Comment 12 Ryan 2015-06-08 06:54:05 UTC
I am still getting this every time I try to sign my app, and I am fully up to date with Xamarin Studio (5.9,3) and Xamarin.Android (5.1.3.1), also my SDK. This is causing a lot of problems as we cannot release any builds and we are missing deadlines.
Comment 13 Ryan 2015-06-08 07:43:39 UTC
I would sign the app using the keytool, but I cannot find the archive anywhere on my machine. Could somebody tell me where it is stored?
Comment 14 Ryan 2015-06-08 07:55:33 UTC
Ok, found the archive.
Comment 15 Peter Collins 2015-06-08 10:04:31 UTC
@Ryan This fix will be provided as part of XS 5.9.4 which should be in the Alpha channel early this week.
Comment 16 xamarin-release-manager 2015-06-08 11:18:49 UTC
Fixed in version 5.9.4.4 (monodevelop-5.9-branch)
Comment 17 Ryan 2015-06-09 04:17:07 UTC
Cheers guys :)
Comment 18 Mohit Kheterpal 2015-06-23 13:23:03 UTC
this issue is verified by Peter in trello card : https://trello.com/c/poCMuVrY/51-xs-bug-30072-crash-when-signing-android-app.

Hence closing this issue.

Note You need to log in before you can comment on or make changes to this bug.