Bug 23089 - Attaching an event to DialogViewController.RefreshRequested crashes
Summary: Attaching an event to DialogViewController.RefreshRequested crashes
Status: VERIFIED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: master
Hardware: Macintosh Mac OS
: --- major
Target Milestone: 8.2.0
Assignee: Sebastien Pouliot
URL:
Depends on:
Blocks:
 
Reported: 2014-09-17 07:41 UTC by Matthew Leibowitz
Modified: 2014-10-02 12:32 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 Matthew Leibowitz 2014-09-17 07:41:35 UTC
mono-rt: Stacktrace:

mono-rt:   at <unknown> <0xffffffff>
mono-rt:   at (wrapper managed-to-native) System.Runtime.InteropServices.Marshal.copy_to_unmanaged (System.Array,int,intptr,int) <IL 0x00010, 0xffffffff>
mono-rt:   at System.Runtime.InteropServices.Marshal.Copy (byte[],int,intptr,int) [0x00000] in /Developer/MonoTouch/Source/mono/mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs:106
mono-rt:   at MonoTouch.Dialog.Util.FromResource (System.Reflection.Assembly,string) [0x00066] in /Developer/MonoTouch/Source/MonoTouch.Dialog/MonoTouch.Dialog/Utilities/Controls.cs:59
mono-rt:   at MonoTouch.Dialog.RefreshTableHeaderView..cctor () [0x00000] in /Developer/MonoTouch/Source/MonoTouch.Dialog/MonoTouch.Dialog/Utilities/Controls.cs:74
mono-rt:   at (wrapper runtime-invoke) object.runtime_invoke_void (object,intptr,intptr,intptr) <IL 0x0004c, 0xffffffff>
mono-rt:   at <unknown> <0xffffffff>
mono-rt:   at MonoTouch.Dialog.DialogViewController.MakeRefreshTableHeaderView (CoreGraphics.CGRect) [0x00000] in /Developer/MonoTouch/Source/MonoTouch.Dialog/MonoTouch.Dialog/DialogViewController.cs:590
mono-rt:   at MonoTouch.Dialog.DialogViewController.ConfigureTableView () [0x00017] in /Developer/MonoTouch/Source/MonoTouch.Dialog/MonoTouch.Dialog/DialogViewController.cs:581
mono-rt:   at MonoTouch.Dialog.DialogViewController.LoadView () [0x00064] in /Developer/MonoTouch/Source/MonoTouch.Dialog/MonoTouch.Dialog/DialogViewController.cs:568
mono-rt:   at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) <IL 0x0004e, 0xffffffff>
mono-rt:   at <unknown> <0xffffffff>
mono-rt:   at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain (int,string[],intptr,intptr) <IL 0x00095, 0xffffffff>
mono-rt:   at UIKit.UIApplication.Main (string[],intptr,intptr) [0x00005] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:62
mono-rt:   at UIKit.UIApplication.Main (string[],string,string) [0x00038] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIApplication.cs:46
mono-rt:   at Sqlite.Sample.Application.Main (string[]) [0x00008] in /Users/matthew/projects-temp/components/sqlite-net/samples/SQLite.iOS.Sample/Sqlite.Sample/Main.cs:17
mono-rt:   at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) <IL 0x00050, 0xffffffff>
Comment 1 Matthew Leibowitz 2014-09-17 07:52:55 UTC
This is nicely formatted one:

https://gist.github.com/mattleibow/bd681dc11ec67f4c9e80
Comment 2 Sebastien Pouliot 2014-09-17 09:43:51 UTC
That looks like a miscompiled MonoTouch.Dialog (missing or, more likely, broken resource).

Failure happens when trying to execute this line (from the static ctor).

		static UIImage arrow = Util.FromResource (null, "arrow.png");
Comment 3 Sebastien Pouliot 2014-09-17 10:24:22 UTC
The same code (as comment #1) works fine with me. Can you tell us exactly which versions* of the software you're using ?

Also the version of iOS (sim or devices) along with the type of device could be helpful (this is not the type of bugs that is generally related to this but I rather try to replicate this as closely as possible).

* 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).
Comment 4 Matthew Leibowitz 2014-09-17 11:22:37 UTC
I am using iPad Air with iOS 7.0



=== Xamarin Studio ===

Version 5.4 (build 239)
Installation UUID: 84e2ffc5-77dc-45c2-8014-eb44886e0c27
Runtime:
	Mono 3.8.0 ((no/45d0ba1)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 308000009

=== Xamarin.Android ===

Version: 4.16.0 (Business Edition)
Android SDK: /Users/matthew/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.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		4.5    (API level 21)
Java SDK: /usr
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)

=== Apple Developer Tools ===

Xcode 6.0 (6299)
Build 6A313

=== Xamarin.iOS ===

Version: 8.0.0.60 (Business Edition)
Hash: b26679f
Branch: 
Build date: 2014-09-16 12:47:14-0400

=== Xamarin.Mac ===

Version:

=== Build Information ===

Release ID: 504000239
Git revision: 338110385bb89c5774e89ffcb15d8f2039e7fbcd
Build date: 2014-09-16 12:25:53-04
Xamarin addins: 05241f5ab70cf79388a0f113bc6877780ed1024a

=== Operating System ===

Mac OS X 10.9.4
Darwin Matthews-Mac.local 13.3.0 Darwin Kernel Version 13.3.0
    Tue Jun  3 21:27:35 PDT 2014
    root:xnu-2422.110.17~1/RELEASE_X86_64 x86_64
Comment 5 Matthew Leibowitz 2014-09-17 11:23:00 UTC
It works fine in classic apps
Comment 6 Sebastien Pouliot 2014-09-17 11:48:56 UTC
ah, I need to start adding classic/unified to my question list (and better check the stack trace, UIKit.UIApplication.Main was an hint).
Comment 7 Sebastien Pouliot 2014-09-17 15:26:59 UTC
This works fine (unified) on master, I'll confirm with 8.2 (which will be alpha pretty soon) but I think it's already fixed.
Comment 8 Sebastien Pouliot 2014-09-17 16:24:15 UTC
Got it, it only happens on 64 (not 32) bits.
Comment 9 Sebastien Pouliot 2014-09-17 16:55:19 UTC
Fixed in monotouch/master c8eda0180aedfc7111aee9ec02a4521abe841bfe
and monotouch-8.2.0-branch 973f8d4c74f6248e067fef5b387c3b82b7545fe5
Comment 10 Danish Akhtar 2014-10-01 11:31:02 UTC
I am trying to verify this issue but not sure about the steps. Could you please provide test case or steps? so, we can verify this issue.

Thanks
Comment 11 GouriKumari 2014-10-02 12:32:54 UTC
Verified with Xamarin.iOS 8.2.0: 

Unified template app builds and launches successfully with the code in comment #1.

Build Log: https://gist.github.com/GouriKumari/cfc460247370ed788db4
App launches on device without any crash.

Test Env:
Xamarin Studio
Version 5.4 (build 236)
Installation UUID: 5ed3a124-4b77-4c6f-beb9-c830fd815e2a
Runtime:
	Mono 3.10.0 ((detached/47db868)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 310000019

Apple Developer Tools
Xcode 6.0.1 (6528)
Build 6A317

Xamarin.iOS
Version: 8.2.0.191 (Enterprise Edition)
Hash: ff9d4a0
Branch: 
Build date: 2014-10-01 01:14:53-0400