Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexplained Crash #39

Closed
craiglindley opened this issue May 10, 2018 · 7 comments
Closed

Unexplained Crash #39

craiglindley opened this issue May 10, 2018 · 7 comments

Comments

@craiglindley
Copy link

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
Copy link
Owner

zeroflag commented May 10, 2018

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
Copy link
Author

craiglindley commented May 10, 2018 via email

@craiglindley
Copy link
Author

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
Copy link
Owner

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
Copy link
Author

craiglindley commented May 10, 2018 via email

@zeroflag
Copy link
Owner

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
Copy link
Author

craiglindley commented May 12, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants