×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Feb 2009
    Posts
    5

    Exclamation Starting a new thread silently fails in N97 (PyS60 1.4.5)

    Have I missed something or is this a bug in PyS60 1.4.5 - threads not working with 5th edition devices?

    I try to start a new thread and the function in thread.start_new_thread() never gets called. start_new_thread() seems to fail silently.

    Below is a simplification, code that demostrates the problem. This works fine with my 3rd edition phones (prints a line every 5 seconds). Could someone try this out in 5800 and see if this is a 5th edition problem or something with N97 only?

    ---clip----
    import e32, thread
    running = 1
    def lighton():
    while running:
    print "loop"
    e32.ao_sleep(5)

    thread.start_new_thread(lighton, ())
    ---clip----

    I can get the code above to work in my N97, with Python 1.9.6. But the project I'm working on cannot be transferred to 1.9/2.0 any time soon as it uses several Python extension libraries.

    Any ideas for a workaround? Or hopes for getting bug fixes for 1.4.5 (5th edition support)?

    Pertti

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: Starting a new thread silently fails in N97 (PyS60 1.4.5)

    hello pertti

    this may be a PyS60 1.4.5 problem as that release was not meant for S60 5th edition devices.

    I will advice you to port your application to PyS60 1.9.x releases as most of the good estensions are now being ported for this release too.

  3. #3
    Registered User
    Join Date
    Feb 2009
    Posts
    5

    Re: Starting a new thread silently fails in N97 (PyS60 1.4.5)

    I'd be happy to port to 1.9.x but cannot. The very reason of our project is the several extensions that do not exist for 1.9 (yet, if ever). So I wish and wonder if there will be a 1.4.6 release one day? Or maybe the Community Python project could solve this?

    I found this reported as a bug alreaady with 5800: http://sourceforge.net/tracker/index...55&atid=790646

    Pertti

  4. #4
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: Starting a new thread silently fails in N97 (PyS60 1.4.5)

    Quote Originally Posted by pkasanen View Post
    So I wish and wonder if there will be a 1.4.6 release one day?
    hello perrti

    AFAIK now there will be no more release in the PyS60 1.4.x series everything will be posted to the PyS60 1.9.x the point is we have to wait for a time being so that everything is set again.

    Regards
    Gaba88

  5. #5
    Regular Contributor
    Join Date
    Aug 2004
    Posts
    295

    Re: Starting a new thread silently fails in N97 (PyS60 1.4.5)

    This can be fixed by editing src/core/python/thread_symbian.h, function "static TInt launchpad(TAny* p)". Locate the line "CTrapCleanup* cleanup_stack = CTrapCleanup::New();" and move it to be first line in the function.

Similar Threads

  1. Emulator crash immediatly after launched, SDK of S60 3nd
    By loopfinder in forum Symbian Tools & SDKs
    Replies: 27
    Last Post: 2011-01-30, 14:06
  2. console app running problem
    By xcompass in forum Symbian
    Replies: 3
    Last Post: 2009-05-08, 13:26
  3. Start S60 3rd emulator failure
    By zeusstar in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2006-10-08, 16:55
  4. Link errors when trying to Display bitmap
    By Bkc82 in forum Symbian Media (Closed)
    Replies: 1
    Last Post: 2006-01-16, 22:46
  5. Pythred-error - thread fails...
    By madsbjoern in forum Symbian
    Replies: 0
    Last Post: 2006-01-10, 15:00

Posting Permissions

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