×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Regular Contributor
    Join Date
    Jul 2007
    Location
    Eindhoven, the Netherlands
    Posts
    187

    Python extension works in emulator but not on device...

    Hi,


    For my application ( http://tracker-py.googlecode.com ) I occasionally run into symbian API's not being available in PyS60. Sometimes existing modules can be found to fix this problem, but now with the 1.9.x development, many of them need recompilation and sources are sometimes hard to track down.

    Anyway, I thought it is about time for me to dive into extension writing myself, and have developed a little module I call 'properties' which basically wraps the RProperty interface into something that can be used from PyS60.
    The code can be found here: http://code.google.com/p/tracker-py/...properties.cpp

    So far, I've implemented a version that works with EInt type properties. On the emulator I got everything working as expected, however, when running on the target, importing the module seems to cause pys60 to exit without any messages.
    Strangely enough, when I remove references to the CPropertyNotifier class (basically commenting out lines 16-85 and 171-174) it does work as expected on the device, but then I have crippled the Subscribe function.

    Could someone shed some light on this for me? I'm really puzzled since this works fine on the emulator, and I don't understand how adding the mentioned code could cause an error during the import of the module... I would expect things to go wrong only after calling the subscribe function, or when an event triggers the callback...


    Regards,
    Mark.

    P.S.
    This happens on both 1.9.4 and 1.9.5 builds of PyS60.

  2. #2
    Nokia Developer Expert
    Join Date
    Apr 2007
    Posts
    131

    Re: Python extension works in emulator but not on device...

    One way to get clues for the crash is by using tools that show the panic code when applications crash.

  3. #3
    Regular Contributor
    Join Date
    Jul 2007
    Location
    Eindhoven, the Netherlands
    Posts
    187

    Re: Python extension works in emulator but not on device...

    Quote Originally Posted by mahesh.sayibabu View Post
    One way to get clues for the crash is by using tools that show the panic code when applications crash.
    Ok, fair enough.
    However, I'm rather new to development of Python extensions, so do you have any suggestions on what tool I could use? And how I can get the phone to show the panic code? Do I need to build my own python core & interactive shell to achieve this?

    Mark.

  4. #4
    Regular Contributor
    Join Date
    Sep 2005
    Location
    Finland, Helsinki
    Posts
    323

    Re: Python extension works in emulator but not on device...

    Quote Originally Posted by hurenkam View Post
    And how I can get the phone to show the panic code?
    Try to find ErrRd.SIS and install it into your phone.

    If I recall right it just installs some magically named empty file somewhere in your phone's memory and after reboot your phone starts popping up those panic codes.
    --
    Aapo Rista
    http://code.google.com/p/pys60gps/
    http://opennetmap.org/

  5. #5
    Regular Contributor
    Join Date
    Jul 2007
    Location
    Eindhoven, the Netherlands
    Posts
    187

    Re: Python extension works in emulator but not on device...

    Quote Originally Posted by aaaaapo View Post
    Try to find ErrRd.SIS and install it into your phone.

    If I recall right it just installs some magically named empty file somewhere in your phone's memory and after reboot your phone starts popping up those panic codes.
    Ok, that gives me some info:
    Application closed:
    PythonScriptShell
    KERN-EXEC 3

    Well, I guess that's a start ;-)


    Mark.

Similar Threads

  1. C or C++ extension for python
    By safaltechnical in forum Symbian
    Replies: 1
    Last Post: 2008-06-28, 14:08
  2. Python C++ Extension with Callback crashing
    By diggerdeep in forum Symbian
    Replies: 2
    Last Post: 2005-11-10, 16:33
  3. Application works on device, but not emulator
    By vodkaloon in forum Symbian
    Replies: 0
    Last Post: 2005-06-14, 11:15
  4. Replies: 11
    Last Post: 2005-05-20, 10:09
  5. HandlePointerEventL works in Emulator but NOT in 7650 device!!
    By rmuralidharan in forum Symbian User Interface
    Replies: 0
    Last Post: 1970-01-01, 02: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
  •  
×