Re: [MonoTouch] XIB file in sub-folder of Library Project
Awesome - thanks Jeff. On Fri, Jul 20, 2012 at 10:05 AM, Jeff Stedfast j...@xamarin.com wrote: Hi Phil, Never mind about submitting a bug report (I've just fixed it, so it should end up in the next release; 3.0.4 or 3.0.3.5 or whatever it ends up being). Jeff On Thu, Jul 19, 2012 at 4:46 PM, Jeff Stedfast j...@xamarin.com wrote: Hi Phil, This appears to be a bug in MonoDevelop's logic for calculating the .nib paths to be embedded into the resulting dll. Would you mind submitting a bug report about this to http://bugzilla.xamarin.com? I'll be taking a look into fixing this issue shortly. Thanks! Jeff On Wed, Jul 18, 2012 at 3:10 AM, Phil Cockfield p...@cockfield.netwrote: I have a *MonoTouch Library Project *referenced by my main MonoTouch iPhone app project. In that project I am creating an *iPhone View Controller* from the template which create the *UIViewController* along with the XIB file. I am creating this in a sub-folder of the library project (eg. * /my_lib/foo* ) This throws a build error, saying Error CS1566: Error reading resource file `/PATH/my_lib/obj/Debug/nibs/foo/bar.nib' (CS1566) This doesn't appear to be a limitation of library projects, because when I create a UIController/XIB template in the root folder it builds just find. Is there something special I need to configure so that it knows how to build the XIB file? Thanks -- *Phil *Cockfield ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch -- *Phil *Cockfield ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Implementing Dispose on an [NSObject]
Thanks Rodrigo * * * * On Fri, Jul 20, 2012 at 8:40 AM, Rodrigo Kumpera kump...@xamarin.comwrote: You should only override void Dispose (bool disposing), and make sure to always call the base method. On Thu, Jul 19, 2012 at 5:15 PM, Phil Cockfield p...@cockfield.netwrote: What's the correct way of hooking into the *Dispose* invokation in classes derived from *NSObject*? I have an example in the gist here https://gist.github.com/3146438. https://gist.github.com/3146438 This is the full IDisposable pattern as I've seen it declared in the MSDN docs. There's a lighter weight version in the comment below. The problem is, NSObject implments IDisposable itself, and doesn't appear to provide any overridable *OnDisposing* type methods. I get a build warning saying to use the *new* keyword on my Dispose method. new is dangerous to use (right?). If the object is cast as NSObject, and Dispose is run - then the parent method will run, but my derived method won't. That's my understanding at least, please correct me if I'm wrong. So what is the best practice for hooking into dispose in these types of scenarios? Thanks! -- *Phil *Cockfield ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch -- *Phil *Cockfield ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] lockups during debugging? or deadlocks in my code?
Ok, have tried to do this but didn't get very far. Froze up, but no Program ID info in MonoDevelop Application Output. In Xcode console, This is what I have: Jul 30 20:53:51 unknown com.apple.debugserver-64[6966] Warning: debugserver-64 for armv6 Copyright (c) 2007-2009 Apple, Inc. All Rights Reserved. Jul 30 20:53:51 unknown com.apple.debugserver-64[6966] Warning: Connecting to com.apple.debugserver service... Jul 30 20:53:51 unknown com.apple.launchd[1] Warning: (UIKitApplication:com.groovepond.app[0x4710]) Spawned and waiting for the debugger to attach before continuing... Jul 30 20:53:51 unknown com.apple.debugserver-64[6966] Warning: Got a connection, waiting for debugger instructions for task (null). Jul 30 20:53:51 unknown com.apple.debugserver-64[6966] Warning: 1 [1b36/1303]: error: ::read ( 4, 0x2ff609d4, 1024 ) = -1 err = Bad file descriptor (0x0009) Jul 30 20:53:51 unknown com.apple.debugserver-64[6958] Warning: 1 [1b2e/0303]: error: ::read ( 4, 0x2fe1c4b0, 1024 ) = 0 err = Bad file descriptor (0x0009) Jul 30 20:53:51 unknown mobile_installation_proxy[6962] Error: main: Could not receive request from host. Jul 30 20:53:51 unknown mobile_installation_proxy[6955] Error: main: Could not receive request from host. Jul 30 20:53:52 unknown kernel[0] Debug: lockbot[6949] Builtin profile: debugserver (sandbox) Jul 30 20:53:52 unknown kernel[0] Debug: launchd[6967] Builtin profile: container (sandbox) Jul 30 20:53:52 unknown kernel[0] Debug: launchd[6967] Container: /private/var/mobile/Applications/FEEC09F1-ADBD-4605-9E63-11B64257189C [69] (sandbox) Jul 30 20:54:20 unknown lockdownd[26] Error: libMobileGestalt computeUniqueDeviceID: total time for bb to return imei: 0 Jul 30 20:54:20 unknown lockdownd[26] Notice: 015d4000 copy_phonenumber: CTSettingCopyMyPhoneNumber() returned NULL Jul 30 20:54:21 unknown lockdownd[26] Error: libMobileGestalt computeUniqueDeviceID: total time for bb to return imei: 0 Jul 30 20:54:21 unknown lockdownd[26] Notice: 015d4000 copy_phonenumber: CTSettingCopyMyPhoneNumber() returned NULL Jul 30 20:54:21 unknown DTFetchSymbols[6977] Notice: Found paths: Jul 30 20:54:21 unknown DTFetchSymbols[6977] Notice: /usr/lib/dyld Jul 30 20:54:21 unknown DTFetchSymbols[6977] Notice: /System/Library/Caches/com.apple.dyld/dyld_shared_cache_armv7 Jul 30 20:54:21 unknown DTFetchSymbols[6977] Notice: /Developer/usr/lib/CFDataFormatters.dylib Jul 30 20:54:21 unknown DTFetchSymbols[6977] Notice: /Developer/usr/lib/libdebugnub.dylib Jul 30 20:54:21 unknown DTFetchSymbols[6977] Notice: /Developer/usr/lib/libXcodeDebuggerSupport.dylib Jul 30 20:54:21 unknown DTFetchSymbols[6977] Notice: /Developer/Library/PrivateFrameworks/GPUTools.framework/libglInterpose.dylib Jul 30 20:54:21 unknown DTFetchSymbols[6977] Notice: /Developer/Library/PrivateFrameworks/GPUToolsCore.framework/GPUToolsCore Jul 30 20:54:21 unknown DTFetchSymbols[6977] Notice: /Developer/Library/PrivateFrameworks/DevToolsBundleInjection.framework/DevToolsBundleInjection Jul 30 20:54:21 unknown DTFetchSymbols[6977] Notice: /Developer/Library/Frameworks/SenTestingKit.framework/SenTestingKit I tried to gdb all PIDs mentioned (6977 etc...) and got the error below: MacbookAir:~ Dermot$ gdb program 6977 -bash: syntax error near unexpected token `6977' MacbookAir:~ Dermot$ gdb program 6977 GNU gdb 6.3.50-20050815 (Apple version gdb-1708) (Mon Aug 8 20:32:45 UTC 2011) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type show copying to see the conditions. There is absolutely no warranty for GDB. Type show warranty for details. This GDB was configured as x86_64-apple-darwin...File 'program' does not exist or is not a regular file. /Users/Dermot/6977: No such file or directory Unable to access task for process-id 6977: (os/kern) failure. On Mon, Jul 30, 2012 at 1:55 AM, Rolf Bjarne Kvinge r...@xamarin.comwrote: Hi, On Sat, Jul 28, 2012 at 3:50 AM, dermotos m...@dermotos.com wrote: Does anyone else experience random lockups/freezes of their app when debugging? It may indeed be some deadlocks in my code, but before I go hunting for them I thought id check incase maybe its a debugger issue. Strange thing is it only seems to happen when debugging, but I know from experience that issues like deadlocks/race conditions etc can often happen when the debugger is attached, simply because it may slow down certain parts of the code, and cause the issue to manifest itself (rather than being an actual problem with the debugger). There have been several bugs with the debugger that causes lockups / freezes, but it could also be your own code. The easiest way to determine this is to get a native stack trace for all threads for the app: Find the pid of the app - it is printed to the application output in MonoDevelop at startup. Then execute from a terminal: gdb
Re: [MonoTouch] Mountain Lion and MonoDevelop: SVN support missing
What issues have you got with xcode 4.4? I see it available on the AppStore but wanted to make sure ML was working fine first. Thanks for the heads up on the command line tools, will do that shortly. Cheers John -- View this message in context: http://monotouch.2284126.n4.nabble.com/Mountain-Lion-and-MonoDevelop-SVN-support-missing-tp4656225p4656232.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Mountain Lion and MonoDevelop: SVN support missing
Hi. On both my iMac and MacBook Pro the Interface Builder started to duplicate existing outlets and not registering new ones in the generated ObjC class. Tried to upgrade to MonoTouch 5.3.5 Beta and that fixed the IB issues, but introduced a host of new code issues... But that was for an existing project, haven't tried with a fresh clean project yet. Vennlig hilsen/Kind regards ALEXANDER VIKEN Appaloosa AS co-founder / COO / MTA (MVP/MCTS/MCP/CSM) Appaloosa på Facebook: http://appaloosa.no M: (+47) 472 71 000 | skype: alexander-appaloosa twitter: http://twitter.com/alexanderviken blog: http://agilemobility.net http://mobilteknologi.no bio: http://about.me/alexanderviken On 30. juli 2012, at 13:15, HairyJohn m...@johnhair.com wrote: What issues have you got with xcode 4.4? I see it available on the AppStore but wanted to make sure ML was working fine first. Thanks for the heads up on the command line tools, will do that shortly. Cheers John -- View this message in context: http://monotouch.2284126.n4.nabble.com/Mountain-Lion-and-MonoDevelop-SVN-support-missing-tp4656225p4656232.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
[MonoTouch] Bindings for PDFTRON, FastPDFKit or PSPDFKIT?
Hi, has anybody created (full) bindings for PDFTRON, FastPDFKit or PSPDFKIT? Thanks! René ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] When to implement Foo(IntPtr) constructors
Hi Adam You really need a reply from Rolf or Sebastian, but they are in Boston at the moment at the (annual?) company meetup. I've CCed them, but I dont know how much spare time they have this week. So, just so this doesn't drop off the bottom of the list, this SO item from Miguel explains it well: http://stackoverflow.com/questions/5623223/no-constructor-found-for-viewcontroller-ctorsystem-intptr I suspect that it might be a case where you need to keep a reference to the object in a class-local variable, rather than a method-local one or just assigning it to a (obj-c?) object. I've never really implemented them, tho maybe I should :). I used to have the same exceptions as this, but I've not seen it in live debug logs for ages - it's possible that the GC got fixed (or improved) Drop the list an email back if that doesn't answer your question Cheers Nic On Fri, Jul 27, 2012 at 8:10 PM, Adam Kemp adam.k...@ni.com wrote: I'm hitting a crash when receiving memory warnings in some situations. In one view controller (A) we are handling the memory warning by calling Dispose() on another view controller (B) which is no longer necessary. Unfortunately, something later on during the process of the (native) memory warning handling code is trying to call a method in view controller B, and it's trying to construct a managed object to do so. This causes an exception because I don't have a constructor which takes an IntPtr so the runtime can't construct the managed object. I know that if implementing the IntPtr constructor the crash doesn't occur. I also know that it goes away if I remove the call to Dispose, but I don't think that's a guaranteed fix since the object could still be GCed. I'm looking for the right fix, but I have several unanswered questions about what is going on that I need to find an answer to in order to find it. The first question is what method is being called on view controller B, and why is it wanting a managed object to call that method? I don't have an override for DidReceiveMemoryWarning or ViewDidUnload. In fact, the only override in that view controller (which inherits directly from UITableViewController) is ViewDidLoad. The exception tells me Selector invoked from objective-c on a managed object (0xB9E72D0) that has been GC'ed, but it won't tell me which selector was invoked. In a simpler test case that I created I could only reproduce the crash if I overrode either DidReceiveMemoryWarning or ViewDidUnload, but in my full application I get the crash even though I haven't implemented either. I don't understand why. Is there a trick to figuring out which method is being invoked when this exception occurs? The second question is what are the rules for when we are expected to implement the IntPtr constructor for classes that inherit from NSObject? I don't want to blindly add it to every class, especially since in some cases it probably can't be implemented in a sane way at all (the Dispose method might have released resources that you can't get back without arguments from a real constructor). Is there some rule for this? Does my situation fit that rule? Thanks. -- Adam Kemp adam.k...@ni.com (512) 683-6058 ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise b. http://www.fastchicken.co.nz/ mobileAgent (for FreeAgent): get your accounts in your pocket. http://goo.gl/IuBU Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa Earnest: Self-employed? Track your business expenses and income. http://earnestapp.com Nearest Bus: find when the next bus is coming to your stop. http://goo.gl/Vcz1p London Bike App: Find the nearest Boris Bike, and get riding! http://goo.gl/Icp2 ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] When to implement Foo(IntPtr) constructors
Thanks for the response, Nic. That explanation makes sense to me, but it doesn't really answer why in this particular case the MonoTouch runtime wants to resurrect the managed object. I am in fact releasing my last reference to that object, but that is because I really am completely done with it. It should actually be leaving memory. That is, when that managed reference goes away the unmanaged reference should leave memory as well. What's happening in this case is that the UIViewController base class subscribes to a notification for low memory warnings. I am releasing my last managed reference to this view controller in my own handler for low memory warnings (in a different view controller), but something (perhaps an autorelease call?) is keeping the view controller I want to go away to stay in memory long enough to want to handle that low memory notification. This is the behavior that I can reproduce in a test project. However, in my test project I can only get it to reproduce if I override ViewDidUnload or DidReceiveMemoryWarning in the view controller that I want to go away. In my real project I didn't implement either one of those, and yet it is being resurrected anyway. As I said, the only method I override in this view controller class is ViewDidLoad, and that method is not being called. Why would the runtime try to reconstruct the managed object if it's not needed by anything? If I could get some kind of hint in the debugger about why it's being reconstructed then that would help. My main concern is that in this case if I can't release the reference to this view controller here then I'm not sure where I could safely release it. The view controller is no longer on screen. It shouldn't be referenced by anything else. There's no reason I can think of that it shouldn't be safe to allow it to leave memory at this point. I'd like to get to the bottom of why it is being resurrected. -- Adam Kemp adam.k...@ni.com (512) 683-6058 Nic Wise n...@fastchicken.co.nz wrote on 07/30/2012 01:01:26 PM: From: Nic Wise n...@fastchicken.co.nz To: Adam Kemp adam.k...@ni.com Cc: monotouch@lists.ximian.com, Sebastien Pouliot sebast...@xamarin.com, Rolf Bjarne Kvinge r...@xamarin.com Date: 07/30/2012 01:01 PM Subject: Re: [MonoTouch] When to implement Foo(IntPtr) constructors Hi Adam You really need a reply from Rolf or Sebastian, but they are in Boston at the moment at the (annual?) company meetup. I've CCed them, but I dont know how much spare time they have this week. So, just so this doesn't drop off the bottom of the list, this SO item from Miguel explains it well: http://stackoverflow.com/questions/5623223/no-constructor-found-for- viewcontroller-ctorsystem-intptr I suspect that it might be a case where you need to keep a reference to the object in a class-local variable, rather than a method-local one or just assigning it to a (obj-c?) object. I've never really implemented them, tho maybe I should :). I used to have the same exceptions as this, but I've not seen it in live debug logs for ages - it's possible that the GC got fixed (or improved) Drop the list an email back if that doesn't answer your question Cheers Nic On Fri, Jul 27, 2012 at 8:10 PM, Adam Kemp adam.k...@ni.com wrote: I'm hitting a crash when receiving memory warnings in some situations. In one view controller (A) we are handling the memory warning by calling Dispose() on another view controller (B) which is no longer necessary. Unfortunately, something later on during the process of the (native) memory warning handling code is trying to call a method in view controller B, and it's trying to construct a managed object to do so. This causes an exception because I don't have a constructor which takes an IntPtr so the runtime can't construct the managed object. I know that if implementing the IntPtr constructor the crash doesn't occur. I also know that it goes away if I remove the call to Dispose, but I don't think that's a guaranteed fix since the object could still be GCed. I'm looking for the right fix, but I have several unanswered questions about what is going on that I need to find an answer to in order to find it. The first question is what method is being called on view controller B, and why is it wanting a managed object to call that method? I don't have an override for DidReceiveMemoryWarning or ViewDidUnload. In fact, the only override in that view controller (which inherits directly from UITableViewController) is ViewDidLoad. The exception tells me Selector invoked from objective-c on a managed object (0xB9E72D0) that has been GC'ed, but it won't tell me which selector was invoked. In a simpler test case that I created I could only reproduce the crash if I overrode either DidReceiveMemoryWarning or ViewDidUnload, but in my full application I get the crash even though I haven't implemented either. I don't
Re: [MonoTouch] lockups during debugging? or deadlocks in my code?
Hi, Sorry, I didn't realize this is happening on the device. For device you can use this trick to force quit, which will generate a crash report: Force quits occur when the user first holds down the On/Off button until slide to power off appears, then holds down the Home button. (from here: http://developer.apple.com/library/ios/#technotes/tn2151/_index.html) Rolf On Mon, Jul 30, 2012 at 1:05 PM, Dermot O Sullivan m...@dermotos.com wrote: Ok, have tried to do this but didn't get very far. Froze up, but no Program ID info in MonoDevelop Application Output. In Xcode console, This is what I have: Jul 30 20:53:51 unknown com.apple.debugserver-64[6966] Warning: debugserver-64 for armv6 Copyright (c) 2007-2009 Apple, Inc. All Rights Reserved. Jul 30 20:53:51 unknown com.apple.debugserver-64[6966] Warning: Connecting to com.apple.debugserver service... Jul 30 20:53:51 unknown com.apple.launchd[1] Warning: (UIKitApplication:com.groovepond.app[0x4710]) Spawned and waiting for the debugger to attach before continuing... Jul 30 20:53:51 unknown com.apple.debugserver-64[6966] Warning: Got a connection, waiting for debugger instructions for task (null). Jul 30 20:53:51 unknown com.apple.debugserver-64[6966] Warning: 1 [1b36/1303]: error: ::read ( 4, 0x2ff609d4, 1024 ) = -1 err = Bad file descriptor (0x0009) Jul 30 20:53:51 unknown com.apple.debugserver-64[6958] Warning: 1 [1b2e/0303]: error: ::read ( 4, 0x2fe1c4b0, 1024 ) = 0 err = Bad file descriptor (0x0009) Jul 30 20:53:51 unknown mobile_installation_proxy[6962] Error: main: Could not receive request from host. Jul 30 20:53:51 unknown mobile_installation_proxy[6955] Error: main: Could not receive request from host. Jul 30 20:53:52 unknown kernel[0] Debug: lockbot[6949] Builtin profile: debugserver (sandbox) Jul 30 20:53:52 unknown kernel[0] Debug: launchd[6967] Builtin profile: container (sandbox) Jul 30 20:53:52 unknown kernel[0] Debug: launchd[6967] Container: /private/var/mobile/Applications/FEEC09F1-ADBD-4605-9E63-11B64257189C [69] (sandbox) Jul 30 20:54:20 unknown lockdownd[26] Error: libMobileGestalt computeUniqueDeviceID: total time for bb to return imei: 0 Jul 30 20:54:20 unknown lockdownd[26] Notice: 015d4000 copy_phonenumber: CTSettingCopyMyPhoneNumber() returned NULL Jul 30 20:54:21 unknown lockdownd[26] Error: libMobileGestalt computeUniqueDeviceID: total time for bb to return imei: 0 Jul 30 20:54:21 unknown lockdownd[26] Notice: 015d4000 copy_phonenumber: CTSettingCopyMyPhoneNumber() returned NULL Jul 30 20:54:21 unknown DTFetchSymbols[6977] Notice: Found paths: Jul 30 20:54:21 unknown DTFetchSymbols[6977] Notice: /usr/lib/dyld Jul 30 20:54:21 unknown DTFetchSymbols[6977] Notice: /System/Library/Caches/com.apple.dyld/dyld_shared_cache_armv7 Jul 30 20:54:21 unknown DTFetchSymbols[6977] Notice: /Developer/usr/lib/CFDataFormatters.dylib Jul 30 20:54:21 unknown DTFetchSymbols[6977] Notice: /Developer/usr/lib/libdebugnub.dylib Jul 30 20:54:21 unknown DTFetchSymbols[6977] Notice: /Developer/usr/lib/libXcodeDebuggerSupport.dylib Jul 30 20:54:21 unknown DTFetchSymbols[6977] Notice: /Developer/Library/PrivateFrameworks/GPUTools.framework/libglInterpose.dylib Jul 30 20:54:21 unknown DTFetchSymbols[6977] Notice: /Developer/Library/PrivateFrameworks/GPUToolsCore.framework/GPUToolsCore Jul 30 20:54:21 unknown DTFetchSymbols[6977] Notice: /Developer/Library/PrivateFrameworks/DevToolsBundleInjection.framework/DevToolsBundleInjection Jul 30 20:54:21 unknown DTFetchSymbols[6977] Notice: /Developer/Library/Frameworks/SenTestingKit.framework/SenTestingKit I tried to gdb all PIDs mentioned (6977 etc...) and got the error below: MacbookAir:~ Dermot$ gdb program 6977 -bash: syntax error near unexpected token `6977' MacbookAir:~ Dermot$ gdb program 6977 GNU gdb 6.3.50-20050815 (Apple version gdb-1708) (Mon Aug 8 20:32:45 UTC 2011) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type show copying to see the conditions. There is absolutely no warranty for GDB. Type show warranty for details. This GDB was configured as x86_64-apple-darwin...File 'program' does not exist or is not a regular file. /Users/Dermot/6977: No such file or directory Unable to access task for process-id 6977: (os/kern) failure. On Mon, Jul 30, 2012 at 1:55 AM, Rolf Bjarne Kvinge r...@xamarin.comwrote: Hi, On Sat, Jul 28, 2012 at 3:50 AM, dermotos m...@dermotos.com wrote: Does anyone else experience random lockups/freezes of their app when debugging? It may indeed be some deadlocks in my code, but before I go hunting for them I thought id check incase maybe its a debugger issue. Strange thing is it only seems to happen when debugging, but I know from experience that issues like deadlocks/race conditions etc can often happen when the
Re: [MonoTouch] When to implement Foo(IntPtr) constructors
Hi Adam If you have a reproducible case, make a bugzilla bug with it (bugzilla.xamarin.com) and email support@xamarin with a reference to it. They can then assign it to the right person to have a look at. Thanks Nic On Mon, Jul 30, 2012 at 2:26 PM, Adam Kemp adam.k...@ni.com wrote: Thanks for the response, Nic. That explanation makes sense to me, but it doesn't really answer why in this particular case the MonoTouch runtime wants to resurrect the managed object. I am in fact releasing my last reference to that object, but that is because I really am completely done with it. It should actually be leaving memory. That is, when that managed reference goes away the unmanaged reference should leave memory as well. What's happening in this case is that the UIViewController base class subscribes to a notification for low memory warnings. I am releasing my last managed reference to this view controller in my own handler for low memory warnings (in a different view controller), but something (perhaps an autorelease call?) is keeping the view controller I want to go away to stay in memory long enough to want to handle that low memory notification. This is the behavior that I can reproduce in a test project. However, in my test project I can only get it to reproduce if I override ViewDidUnload or DidReceiveMemoryWarning in the view controller that I want to go away. In my real project I didn't implement either one of those, and yet it is being resurrected anyway. As I said, the only method I override in this view controller class is ViewDidLoad, and that method is not being called. Why would the runtime try to reconstruct the managed object if it's not needed by anything? If I could get some kind of hint in the debugger about why it's being reconstructed then that would help. My main concern is that in this case if I can't release the reference to this view controller here then I'm not sure where I could safely release it. The view controller is no longer on screen. It shouldn't be referenced by anything else. There's no reason I can think of that it shouldn't be safe to allow it to leave memory at this point. I'd like to get to the bottom of why it is being resurrected. -- Adam Kemp adam.k...@ni.com (512) 683-6058 Nic Wise n...@fastchicken.co.nz wrote on 07/30/2012 01:01:26 PM: From: Nic Wise n...@fastchicken.co.nz To: Adam Kemp adam.k...@ni.com Cc: monotouch@lists.ximian.com, Sebastien Pouliot sebast...@xamarin.com, Rolf Bjarne Kvinge r...@xamarin.com Date: 07/30/2012 01:01 PM Subject: Re: [MonoTouch] When to implement Foo(IntPtr) constructors Hi Adam You really need a reply from Rolf or Sebastian, but they are in Boston at the moment at the (annual?) company meetup. I've CCed them, but I dont know how much spare time they have this week. So, just so this doesn't drop off the bottom of the list, this SO item from Miguel explains it well: http://stackoverflow.com/questions/5623223/no-constructor-found-for- viewcontroller-ctorsystem-intptr I suspect that it might be a case where you need to keep a reference to the object in a class-local variable, rather than a method-local one or just assigning it to a (obj-c?) object. I've never really implemented them, tho maybe I should :). I used to have the same exceptions as this, but I've not seen it in live debug logs for ages - it's possible that the GC got fixed (or improved) Drop the list an email back if that doesn't answer your question Cheers Nic On Fri, Jul 27, 2012 at 8:10 PM, Adam Kemp adam.k...@ni.com wrote: I'm hitting a crash when receiving memory warnings in some situations. In one view controller (A) we are handling the memory warning by calling Dispose() on another view controller (B) which is no longer necessary. Unfortunately, something later on during the process of the (native) memory warning handling code is trying to call a method in view controller B, and it's trying to construct a managed object to do so. This causes an exception because I don't have a constructor which takes an IntPtr so the runtime can't construct the managed object. I know that if implementing the IntPtr constructor the crash doesn't occur. I also know that it goes away if I remove the call to Dispose, but I don't think that's a guaranteed fix since the object could still be GCed. I'm looking for the right fix, but I have several unanswered questions about what is going on that I need to find an answer to in order to find it. The first question is what method is being called on view controller B, and why is it wanting a managed object to call that method? I don't have an override for DidReceiveMemoryWarning or ViewDidUnload. In fact, the only override in that view controller (which inherits directly from UITableViewController) is ViewDidLoad. The exception tells me Selector invoked from objective-c on a managed object (0xB9E72D0) that has been GC'ed,
[MonoTouch] Recommendations for companies/teams powered by Xamarin
Hi! I'm just beginning my journey with apps and was lucky enough to hear about Xamarin. I am trying to find developers who will be able to create my app(s) in MonoTouch first and then port it to Android - however looking at the usual freelancer sites has proven to be a challenge, as rarely someone is writing about their familiarity with Xamarin. Tried contacting companies here in London but most of them didn't even know what I was on about! Hence my question (and you would really help me out a lot!) - do you have any recommendations of dev teams/small companies that i could contact? Thanks in advance! - ++ http://pl.linkedin.com/in/mcelary ++ -- View this message in context: http://monotouch.2284126.n4.nabble.com/Recommendations-for-companies-teams-powered-by-Xamarin-tp4656241.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Recommendations for companies/teams powered by Xamarin
Hi Michael I'm asking around inside Xamarin to see if anyone knows of a customer or consultant around who might be able to help you out, assuming no-one pipes up in here! Cheers Nic (not from Xamarin) On Mon, Jul 30, 2012 at 5:43 PM, Michael Celary michael.cel...@gmail.com wrote: Hi! I'm just beginning my journey with apps and was lucky enough to hear about Xamarin. I am trying to find developers who will be able to create my app(s) in MonoTouch first and then port it to Android - however looking at the usual freelancer sites has proven to be a challenge, as rarely someone is writing about their familiarity with Xamarin. Tried contacting companies here in London but most of them didn't even know what I was on about! Hence my question (and you would really help me out a lot!) - do you have any recommendations of dev teams/small companies that i could contact? Thanks in advance! - ++ http://pl.linkedin.com/in/mcelary ++ -- View this message in context: http://monotouch.2284126.n4.nabble.com/Recommendations-for-companies-teams-powered-by-Xamarin-tp4656241.html Sent from the MonoTouch mailing list archive at Nabble.com. ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch -- Nic Wise t. +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise b. http://www.fastchicken.co.nz/ mobileAgent (for FreeAgent): get your accounts in your pocket. http://goo.gl/IuBU Trip Wallet: Keep track of your budget on the go: http://goo.gl/ePhKa Earnest: Self-employed? Track your business expenses and income. http://earnestapp.com Nearest Bus: find when the next bus is coming to your stop. http://goo.gl/Vcz1p London Bike App: Find the nearest Boris Bike, and get riding! http://goo.gl/Icp2 ___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch
Re: [MonoTouch] Recommendations for companies/teams powered by Xamarin
Michael, I'll throw my companies name in the hat, realizing that we're over in the USA and maybe not a option. We are a small company with only a couple people actually involved in our mobile application development. If you'd like more information, I can put you in touch with someone. My company is called KeyLogic Systems (www.keylogic.comhttp://www.keylogic.com). Thanks, Bob Sent from my iPhone On Jul 30, 2012, at 5:43 PM, Michael Celary [via MonoTouch] ml-node+s2284126n4656241...@n4.nabble.commailto:ml-node+s2284126n4656241...@n4.nabble.com wrote: Hi! I'm just beginning my journey with apps and was lucky enough to hear about Xamarin. I am trying to find developers who will be able to create my app(s) in MonoTouch first and then port it to Android - however looking at the usual freelancer sites has proven to be a challenge, as rarely someone is writing about their familiarity with Xamarin. Tried contacting companies here in London but most of them didn't even know what I was on about! Hence my question (and you would really help me out a lot!) - do you have any recommendations of dev teams/small companies that i could contact? Thanks in advance! ++ http://pl.linkedin.com/in/mcelary ++ If you reply to this email, your message will be added to the discussion below: http://monotouch.2284126.n4.nabble.com/Recommendations-for-companies-teams-powered-by-Xamarin-tp4656241.html To start a new topic under MonoTouch, email ml-node+s2284126n3346893...@n4.nabble.commailto:ml-node+s2284126n3346893...@n4.nabble.com To unsubscribe from MonoTouch, click herehttp://monotouch.2284126.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=3346893code=cnJlY2tAa2V5bG9naWMuY29tfDMzNDY4OTN8LTE2MzM4NTI5Njk=. NAMLhttp://monotouch.2284126.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml -- View this message in context: http://monotouch.2284126.n4.nabble.com/Recommendations-for-companies-teams-powered-by-Xamarin-tp4656241p4656243.html Sent from the MonoTouch mailing list archive at Nabble.com.___ MonoTouch mailing list MonoTouch@lists.ximian.com http://lists.ximian.com/mailman/listinfo/monotouch