-->
Page 1 of 2

Exception 9

PostPosted: Sat Jul 01, 2017 12:41 am
by Kiwirad
Hi All

I'm getting exception 9 errors, with a stack dump. It's a very simple piece of code, and shouldn't be heavily using resources.
Can someone point me at documentation or resources to help understand what an Exception 9 is exactly, and any root cause guidance.
The only thing I have seen is a vague comment about an unassigned data, but it doesn'y say what unassigned data is!

Thx all

Re: Exception 9

PostPosted: Sat Jul 01, 2017 10:29 am
by Pablo2048

Re: Exception 9

PostPosted: Sat Jul 01, 2017 3:36 pm
by Kiwirad
Hi, and thank you.

I did see some of this before. Exception 9 says unassigned address. Not sure what that is but will keep trying to find out.

This is the dump, any guidance on where to start looking is very welcome... Thank you!


Exception (9):
epc1=0x401010dc epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000003 depc=0x00000000

ctx: sys
sp: 3ffffc70 end: 3fffffb0 offset: 01a0

>>>stack>>>
3ffffe10: 40103d88 3fff0314 3ffe9050 00000008
3ffffe20: 4010130c 003c471e 3ffee458 00000000
3ffffe30: 3ffe8a00 3ffee458 7fffffff 00000000
3ffffe40: 00000000 003b15f1 40201098 000000fa
3ffffe50: 3ffee458 c0010025 00000001 00000000
3ffffe60: 0000007f 00000002 00000000 40201c2c
3ffffe70: 40106da0 00080000 3fffc200 40106dee
3ffffe80: ffffffff 00000020 00000000 4000050c
3ffffe90: 00000000 00000000 0000001f 00000022
3ffffea0: 3fffc200 40106d68 3fffc258 4000050c
3ffffeb0: 40000f68 00000030 0000001c ffffffff
3ffffec0: 40000f58 00000000 00000020 00000000
3ffffed0: 00000013 4020d994 00003a98 00000000
3ffffee0: 3ffe8e6c 3ffedc50 3ffe8e6c 3fffdab0
3ffffef0: 00000000 3fffdcb0 3ffe8a10 00000030
3fffff00: 401024ec 00000000 00000064 40100574
3fffff10: 4010130c 003b77f2 3ffe92f4 00000000
3fffff20: 3ffe8a00 3ffe92f4 003ae066 4020d7b9
3fffff30: 00000000 003afde0 4021d1ab 3ffe92f4
3fffff40: 40101076 003b1d6c 60000600 00000001
3fffff50: 40101136 3ffedc50 003b1d6c 00000000
3fffff60: 40101076 003b1d6c 3ffe8a00 60000600
3fffff70: 402038cc 3ffe8e6c 3ffe8a00 01cddb3d
3fffff80: 402038f2 3fffdab0 00000000 3fffdcb0
3fffff90: 3ffe8a10 3ffe95b0 00000004 40202843
3fffffa0: 40000f49 40000f49 3fffdab0 40000f49
<<<stack<<<

Re: Exception 9

PostPosted: Sun Jul 02, 2017 11:23 am
by Pablo2048
OMG it's unaligned, not unassigned one :-( You even read it wrong... ESP8266 has 32 bit CPU so for word access (longint, uint32_t, ...) it needs 4 byte aligned address. Read about this for example here:
https://en.wikipedia.org/wiki/Data_structure_alignment
https://stackoverflow.com/questions/381 ... -alignment
... (do a google search about "cpu aligned access")
If You are using Arduino IDE then You can use Exception decoder to get close to the source of problem.