1. Phix simple_paint demo crash
- Posted by lesterb Jun 02, 2018
- 1146 views
The following is wrt Phix 0.7.9 (32 bit Windows) and simple_paint.exw.
When started, the program window appears Ok but any attempt to draw in the image results in a Windows failure notification. ie "p.exe has stopped working" (with a kind offer to search online for a solution [declined ]).
I wonder if this is reproducible elsewhere or local to my machine. If it's a reproducible problem I could have a poke about and see if I can narrow it down a bit.
I have the original 'TecGraf' C version of the program and it compiles and runs Ok.
2. Re: Phix simple_paint demo crash
- Posted by petelomax Jun 02, 2018
- 1121 views
It seems to work here.
3. Re: Phix simple_paint demo crash
- Posted by euphoric (admin) Jun 02, 2018
- 1123 views
When I run simple_paint.exw from pdemo, I get this output:
C:\Phix\demo\pGUI\pGUI.e:3284 in function IupConfigLoad() (warning: lineno of -1 for era of #62895BA3) fatal exception [MEMORY VIOLATION] at #62895BA3 config = 15699968 errcode = <novalue> ... called from C:\Phix\demo\pGUI\simple_paint.exw:2161 Global & Local Variables --> see C:\Phix\demo\pGUI\ex.err Press Enter...
ADDED: The 2048 demo works fine for me.
4. Re: Phix simple_paint demo crash
- Posted by lesterb Jun 03, 2018
- 1110 views
Ok, thanks for the feedback.
I'll treat this as my problem.
Les
5. Re: Phix simple_paint demo crash
- Posted by petelomax Jun 03, 2018
- 1105 views
When I run simple_paint.exw from pdemo, I get this output:
C:\Phix\demo\pGUI\pGUI.e:3284 in function IupConfigLoad()
Ah, there was something introduced in IUP 3.24, try this:
procedure ensure_config_file_exists() -- Bugfix for 3.24 (reported) [remove when >3.24 is released] string f = join_path({getenv("HOMEDRIVE"),getenv("HOMEPATH"),"simple_paint.cfg"}) if not file_exists(f) then integer fn = open(f,"wb") close(fn) end if end procedure config = IupConfig() IupSetStrAttribute(config, "APP_NAME", "simple_paint") ensure_config_file_exists() {} = IupConfigLoad(config)
Technically 3.25 has just been released, this week, but I have not downloaded it or anything yet.
Regards,
Pete
PS: I wouldn't get that problem here, because I've already got a simple_paint.cfg file