You Are Here:

Community: Developer Discussion Boards

#1 Old SymbianError -1, KErrNotFound - 2009-04-18, 20:54

Join Date: Mar 2003
Posts: 937
Location: Espoo, Finland
JOM's Avatar
JOM
Offline
Forum Nokia Champion
Huh,

What could be wrong here, I just don't understand. Code (the very same file) works ok in S60 3.1 emulator with PyS60 1.4.5, but crashes in N82 (S60 3.1) running PyS60 1.4.5 PythonShell:

Code:
if DEBUG: print "111111"
#appuifw.app.body = appuifw.Listbox(entries)

# SymbianError -1, 'KErrNotFound'
# File "e:\\python\\flagicon48.py", line 237, in ?
# appuifw.app.body = appuifw.Listbox(entries)

# Unable to find the specified object

try:
    print appuifw
    print appuifw.app
    print appuifw.app.body
    global appuifw
    appuifw.app.body = appuifw.Listbox(entries)
except:
    import sys
    import traceback
    import appuifw
    cla, exc, trbk = sys.exc_info()
    excName = cla.__name__
    try:
        excArgs = exc.__dict__["args"]
    except KeyError:
        excArgs = "<no args>"
    excTb = traceback.format_tb(trbk, 5)
    errorString = repr(excName) + '-' + repr(excArgs) + '-' + repr(excTb) + '\n'
    print errorString

if DEBUG: print "222222"
Emulator trace:
Code:
111111
<module 'appuifw' from 'c:\resource\appuifw.py'>
<Application object at 0x314f6198>
<appuifw.Listbox object at 0x31510750>
222222
As you can see, no problems whatsoever! But here's N82 trace:
Code:
111111
<module 'appuifw' from 'c:\resource\appuifw.py'>
<Application object at 0x1713368>
<appuifw.Listbox object at 0x1738e80>
=== CALL c:\resource\site.py	platsec_import@93:     def platsec_import(name, globals=None, locals=None, fromlist=None):

    ... skipping 351 lines ...

=== RETURN c:\resource\traceback.py	format_list@33:     return list
    ['  File "e:\\python\\flagicon48.py", line 244, in ?\n    appuifw.app.body = appuifw.Listbox(entries)\n']
=== RETURN c:\resource\traceback.py	format_tb@57:     return format_list(extract_tb(tb, limit))
    ['  File "e:\\python\\flagicon48.py", line 244, in ?\n    appuifw.app.body = appuifw.Listbox(entries)\n']
'SymbianError'-(-1, 'KErrNotFound')-['  File "e:\\python\\flagicon48.py", line 244, in ?\n    appuifw.app.body = appuifw.Listbox(entries)\n']

222222
So the line appuifw.app.body = appuifw.Listbox(entries) caused an Exception when running in N82! I just can't figure out what could be wrong... As far as I can tell appuifw does exist, entries (already made as global variable) exists, even appuifw.app.body should exist. What on earth is "not found" ?!?!? What else is there that could be missing? And why only in real device? Everything else works ok... Yep, just tested 10 other scripts, no problems!

Well, I'm writing this hoping that a) someone might be able to suggest ANYTHING and b) usually I figure out the problem/solution, when describing it to someone else.

Feeling lucky,

--jouni going to simplify the code even more rautalanka level
Reply With Quote

#2 Old Re: SymbianError -1, KErrNotFound - 2009-04-18, 21:22

Join Date: Mar 2003
Posts: 937
Location: Espoo, Finland
JOM's Avatar
JOM
Offline
Forum Nokia Champion
Huh2,

The magic works everytime, problem solved! Got fooled by trace output, which seemed to be ok. Turned out "entries" contained corrupted data, which just happened to look like real thing...

This weekend I'll release new sample code, which shows how to populate listbox with your own icons from your own MBM file. Yep, pretty boring. Not worth releasing at all. However the MBM contains 244 free-to-use and ready-to-use country flags, resolution 48x48 bits. Best of all, not drawn by me

Ok, there are some issues. Got to add link to icons' original website, flags share same mask which naturally doesn't fit all etc. Still pretty nice, I would say.

Cheers,

--jouni going to remove several hundreds of debug code and hoping everything would still work
Reply With Quote

#3 Old Re: SymbianError -1, KErrNotFound - 2009-04-19, 15:02

Join Date: May 2007
Posts: 2,738
Location: 21.46 N 72.11 E
croozeus's Avatar
croozeus
Offline
Forum Nokia Champion
Quote:
Originally Posted by JOM View Post
Got fooled by trace output, which seemed to be ok. Turned out "entries" contained corrupted data, which just happened to look like real thing...
Hm..I once was fooled by an empty element in the list. It irritates when such petty things cause delay.

//Croozeus
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
CAudioOutput -> KErrNotFound heuven Symbian Media (Graphics & Sounds) 3 2009-01-15 12:32
ImportContactsL leave with KErrNotFound Shilpa13 Symbian Networking & Messaging 3 2008-01-29 19:54
error KErrNotFound in MvpuoPrepareComplete drizztdo Symbian Media (Graphics & Sounds) 6 2006-11-28 10:51
KErrNotFound with RSocket.connect penthalis Symbian Networking & Messaging 0 2005-05-26 21:56
(Series 60 2.0) KErrNotFound on RConnect.Start using CCommsDatabase defaults? (long) thrust Symbian Tools & SDKs 3 2004-04-20 17:23

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