Bug 12723 - ios sample "Frog Scroller" throws Exception with Linker:Link all Assemblies
Summary: ios sample "Frog Scroller" throws Exception with Linker:Link all Assemblies
Status: VERIFIED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Samples ()
Version: 6.3.x
Hardware: PC Mac OS
: --- enhancement
Target Milestone: Future Cycle (TBD)
Assignee: GouriKumari
URL:
Depends on:
Blocks: 12941
  Show dependency tree
 
Reported: 2013-06-17 14:24 UTC by Atin
Modified: 2014-01-07 10:33 UTC (History)
4 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:
VERIFIED FIXED

Description Atin 2013-06-17 14:24:43 UTC
1. Open Frog Scroller sample in X.S.
2. Select linker option Link all assemblies.
3. Debug or run the application.

Actual result:
Application is throwing 'System.InavlidOperationException' with link all assemblies Linker option. However its working fine with Don't link and Link sdk assemblies only options.

Supplement info:
Stack trace: https://gist.github.com/atin360/3e1b0b6d57a7a1b4aff3
iOS device log: https://gist.github.com/atin360/28e0649c0a2ee0348631

Expected result:
Application should run successfully with link all assemblies option.

Environment details:
All mac
XS 4.0.7- 0f1da1e7f83345a52a4b68b8142ce699a6b2ada0
Mono 3.0.11 ((no/edc181c)
6.3.6.76 
Device info: iPhone4 6.1.3

App info: monotouch-samples-master974d38caf99f18d189b58da0ecd7d0f146de5f72

Regression status: NOT REGRESSION,This issue also exist with stable MT 6.2.7.1
Comment 3 Sebastien Pouliot 2013-07-05 09:25:29 UTC
I cannot duplicate the issue.

I nearly certain that this issue only existed when using `clang` (as show in your log in comment #2) and was fixed by Rolf on [1] (same commit as bug #12941). Since then we moved back to use `gcc`, by default for 6.3.x (unless `gcc` is not found, e.g. xcode5).

If I'm wrong (and you can duplicate this again) please re-open.

[1] 531363428a0852db52a91c7460551ac8ccc308b1
[2] b7e6b9535ec274c0ea7c20c7225468246bcaa430

*** This bug has been marked as a duplicate of bug 12941 ***
Comment 4 Atin 2013-07-08 11:06:53 UTC
Today, We have checked this issue with following builds:

All mac
XS 4.0.9(build 15)
MT 6.3.7.177 
Mono 3.1.0 ((no/1c4db5e)

This issue still exists Application is throwing 'System.InavlidOperationException' with link all
assemblies Linker option. Hence Reopening this issue.
Comment 5 PJ 2013-07-08 11:58:09 UTC
Given that Sebastien says Xcode version is a factor here in comment 3, please include the Xcode version. If it's Xcode 5, then he knows what the issue is, otherwise there is more investigation needed.
Comment 6 Atin 2013-07-08 12:46:55 UTC
 This issue is exist with xcode 4.6.2, xcode 4.6 and xcode 4.5.
Comment 7 Sebastien Pouliot 2013-07-08 12:53:47 UTC
Sorry for the confusion, my comment #3 was a reply to comment #2 - and that's fixed.

This is a sample issue. Note that unlike "Link SDK" (where Xamarin *has* to get right), "Link All" works only if the applications (the sample in this case) takes care about it. 

IOW there's no guarantee any application will work with "Link All" if it as not been developped/tested with this in mind. It also means I'm not gonna fix every sample to work under "Link All" ;-)

You can either:

1. keep a list of apps what are "linker friendly" (i.e. where "Link All" works) and ensure it does not regress over time; or

2. find the original sample author to fix its samples to work under all settings; or

3. mix 1 and 2

note: updated severity and target
Comment 9 GouriKumari 2014-01-06 18:19:46 UTC
Modified FrogScroller sample app to use "Linksdk assembly" only.

Test Env:

Xamarin Studio
Version 4.2.2 (build 2)
Installation UUID: 5ed3a124-4b77-4c6f-beb9-c830fd815e2a
Runtime:
	Mono 3.2.5 ((no/964e8f0)
	GTK+ 2.24.20 theme: Raleigh
	GTK# (2.12.0.0)
	Package version: 302050000

Apple Developer Tools
Xcode 5.0.1 (3335.23)
Build 5A2053


Xamarin.iOS
Version: 7.0.4.209 (Enterprise Edition)
Hash: 23a0827
Branch: 
Build date: 2013-11-11 16:04:00-0500

Device: iPad 7.0.3
Comment 10 Atin 2014-01-07 10:33:41 UTC
Today, we have checked this issue with:

XS 4.2.3(build 29)
MT 7.0.6.166
App info: monotouch-samples-master 4c4db9c34329c89c9f9b739d9b98c7e11d3324ae
Device info: iPhone 4s 7.0.4

Now the application is not throwing exception with Link All assemblies option, application is run successfully on device and simulator.

Hence marking this as Verified.