rufig / spf

SP-Forth

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Added .S inside WM_CREATE crashes spf4wc

bamboospirit opened this issue · comments

Steps to reproduce:
edit spf4wc.f

WM_CREATE :M { lpar wpar hwnd \ hdc -- 0 }
.S  \ insert this line

now executing the word CONSOLE or compiling spf4wc.exe and running it will make it crash...

0 TO H-STDOUT \ получает стандартные хэндлы
If I comment this line then I can see in the terminal that .S enters an infinite loop

Q1: I would like to know the reason why this is happening and how to avoid it. Sometimes I need to debug WM_CREATE ... messages so I need to print the stack to the terminal

Q2: is there any IRC channel dedicated to sp-forth ?

commented

Did you compile from the sources and use the latest build of spf4.exe?
I can reproduce neither crash nor infinite loop (it just prints 1365 numbers in the console).
NB: spf4wc.exe should be located near spf4.exe (otherwise it hangs).

Regarding debugging WM_CREATE message.. In general, it is too low level approach to create GUI. Except if you are writing a GUI library. See also a discussion at StackOverflow.

Regarding IRC — no, but there is a chat in Telegram with low traffic — https://t.me/spforthchat
You are welcome.