Bug 26015 - Null reference on UIImage.FromFile and UIImage.FromBundle since updating to unified project
Summary: Null reference on UIImage.FromFile and UIImage.FromBundle since updating to u...
Status: RESOLVED DUPLICATE of bug 25569
Alias: None
Product: iOS
Classification: Xamarin
Component: MSBuild ()
Version: XI 8.6.0
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-01-14 10:05 UTC by Rachel
Modified: 2015-01-21 14:33 UTC (History)
3 users (show)

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

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED DUPLICATE of bug 25569

Description Rachel 2015-01-14 10:05:05 UTC
I have been upgrading my current app to unified api for the last couple of days - it has a taken a while due to issues with upgrading MvvmCross and having to work through them. I used the migration tool within Xamarin studio to do the unified upgrade and I am now at a stage where my code compiles and launches the app on both device and simulator but it crashes as soon as it hits the first UIImage.From file call which is being caused by a null reference. All of the images are still within the project, has/is anyone else experiencing this with their upgrade?

Note: I'm on the latest stable release of Xamarin Studio.
Comment 1 Sebastien Pouliot 2015-01-14 11:02:31 UTC
Can you check that the images are in the .app being generated ?

e.g. maybe the build action is not correctly set (and the image are not copied).
Comment 2 Rachel 2015-01-14 11:09:17 UTC
We've checked the .app folder and there are no resources for the iOS project, some resources from external projects are being copied over. No changes other than migrating to 64-bit has been completed on the project.
Comment 3 Sebastien Pouliot 2015-01-14 11:17:53 UTC
@Jeff that sounds like a dupe (or something very similar) of bug #25569
Comment 4 Rachel 2015-01-14 12:31:28 UTC
We implemented the edit to the Xamarin.iOS.Common.targets file mentioned in the other bug and that has resolved the issue. Thanks for advising of the other bug saved me a late night.
Comment 5 Sebastien Pouliot 2015-01-14 13:15:26 UTC
@Rachel glad it helped, I assume it was comment #3 right ?

Also could you tell us which versions of the software* you're using ?

* The easiest way to get exact version information is to use the "Xamarin Studio" menu, "About Xamarin Studio" item, "Show Details" button and copy/paste the version informations (you can use the "Copy Information" button).


@Jeff is not that fix (comment #3 from bug #25569) part of 8.6 ?
Comment 6 Rachel 2015-01-15 03:58:51 UTC
Yeah comment #3. Here is the software version information. hope it helps.

=== Xamarin Studio ===

Version 5.7 (build 661)
Installation UUID: aa614451-99c6-49bc-9f7d-12b5224d4fff
Runtime:
	Mono 3.12.0 ((detached/a813491)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 312000068

=== Apple Developer Tools ===

Xcode 6.1.1 (6611)
Build 6A2008a

=== Xamarin.iOS ===

Version: 8.6.0.51 (Enterprise Edition)
Hash: dfb682f
Branch: 
Build date: 2015-01-08 13:39:32-0500

=== Xamarin.Mac ===

Not Installed

=== Xamarin.Android ===

Version: 4.20.0.28 (Enterprise Edition)
Android SDK: /Users/rachelmontague/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.1    (API level 12)
		4.0    (API level 14)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
Java SDK: /usr
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-466.1-11M4716)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-466.1, mixed mode)

=== Build Information ===

Release ID: 507000661
Git revision: b70bab61da996da29045ea8ee8aed1a6faedbe78
Build date: 2015-01-05 16:31:31-05
Xamarin addins: 82f6c71490562d6cd125a09287f441902fdac3d7

=== Operating System ===

Mac OS X 10.10.1
Darwin Rachels-Mac-mini-4.local 14.0.0 Darwin Kernel Version 14.0.0
    Fri Sep 19 00:26:44 PDT 2014
    root:xnu-2782.1.97~2/RELEASE_X86_64 x86_64
Comment 7 Rachel 2015-01-15 07:11:03 UTC
Yeah comment #3. Here is the software version information. hope it helps.

=== Xamarin Studio ===

Version 5.7 (build 661)
Installation UUID: aa614451-99c6-49bc-9f7d-12b5224d4fff
Runtime:
	Mono 3.12.0 ((detached/a813491)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 312000068

=== Apple Developer Tools ===

Xcode 6.1.1 (6611)
Build 6A2008a

=== Xamarin.iOS ===

Version: 8.6.0.51 (Enterprise Edition)
Hash: dfb682f
Branch: 
Build date: 2015-01-08 13:39:32-0500

=== Xamarin.Mac ===

Not Installed

=== Xamarin.Android ===

Version: 4.20.0.28 (Enterprise Edition)
Android SDK: /Users/rachelmontague/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.1    (API level 12)
		4.0    (API level 14)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
Java SDK: /usr
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-466.1-11M4716)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-466.1, mixed mode)

=== Build Information ===

Release ID: 507000661
Git revision: b70bab61da996da29045ea8ee8aed1a6faedbe78
Build date: 2015-01-05 16:31:31-05
Xamarin addins: 82f6c71490562d6cd125a09287f441902fdac3d7

=== Operating System ===

Mac OS X 10.10.1
Darwin Rachels-Mac-mini-4.local 14.0.0 Darwin Kernel Version 14.0.0
    Fri Sep 19 00:26:44 PDT 2014
    root:xnu-2782.1.97~2/RELEASE_X86_64 x86_64
Comment 8 Jeffrey Stedfast 2015-01-21 12:07:59 UTC
just back-ported the fix for bug #25569 to the 8.6 branch (it looks like it hadn't been back-ported prior)
Comment 9 Jeffrey Stedfast 2015-01-21 14:33:12 UTC

*** This bug has been marked as a duplicate of bug 25569 ***