×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Mar 2010
    Location
    Zaandam, Holland
    Posts
    71

    Question Starting new traceLocation on error without creating stack overflows

    So, you're using traceLocation and you walk inside a building,
    even with the timeout set to two minutes, you might get the annoying
    1016, tracelocation timeout error.

    What you might want to do is start a new traceLocation instance,
    since the 1016 error kills the process, and no future callbacks will
    be fired after the occurance.

    If you would call a function from within the error callback,
    in the end, you would obviously create stack overflows, and beforethen,
    use up a lot of memory that's not really required.
    A simple way around this would be to initiate a timeout, and start
    traceLocation again after a little while.
    BUT, since there's a problem with setTimeout while the phone is idle,
    and timeouts get queued, and mostlikely the user has its phone in it's
    pocket while tracelocation is running, this could be rather sucky.

    I have thought up the idea of creating a stack for the time being,
    and when the phone comes out of idle, dropping the stack, and
    creating a new instance using a timer.
    I think this is really BAD to do this way, but since I dont want to
    waste too much braincycles right now, it might be best for the
    time being.

    Anyone with ideas?

    Thanks!

  2. #2
    Super Contributor
    Join Date
    May 2008
    Location
    Helsinki, Finland
    Posts
    1,098

    Re: Starting new traceLocation on error without creating stack overflows

    Hello Jasper,


    Just would like to check whether you did refer to WRT Location API's Ilocation.Trace() when mentioning "traceLocation"?

    Then another thing, also you mentioned that "the use user has its phone in it' pocket while tracelocation is running"

    In such cases should be noted that "the availability of specific location information depends on the underlying GPS
    technology. Other factors, such as the number of satellites available for a location fix, also affect what information
    can be returned. You can change the positioning system used by an S60 device from the Settings > General > Positioning >
    Positioning methods menu.".

    But let me know if you have advanced with this matter already? Let's keep this open until.

    Best Regards,
    [FONT="Comic Sans MS"][COLOR="Blue"][/COLOR][I]Marko Lumivuori
    Technical Support
    +358 40 8019330
    [email]marko.lumivuori@nokia.com[/email][/I][/FONT]

  3. #3
    Registered User
    Join Date
    Mar 2010
    Location
    Zaandam, Holland
    Posts
    71

    Re: Starting new traceLocation on error without creating stack overflows

    Hello Marko,

    Quote Originally Posted by Maveric View Post
    Just would like to check whether you did refer to WRT Location API's Ilocation.Trace() when mentioning "traceLocation"?
    Yes, I'm sorry for the confusion, at the time I wrote this article I had created custom error popups that said "traceLocation error -- {code}", so that must be why I wrote it that way.
    Kind of clumbsy, but yes, I was in fact referring to ILocation.Trace()

    Quote Originally Posted by Maveric View Post
    Then another thing, also you mentioned that "the use user has its phone in it' pocket while tracelocation is running"

    In such cases should be noted that "the availability of specific location information depends on the underlying GPS
    technology. Other factors, such as the number of satellites available for a location fix, also affect what information
    can be returned. You can change the positioning system used by an S60 device from the Settings > General > Positioning >
    Positioning methods menu.".

    But let me know if you have advanced with this matter already? Let's keep this open until.

    Best Regards,

    In fact, what I ment was, that if in -any- case the phone throws a timeout or other exception from within the Trace method, tracing will get aborted without further notice.
    The problem I had was that I wanted to restart tracing right away, but creating a new object from within the scope where the error was noticed, would create a stack in javascript, thus, eating memory.

    Like I mentioned, it could be fixed by setting a timeout to restart the object, thus losing all parent scopes when creating a new object and setting its callback functions.
    So yes, I did advance.

    I went on coding my project in WRT until May 24, and had (have) a functional, pretty well working widget.
    Although, when I noticed -a lot- of users (mainly from getjar.com) using a 5800, which never ever returns a HorizontalAccuracy value with its returned locations - I deceided to give up on WRT, and redo the whole project in J2ME.
    Now, a lot of work later, I am almost ready to release the first J2ME version, (works nicely on my N97's already), but I must say, I very much hope J2ME won't give me the same problem on 5800's --> Not returning any Accuracy information. (Ideas?)

    Sorry for the silence, I've been wasting extreme amounts of time on java the last week.
    I'll answer your other threads later today.

    Thank you very much for your reaction.

    Best Regards,
    Jasper

Similar Threads

  1. Problem in build with S60 1FP
    By Manuelito_ in forum Symbian Tools & SDKs
    Replies: 14
    Last Post: 2007-09-18, 12:08
  2. Creating a UI and starting in a DLL
    By pbmau in forum Symbian User Interface
    Replies: 1
    Last Post: 2007-04-04, 10:20
  3. what is the maximum amount of stack size ?
    By oncer in forum Symbian
    Replies: 7
    Last Post: 2007-02-02, 15:57
  4. abld command
    By kollar in forum Symbian Tools & SDKs
    Replies: 3
    Last Post: 2003-02-03, 07:51
  5. Problem with bldmake bldfiles for Series 60 SDK 6.1
    By dml in forum Symbian Tools & SDKs
    Replies: 3
    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
  •  
×