Program crash - how to trace the cause


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Feb 2012
    Location
    PERTH AUSTRALIA
    Posts
    838


    Did you find this post helpful? Yes | No

    Default Re: Program crash - how to trace the cause

    what is the depth that you can have for while , wend loops

    It seems the problem may be that from my routines for key stroke checking

    I use a while <> KEY , wend loop to test for an " exit to the loop

    but as options go down into sub menu's , each need to be exited and the above menu's are looking for thier exit

    is this the best method for multilevel menu structure ?

    is it likly this structure is causing my issues ?

    cheers

    Sheldon

  2. #2
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,621


    Did you find this post helpful? Yes | No

    Default Re: Program crash - how to trace the cause

    Hi,
    Examining the RCON register may give some clue to why the device resets, if it's the watchdog for example. The manual doesn't say anything about a limitation on the number of nested WHILE-WEND loops.
    You need to figure out where in the code "you are" when it crashes and/or if it has anything to do with the "depth" of the menu structure or if it's completely "random". Double and tripplecheck that you always end up at a RETURN when you've GOSUBed to some place.

    If you have a serial connection then adding a boatload of HSEROUT statements is another way to keep track of what's happening. Entering menu, level 2, level 3, setting 2, level 2 etc. If you're using MPLAB and have a PICKit3 or other device programmer/debugger then you might give source level debugging a shot. Unfortunately it's not supported in the MicroCodeStudio IDE.

    /Henrik.

Similar Threads

  1. Is there any way to debug/watch/trace macros?
    By mister_e in forum General
    Replies: 1
    Last Post: - 11th July 2011, 23:54
  2. how can i debug & trace my program
    By omid_juve in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 17th December 2007, 17:10
  3. HIDmaker from Trace Systems
    By Christopher4187 in forum USB
    Replies: 1
    Last Post: - 23rd March 2006, 22:14
  4. PBP / XP Crash
    By pondindustrial in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 27th November 2005, 03:16
  5. maximum oscillator trace length
    By woodygjw in forum Off Topic
    Replies: 8
    Last Post: - 20th May 2005, 03:16

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

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