Bug 22729 - NSKeyedUnarchiver.UnarchiveObject System.EntryPointNotFoundException xamarin_IntPtr_objc_msgSend_IntPtr
Summary: NSKeyedUnarchiver.UnarchiveObject System.EntryPointNotFoundException xamarin_...
Status: VERIFIED FIXED
Alias: None
Product: Xamarin.Mac
Classification: Desktop
Component: Library (Xamarin.Mac.dll) ()
Version: 1.10.0
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: ---
Assignee: Chris Hamons
URL:
Depends on:
Blocks:
 
Reported: 2014-09-08 06:01 UTC by David Lilley
Modified: 2015-01-05 08:19 UTC (History)
3 users (show)

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


Attachments
Test Case (25.77 KB, application/zip)
2014-09-08 06:49 UTC, David Lilley
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:
VERIFIED FIXED

Description David Lilley 2014-09-08 06:01:03 UTC
When trying to retrieve just archived data I get a System.EntryPointNotFoundException has been thrown xamarin_IntPtr_objc_msgSend_IntPtr, The previous installation of xamarin.mac worked fine.

In my table delegate for drag and drop I am wanting to store the index of the dragged row.

public override bool WriteRows(NSTableView tableView, NSIndexSet rowIndexes, NSPasteboard pboard)
{ 

            NSData data = NSKeyedArchiver.ArchivedDataWithRootObject(rowIndexes);
            pboard.DeclareTypes(new string[]{ "AccountsOverviewTableView" } ,this); 
            pboard.SetDataForType(data,"AccountsOverviewTableView");
            return true;
}



 I have tried to create a small sample for you but that worked fine :(
Comment 1 David Lilley 2014-09-08 06:02:47 UTC
PS my set up
=== Xamarin Studio ===

Version 5.3 (build 440)
Installation UUID: 7d614215-ae86-4132-8cff-53347f7978db
Runtime:
	Mono 3.8.0 ((no/45d0ba1)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 308000009

=== Apple Developer Tools ===

Xcode 5.0.2 (3335.32)
Build 5A3005

=== Xamarin.Mac ===

Version: 1.10.0.10 (Business Edition)

=== Xamarin.Android ===

Not Installed

=== Xamarin.iOS ===

Version: 7.4.0.108 (Business Edition)
Hash: 77efa3f
Branch: 
Build date: 2014-08-26 07:59:55-0400

=== Build Information ===

Release ID: 503000440
Git revision: accb55419539e512cff857b14b80ec3107996511
Build date: 2014-09-01 08:53:05-04
Xamarin addins: 6dbac4b3a32df080bf98cde838ce89e573a92859

=== Operating System ===

Mac OS X 10.9.4
Darwin Dave-Lilleys-iMac.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 2 David Lilley 2014-09-08 06:13:09 UTC
Unhandled Exception:
System.EntryPointNotFoundException: xamarin_IntPtr_objc_msgSend_IntPtr
at (wrapper managed-to-native) MonoMac.ObjCRuntime.Messaging.xamarin_IntPtr_objc_msgSend_IntPtr (intptr,intptr,intptr) <IL 0x00011, 0x0008f>
at MonoMac.Foundation.NSKeyedUnarchiver.UnarchiveObject (MonoMac.Foundation.NSData) [0x00022] in /Users/builder/data/lanes/xamcore-lion-1.10-branch/1bfb1eb7/source/xamcore/src/build/compat/Foundation/NSKeyedUnarchiver.g.cs:185
at MacBanking.AccountsOverviewTableViewDataSource.WriteRows (MonoMac.AppKit.NSTableView,MonoMac.Foundation.NSIndexSet,MonoMac.AppKit.NSPasteboard) [0x00015] in /Users/dlilley/Code/Subsembly_Banking/MacBanking/Banking/OverviewView/AccountsOverviewTableViewSourceAndDelegate.cs:196
at (wrapper dynamic-method) object.[MacBanking.AccountsOverviewTableViewDataSource.Boolean WriteRows(MonoMac.AppKit.NSTableView, MonoMac.Foundation.NSIndexSet, MonoMac.AppKit.NSPasteboard)] (MonoMac.Foundation.NSObject,MonoMac.ObjCRuntime.Selector,MonoMac.AppKit.NSTableView,MonoMac.Foundation.NSIndexSet,MonoMac.AppKit.NSPasteboard) <IL 0x0001d, 0x00083>
at (wrapper native-to-managed) object.[MacBanking.AccountsOverviewTableViewDataSource.Boolean WriteRows(MonoMac.AppKit.NSTableView, MonoMac.Foundation.NSIndexSet, MonoMac.AppKit.NSPasteboard)] (MonoMac.Foundation.NSObject,MonoMac.ObjCRuntime.Selector,MonoMac.AppKit.NSTableView,MonoMac.Foundation.NSIndexSet,MonoMac.AppKit.NSPasteboard) <IL 0x000ab, 0x0025b>
at (wrapper managed-to-native) MonoMac.ObjCRuntime.Messaging.void_objc_msgSendSuper_IntPtr (intptr,intptr,intptr) <0x00012>
at MonoMac.AppKit.NSWindow.SendEvent (MonoMac.AppKit.NSEvent) [0x00051] in /Users/builder/data/lanes/xamcore-lion-1.10-branch/1bfb1eb7/source/xamcore/src/build/compat/AppKit/NSWindow.g.cs:2049
at MacBanking.BankingMainWindow.SendEvent (MonoMac.AppKit.NSEvent) [0x0001a] in /Users/dlilley/Code/Subsembly_Banking/MacBanking/Banking/BankingMainWindow.cs:168
at (wrapper dynamic-method) object.[MacBanking.BankingMainWindow.Void SendEvent(MonoMac.AppKit.NSEvent)] (MonoMac.Foundation.NSObject,MonoMac.ObjCRuntime.Selector,MonoMac.AppKit.NSEvent) <IL 0x00011, 0x00062>
at (wrapper native-to-managed) object.[MacBanking.BankingMainWindow.Void SendEvent(MonoMac.AppKit.NSEvent)] (MonoMac.Foundation.NSObject,MonoMac.ObjCRuntime.Selector,MonoMac.AppKit.NSEvent) <IL 0x0006c, 0x0017f>
at (wrapper managed-to-native) MonoMac.AppKit.NSApplication.NSApplicationMain (int,string[]) <0x00012>
at MonoMac.AppKit.NSApplication.Main (string[]) [0x00041] in /Users/builder/data/lanes/xamcore-lion-1.10-branch/1bfb1eb7/source/xamcore/src/AppKit/NSApplication.cs:105
at Subsembly.Application.Main (string[]) [0x00007] in /Users/dlilley/Code/Subsembly_Banking/MacBanking/Application.cs:107

[ERROR] FATAL UNHANDLED EXCEPTION: System.EntryPointNotFoundException: xamarin_IntPtr_objc_msgSend_IntPtr
at (wrapper managed-to-native) MonoMac.ObjCRuntime.Messaging.xamarin_IntPtr_objc_msgSend_IntPtr (intptr,intptr,intptr) <IL 0x00011, 0x0008f>
at MonoMac.Foundation.NSKeyedUnarchiver.UnarchiveObject (MonoMac.Foundationfailed to suspend thread 0xb090f000, hopefully it is dead
.NSData) [0x00022] in /Users/builder/data/lanes/xamcore-lion-1.10-branch/1bfb1eb7/source/xamcore/src/build/compat/Foundation/NSKeyedUnarchiver.g.cs:185
at MacBanking.AccountsOverviewTableViewDataSource.WriteRows (MonoMac.AppKit.NSTableView,MonoMac.Foundation.NSIndexSet,MonoMac.AppKit.NSPasteboard) [0x00015] in /Users/dlilley/Code/Subsembly_Banking/MacBanking/Banking/OverviewView/AccountsOverviewTableViewSourceAndDelegate.cs:196
at (wrapper dynamic-method) object.[MacBanking.AccountsOverviewTableViewDataSource.Boolean WriteRows(MonoMac.AppKit.NSTableView, MonoMac.Foundation.NSIndexSet, MonoMac.AppKit.NSPasteboard)] (MonoMac.Foundation.NSObject,MonoMac.ObjCRuntime.Selector,MonoMac.AppKit.NSTableView,MonoMac.Foundation.NSIndexSet,MonoMac.AppKit.NSPasteboard) <IL 0x0001d, 0x00083>
at (wrapper native-to-managed) object.[MacBanking.AccountsOverviewTableViewDataSource.Boolean WriteRows(MonoMac.AppKit.NSTableView, MonoMac.Foundation.NSIndexSet, MonoMac.AppKit.NSPasteboard)] (MonoMac.Foundation.NSObject,MonoMac.ObjCRuntime.Selector,MonoMac.AppKit.NSTableView,MonoMac.Foundation.NSIndexSet,MonoMac.AppKit.NSPasteboard) <IL 0x000ab, 0x0025b>
at (wrapper managed-to-native) MonoMac.ObjCRuntime.Messaging.void_objc_msgSendSuper_IntPtr (intptr,intptr,intptr) <0x00012>
at MonoMac.AppKit.NSWindow.SendEvent (MonoMac.AppKit.NSEvent) [0x00051] in /Users/builder/data/lanes/xamcore-lion-1.10-branch/1bfb1eb7/source/xamcore/src/build/compat/AppKit/NSWindow.g.cs:2049
at MacBanking.BankingMainWindow.SendEvent (MonoMac.AppKit.NSEvent) [0x0001a] in /Users/dlilley/Code/Subsembly_Banking/MacBanking/Banking/BankingMainWindow.cs:168
at (wrapper dynamic-method) object.[MacBanking.BankingMainWindow.Void SendEvent(MonoMac.AppKit.NSEvent)] (MonoMac.Foundation.NSObject,MonoMac.ObjCRuntime.Selector,MonoMac.AppKit.NSEvent) <IL 0x00011, 0x00062>
at (wrapper native-to-managed) object.[MacBanking.BankingMainWindow.Void SendEvent(MonoMac.AppKit.NSEvent)] (MonoMac.Foundation.NSObject,MonoMac.ObjCRuntime.Selector,MonoMac.AppKit.NSEvent) <IL 0x0006c, 0x0017f>
at (wrapper managed-to-native) MonoMac.AppKit.NSApplication.NSApplicationMain (int,string[]) <0x00012>
at MonoMac.AppKit.NSApplication.Main (string[]) [0x00041] in /Users/builder/data/lanes/xamcore-lion-1.10-branch/1bfb1eb7/source/xamcore/src/AppKit/NSApplication.cs:105
at Subsembly.Application.Main (string[]) [0x00007] in /Users/dlilley/Code/Subsembly_Banking/MacBanking/Application.cs:107
Comment 3 David Lilley 2014-09-08 06:49:16 UTC
Created attachment 7961 [details]
Test Case

Run the Application 
Press the button so a new window appears
Try to reorder the table by drag and drop
Comment 4 David Lilley 2014-09-08 11:32:36 UTC
hmm.. Could this be related to... 
https://bugzilla.xamarin.com/show_bug.cgi?id=22714

Incidentally a work around for drag and drop cell rows for any one else who appears on this thread

instead of...
NSData data = NSKeyedArchiver.ArchivedDataWithRootObject(rowIndexes);

use..

int nIndexFrom = (int)rowIndexes.FirstIndex;
NSData data = new NSString(nIndexFrom.ToString()).DataUsingEncoding(NSStringEncoding.UTF8);
 

and

 NSData data = info.DraggingPasteboard.GetDataForType("AccountsOverviewTableView");

//NSIndexSet aIndexSet = (NSIndexSet)NSKeyedUnarchiver.UnarchiveObject(data);
//int nIndexFrom = (int)aIndexSet.FirstIndex;

NSString aNSString = NSString.FromData(data,NSStringEncoding.UTF8);
int nIndexFrom = int.Parse(aNSString.ToString());
Comment 5 Parmendra Kumar 2014-09-09 05:05:48 UTC
I have checked this issue with attached sample project and I am able to reproduce it.
I observed that when we drag and drop cell rows its throw a Exception "EntryPointNotFoundException".

Screencast:http://screencast.com/t/d98xUk6fPesf
Exception: https://gist.github.com/saurabh360/3a1ca10aafe7fef09179
Output Log: https://gist.github.com/saurabh360/f1df738789c0fab10e29

Environment Info:
=== Xamarin Studio ===

Version 5.3 (build 440)
Installation UUID: 1a096c6f-0678-402e-89b2-a2c10f7e80e4
Runtime:
	Mono 3.8.0 ((no/45d0ba1)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 308000009

=== Apple Developer Tools ===

Xcode 5.1 (5084)
Build 5B130a

=== Xamarin.Mac ===

Version: 1.10.0.10 (Business Edition)

=== Xamarin.Android ===

Version: 4.16.0 (Business Edition)
Android SDK: /Users/360_macmini/Desktop/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)
		3.2    (API level 13)
		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-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)

=== Xamarin.iOS ===

Version: 7.4.0.108 (Business Edition)
Hash: 77efa3f
Branch: 
Build date: 2014-08-26 07:59:55-0400

=== Build Information ===

Release ID: 503000440
Git revision: accb55419539e512cff857b14b80ec3107996511
Build date: 2014-09-01 08:53:05-04
Xamarin addins: 6dbac4b3a32df080bf98cde838ce89e573a92859

=== Operating System ===

Mac OS X 10.9.4
Darwin ShrutiMac.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 6 Chris Hamons 2014-09-26 16:55:08 UTC
Just FYI, we have a fix for this internal and I will update this bug when it is released.
Comment 7 Chris Hamons 2014-10-01 15:41:35 UTC
This should be resolved in the latest Xamarin.Mac beta. Please reopen the bug if updating to that and rebuilding doesn't solve the issue for you.
Comment 8 Prashant manu 2015-01-05 08:19:54 UTC
We have checked and now no exception appears when we drag and drop cell rows.
Screencast: http://www.screencast.com/t/us5hKysL

Environment Info:
Xamarin Studio
Version 5.7 (build 660)
Installation UUID: 0b7eaebc-a0ed-4b58-81df-91e378cad28c
Runtime:
 Mono 3.12.0 ((detached/a813491)
 GTK+ 2.24.23 (Raleigh theme)

 Package version: 312000068

Xamarin.Android
Version: 4.20.0.28 (Business Edition)
Android SDK: /Users/Admin_Mac/Desktop/Anddk/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)
  5.0    (API level 21)
Java SDK: /usr
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)

Apple Developer Tools
Xcode 6.1.1 (6611)
Build 6A2008a

Xamarin.iOS
Version: 8.6.0.45 (Business Edition)
Hash: 0376f62
Branch: 
Build date: 2014-12-23 17:34:21-0500

Xamarin.Mac
Version: 1.11.3.0 (Business Edition)

Build Information
Release ID: 507000660
Git revision: 6a74f9bdb90d9415b597064d815c9be38b401fee
Build date: 2014-12-18 00:38:00-05
Xamarin addins: 57be0f5e1433cb58b70ea9b52e9dc77ad791be40

Operating System
Mac OS X 10.10.2
Darwin Admin-Macs-Mac-mini.local 14.1.0 Darwin Kernel Version 14.1.0
    Thu Nov 13 18:36:56 PST 2014
    root:xnu-2782.10.65~2/RELEASE_X86_64 x86_64