Bug 26445 - Xamarin.Mac throws a System.InvalidCastException on selecting a file to upload from Webview
Summary: Xamarin.Mac throws a System.InvalidCastException on selecting a file to uploa...
Status: RESOLVED FIXED
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: Other ()
Version: 1.0.x
Hardware: PC Mac OS
: Normal normal
Target Milestone: ---
Assignee: Rolf Bjarne Kvinge [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2015-01-27 03:49 UTC by Prashant Cholachagudda
Modified: 2015-02-02 11:08 UTC (History)
4 users (show)

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


Attachments
Test case (14.15 KB, application/zip)
2015-01-27 03:49 UTC, Prashant Cholachagudda
Details


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 FIXED

Description Prashant Cholachagudda 2015-01-27 03:49:53 UTC
Created attachment 9511 [details]
Test case

Xamarin.Mac throws a System.InvalidCastException on selecting a file to upload from Webview.
Stacttrace:
System.InvalidCastException: Cannot cast from source type to destination type.
  at at (wrapper castclass) object:__castclass_with_cache (object,intptr,intptr)
  at ObjCRuntime.NSObjectMarshaler`1[WebKit.WebOpenPanelResultListener].MarshalNativeToManaged (IntPtr handle) [0x00002] in /Users/builder/data/lanes/xamcore-lion-1.10-branch/2ff3e7b7/source/xamcore/maccore/src/ObjCRuntime/NSObjectMarshaler.cs:35
  at at (wrapper native-to-managed) object:[TestFileUpload.MyWebUIDeligate:Void UIRunOpenPanelForFileButton(WebKit.WebView, WebKit.WebOpenPanelResultListener)] (Foundation.NSObject,ObjCRuntime.Selector,WebKit.WebView,WebKit.WebOpenPanelResultListener)
  at at (wrapper managed-to-native) AppKit.NSApplication:NSApplicationMain (int,string[])
  at AppKit.NSApplication.Main (System.String[] args) [0x00041] in /Users/builder/data/lanes/xamcore-lion-1.10-branch/2ff3e7b7/source/xamcore/src/AppKit/NSApplication.cs:105
  at TestFileUpload.MainClass.Main (System.String[] args) [0x00007] in /Users/prashantvc/Desktop items/Xamarin/120047/MacUploadIssue/TestFileUpload/Main.cs:12
Comment 1 Chris Hamons 2015-01-27 12:35:20 UTC
I did some poking around. This is fixed in master but not in alpha/beta.
Comment 3 Rolf Bjarne Kvinge [MSFT] 2015-02-02 11:08:32 UTC
I can confirm this is fixed in maccore/master.