> I'm continuing to try to find the cause of this. It appears the original > cause was a collision between the stack and the heap. I now write a known > pattern between the stack and heap at startup and look at it after the > system has been running for several hours to make sure the known pattern > is still there. It looks like I'm not now getting the stack/heap > collision. > > But, about midnight local time last night, I got a half dozen bus error > exceptions, all at the same program address (0x9d031a38). Scanning up fro= m > there in the code view of memory, I see several jr ra instructions above > with no labels before, so I assume this code is generated by the compiler > and not from some library that I have source for (I think there'd be > labels if this was compiled from source during my recent compile). So, > it's difficult to determine what the function of the offending code is. > > Looking at the specific address that's generating the exception, the > instruction is beq zero, zero, 0x1d031b1c. I assume 0x1d031b1c is the > destination address of the branch (not the offset to the destination > address). If so, this would be a relatively short branch, which would be > within the branch range. > > I have a global called ProcessNum that I update in my main loop before > going off to handle different tasks. I write the value of ProcessNum alon= g > with the exception info to a uart when I get an exception. The general > exception is consistently happening in StackApplications(). I've added > more ProcessNum assignments within StackApplications() to try to determin= e > which one is causing the problem. I'm also running WireShark to see what > network activity happens around the time of the exception. > > Any other ideas as to what to try? > > THANKS! > > Harold > > > -- > FCC Rules Updated Daily at http://www.hallikainen.com - Advertising > opportunities available! Looks like I finally found it! I left a system and WireShark running overnight. My system crashed about 3:00am. Wireshark showed an HTTP GET coming in that had an invalid parameter value. My code should have caught that, but did not. The incoming parameter is allowed to be 1 to 10, which I then drop to 0 to 9 to index into an array. The parameter coming in was 0, which I dropped to -1, which was not a valid array index. My range check was looking for >=3D0 instead of >0. That fixed it! These things can be hard to catch! Harold --=20 FCC Rules Updated Daily at http://www.hallikainen.com - Advertising opportunities available! --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .