Hi Sebastian,

The garbage collector won't free some random objects just because it's
running low on free memory, it will free objects that it finds can't
be accessed anymore.

Does it crash when you run in the simulator? If it's a device-only
crash it's likely to be an issue with external libraries instead.

In any case one way of creating a smaller test case is to start with
your project and then remove stuff until it starts working again (as
opposed to start with a new project copying code over).

Rolf

On Tue, Nov 8, 2011 at 9:20 AM,  <[email protected]> wrote:
> Hi Rolf,
>
> I've juest created a sample Project based on my Code and deleted all
> useless files. The curious thing is, the sample Project works... The
> original does not...
> Is it possible that the GarbageCollector disposes my objects because I'm
> holding to much data in background? Is it possible to observe the device
> memory (I'm using a IPad2)?
>
>
> I also found the following in the Mailing-List archive..
>
> The iOS devices dont have virtual memory, unlike a PC, so they can't
> swap anything out. They just have to stop other apps, and eventually,
> your app.
>
> (http://www.mail-archive.com/[email protected]/msg01856.html)
>
>
> That's really frustrating...
>
> - Sebastian
>
>
>
>
>
>
>
>             Rolf Bjarne
>             Kvinge
>             <[email protected]                                          An
>             >                          [email protected]
>                                                                     Kopie
>             08.11.2011 01:09           [email protected]
>                                                                     Thema
>                                        Re: [MonoTouch] App crashes
>                                        randomly when hitting UIControls
>
>
>
>
>
>
>
>
>
>
> Hi,
>
> On Mon, Nov 7, 2011 at 1:45 PM,  <[email protected]> wrote:
>> Hi everyone,
>>
>> this guy has the same problem..
>>
> http://stackoverflow.com/questions/5084475/monotouch-nullreference-for-every-event-action-sigsegv
>
>>
>>
>> Now I've built a view which listens to events from a Monotouch Library.
> The
>> SIGSEGV error also appears but only after it worked a little bit in the
>> library. Otherwise it works correctly....
>> It really seems that the Garbage Collector disposes my objects.... What
> can
>> I do?
>>
>> Should i make an example project for you guys?
> Yes, please, with example code it's a lot easier to find out where the
> problem is.
>
> Rolf
>
>>
>> - Sebastian
>>
>>
>>
>>
>>             SebastianKellner@
>>             cs-ag.de
>>             Gesendet von:                                              An
>>             monotouch-bounces          Rolf Bjarne Kvinge
>>             @lists.ximian.com          <[email protected]>
>>                                                                     Kopie
>>                                        [email protected]
>>             03.11.2011 11:12                                        Thema
>>                                        [MonoTouch] Antwort: Re: Antwort:
>>                                        Re: Re: App crashes randomly when
>>                                        hitting UIControls
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> Hi Rolf,
>>
>> Thank you for your reply.
>> I've posted the output of my device in my first post.
>>
>>>>> The console off my device shows the following:
>>>>>
>>>>> Stacktrace:
>>>>>      at MonoTouch.UIKit.UIApplication.Main (string[],string,string)
>>>>> <0x0010f>
>>>>>      at myApp.Application.Main(string[]) [0x00000] in
>>>>> /Users/me/Projects/myApp/myApp/Main.cs
>>>>>      at (wrapper runtime-invoke) object.runtime_invoke_dynamic
>>>>> (intptr,intptr,intptr,intptr) <0xffffffff>
>>
>> The debuggers jumps not into the breakpoint, because the error appears
>> before. It's not even jumping in CodeBehind.
>>
>> Maybe that's a help for you, the error appears often with the SIGABRT and
>> SIGSEGV errors.
>>
>>
>> Best regards,
>> Sebastian Kellner
>>
>>
>>
>>
>>
>>             Rolf Bjarne
>>             Kvinge
>>             <[email protected]                                          An
>>             >                          [email protected]
>>                                                                     Kopie
>>             03.11.2011 10:54           Nic Wise <[email protected]>,
>>                                        [email protected]
>>                                                                     Thema
>>                                        Re: [MonoTouch] Antwort: Re: Re:
>>                                        App crashes randomly when hitting
>>                                        UIControls
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> Hi Sebastian,
>>
>> You should be able to find crash logs for the crash (in Xcode's
>> Organizer for device crashes and in the Console application for
>> simulator crashes). Can you attach one of those? And can you put a
>> breakpoint on Cancel_TouchUpInside to see exactly which instruction is
>> causing the crash?
>>
>> Rolf
>>
>> On Wed, Nov 2, 2011 at 1:03 PM,  <[email protected]> wrote:
>>> Hi Nic,
>>>
>>> PopView is just a wrapper for the PopViewControllerAnimated(bool)
>>> procedure.
>>>
>>> Code:
>>> Navigation.Pop += () => navigator.PopViewControllerAnimated(true)
>>>
>>>
>>> Best Regards,
>>> Sebastian Kellner
>>>
>>>
>>>
>>>
>>>             Nic Wise
>>>             <nicw@fastchicken
>>>
> .co.nz>                                                    An
>>>                                        [email protected]
>>>             02.11.2011
> 12:25                                        Kopie
>>>                                        [email protected]
>>>
> Thema
>>>                                        Re: Re: [MonoTouch] App crashes
>>>                                        randomly when hitting UIControls
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> So what does PopView do?
>>>
>>> On Wed, Nov 2, 2011 at 10:02,  <[email protected]> wrote:
>>>> Hi Nic,
>>>>
>>>> the UIButton is declared inside of the .xib File. The
>>>> TouchUpInside-EventHandler only Navigates back via PopView.
>>>>
>>>> http://pastebin.com/9vBXAW2p
>>>>
>>>> It's not possible to debug that issue, because the App crashes
>>> immediately
>>>> when hitting the control.
>>>> He's not even jumping in codebehind. He's probably crashing in some
>>>> MonoTouch / Native library, i think.
>>>>
>>>>
>>>> Best Regards,
>>>> Sebastian Kellner
>>>>
>>>>
>>>>
>>>>
>>>>             Nic Wise
>>>>             <nicw@fastchicken
>>>>
>> .co.nz>                                                    An
>>>>                                        [email protected]
>>>>             02.11.2011
>> 10:46                                        Kopie
>>>>                                        [email protected]
>>>>
>> Thema
>>>>                                        Re: [MonoTouch] App crashes
>>>>                                        randomly when hitting UIControls
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Can you post some code using pastebin or github's gist?
>>>>
>>>> Most likely is the GC - make sure the UIButton is declared outside of
>>>> the method - make sure its at the class level.
>>>>
>>>> On Wed, Nov 2, 2011 at 08:36,  <[email protected]> wrote:
>>>>>
>>>>> Hi everyone,
>>>>>
>>>>> I'm facing an strange issue, where I do not know what to do.
>>>>>
>>>>> My App randomly crashes when I'm hitting UIControls (mostly UIButton).
>>>>> Maybe the Garbage Collector disposes my Controls if I get a Callback
>>> from
>>>>> an BLL-Thread? (I'm using a 3 Layer architecture DAL / BLL / GUI)
>>>>>
>>>>> The console off my device shows the following:
>>>>>
>>>>> Stacktrace:
>>>>>      at MonoTouch.UIKit.UIApplication.Main (string[],string,string)
>>>>> <0x0010f>
>>>>>      at myApp.Application.Main(string[]) [0x00000] in
>>>>> /Users/me/Projects/myApp/myApp/Main.cs
>>>>>      at (wrapper runtime-invoke) object.runtime_invoke_dynamic
>>>>> (intptr,intptr,intptr,intptr) <0xffffffff>
>>>>>
>>>>> This problem only appears when I'm navigatiing to a previous
>>>>> UIViewController. I'm using a UINavigationController for Navigation.
>>>>>
>>>>>
>>>>> Best Regards,
>>>>> Sebastian Kellner
>>>>>
>>>>> _______________________________________________
>>>>> MonoTouch mailing list
>>>>> [email protected]
>>>>> 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/
>>>>
>>>> Nearest Bus: find when the next bus is coming to your stop.
>>>> http://goo.gl/Vcz1p
>>>> 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
>>>> London Bike App: Find the nearest Boris Bike, and get riding!
>>>> http://goo.gl/Icp2
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Nic Wise
>>> t.  +44 7788 592 806 | @fastchicken | http://www.linkedin.com/in/nicwise
>>> b. http://www.fastchicken.co.nz/
>>>
>>> Nearest Bus: find when the next bus is coming to your stop.
>>> http://goo.gl/Vcz1p
>>> 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
>>> London Bike App: Find the nearest Boris Bike, and get riding!
>>> http://goo.gl/Icp2
>>>
>>>
>>> _______________________________________________
>>> MonoTouch mailing list
>>> [email protected]
>>> http://lists.ximian.com/mailman/listinfo/monotouch
>>>
>>
>>
>> _______________________________________________
>> MonoTouch mailing list
>> [email protected]
>> http://lists.ximian.com/mailman/listinfo/monotouch
>>
>>
>> _______________________________________________
>> MonoTouch mailing list
>> [email protected]
>> http://lists.ximian.com/mailman/listinfo/monotouch
>>
>
>
>
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to