zeroflag / punyforth

Forth inspired programming language for the ESP8266
Other
406 stars 43 forks source link

Unexplained Crash #39

Closed craiglindley closed 6 years ago

craiglindley commented 6 years ago

I am currently doing some graphics programming on the esp8266 and have run into a crash that I cannot explain. When I execute the following code and let it run for a while, it always crashes.

128 constant: displayWidth 160 constant: displayHeight

displayHeight 2 / constant: MIDY displayWidth 2 / constant: MIDX

\ Manhattan distance from middle of screen : dist MIDY - abs swap MIDX - abs + ;

: test

displayWidth 0 do displayHeight 0 do j i dist . cr loop loop ;

Can anyone see anything wrong?

zeroflag commented 6 years ago

I don't see anything wrong with the code at first glance, and it ran fine on a raspberry. Can you check the available freemem by typing in freemem?

craiglindley commented 6 years ago

After I compile the code freemem say 17132. It takes running for about 30 seconds to see the issue.

On Thu, May 10, 2018 at 10:56 AM, Attila Magyar notifications@github.com wrote:

I don't think anything wrong with the code at first glance, and it ran fine on a raspberry. Can you check the available freemem by typing in freemem?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/zeroflag/punyforth/issues/39#issuecomment-388115409, or mute the thread https://github.com/notifications/unsubscribe-auth/Afyuj-GkvVqqF4m65ScVsbfR4uwGbGL7ks5txHFZgaJpZM4T6H35 .

-- Craig Lindley / Heather Hubbard

495's Recordings: craigandheather.net/495spage.html New Recordings: craigandheather.net/cnmpage.html Latest rock CD: craigandheather.net/oneinarow.html Latest non-rock CD: craigandheather.net/craigdoesfingerstyle.html

Personal Website: craigandheather.net

Phone: (719) 495-1873 Cell: (719) 502-7925

If you’re one in a million, there are now seven thousand people exactly like you.

craiglindley commented 6 years ago

It must have something to do with writing to the serial port because if I replace the ". cr" with a "drop" the code will run to completion.

zeroflag commented 6 years ago

Interesting. Was there any other hardware connected to some of the GPIOs of the esp? Tomorrow I'll try to run it on my board.

craiglindley commented 6 years ago

I have an LCD display connected but since I didn't load GPIO or the driver it should not be an issue. I was thinking that my ESP8266 Puny Forth Loader might be the issue but if I run the real code and not this pared down version I get an exception 9 even when I am not sending output to the serial port.

On Thu, May 10, 2018 at 3:20 PM, Attila Magyar notifications@github.com wrote:

Interesting. Was there any other hardware connected to some of the GPIOs of the esp? Tomorrow I'll try to run it on my board.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/zeroflag/punyforth/issues/39#issuecomment-388189731, or mute the thread https://github.com/notifications/unsubscribe-auth/Afyuj89IS00-xaElwZCZwNUDae1viWdqks5txK8jgaJpZM4T6H35 .

-- Craig Lindley / Heather Hubbard

495's Recordings: craigandheather.net/495spage.html New Recordings: craigandheather.net/cnmpage.html Latest rock CD: craigandheather.net/oneinarow.html Latest non-rock CD: craigandheather.net/craigdoesfingerstyle.html

Personal Website: craigandheather.net

Phone: (719) 495-1873 Cell: (719) 502-7925

If you’re one in a million, there are now seven thousand people exactly like you.

zeroflag commented 6 years ago

I ran it on a real board and I haven't seen any problem. Have you tried running it without the display? Maybe something is wrong with the pin layout, do you use any of the RX/TX pins?

craiglindley commented 6 years ago

I'll try and run it on a bare esp8266 to see what happens. It's probably my problem so you can close this issue.

On Sat, May 12, 2018 at 1:14 PM, Attila Magyar notifications@github.com wrote:

I ran it on a real board and I haven't seen any problem. Have you tried running it without the display? Maybe something is wrong with the pin layout, do you use any of the RX/TX pins?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/zeroflag/punyforth/issues/39#issuecomment-388576705, or mute the thread https://github.com/notifications/unsubscribe-auth/Afyuj0U1XJNsHL9IcLJbqMdln5w9Ics7ks5txzSjgaJpZM4T6H35 .

-- Craig Lindley / Heather Hubbard

495's Recordings: craigandheather.net/495spage.html New Recordings: craigandheather.net/cnmpage.html Latest rock CD: craigandheather.net/oneinarow.html Latest non-rock CD: craigandheather.net/craigdoesfingerstyle.html

Personal Website: craigandheather.net

Phone: (719) 495-1873 Cell: (719) 502-7925

If you’re one in a million, there are now seven thousand people exactly like you.