You Are Here:

Community: Developer Discussion Boards

#1 Old exception "MemoryError" - 2009-03-11, 18:47

Join Date: Nov 2008
Posts: 139
widetech1
Online
Regular Contributor
hi,

help

application has a thread waiting to receive data from a server, the loop does so correctly, but from time to time throws an exception "memoryError" in the line e32.ao_sleep(2) and exit the thread.
How can I handle this kind of exception.

thanks
Reply With Quote

#2 Old Re: exception "MemoryError" - 2009-03-12, 07:46

Join Date: Aug 2007
Posts: 8
anand_83
Offline
Registered User
Quote:
Originally Posted by widetech1 View Post
hi,

help

application has a thread waiting to receive data from a server, the loop does so correctly, but from time to time throws an exception "memoryError" in the line e32.ao_sleep(2) and exit the thread.
How can I handle this kind of exception.

thanks
It would be nice if you could post ur code snippet
Reply With Quote

#3 Old Re: exception "MemoryError" - 2009-03-12, 17:50

Join Date: Mar 2003
Posts: 937
Location: Espoo, Finland
JOM's Avatar
JOM
Offline
Forum Nokia Champion
Quote:
Originally Posted by widetech1 View Post
from time to time throws an exception "memoryError" in the line e32.ao_sleep(2) and exit the thread.
Sleep is not safe, try to use something else:

Quote:
4.1.3 Ao timer Type

The rationale for the Ao timer type is that you cannot cancel a pending e32.ao sleep. This is problematic if e.g. the user exits an application which is sleeping. In this case a panic would occur since the sleep is not cancelled - this is the reason you should avoid using e32.ao sleep and instead use the Ao timer with appropriate cancel calls if there is for example a possibility for the user to exit the application during a sleep.
Cheers,

--jouni
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
s60 3rd ed emulator crash Kimau Symbian Tools & SDKs 2 2008-06-18 23:12
从S60 2ED FP1 移植到 S60 3rd mr的一些问题 k9998 Symbian 2 2007-04-09 12:46
VS.Net 2003 Carbide 2.01 and epoc32.exe ValentinK Carbide.c++ IDE and plug-ins 2 2007-01-12 13:31
Catching an exception btnokdev Mobile Java General 2 2003-10-11 15:45
can not successfully link any sample using .NET lobotomat Symbian Tools & SDKs 2 2002-08-20 01:29

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia