The Persistence of Vision Raytracer (POV-Ray).
This is the Bug Tracking System for the POV-Ray project. Before opening a new task, please read How to make a Bug Report
Please do not issue bugs reports against versions earlier than 3.6.
FS#51 - POV-Ray crashes hard on missing parenthesis
Attached to Project:
POV-Ray
Opened by Christoph Lipka (clipka) - Tuesday, 25 August 2009, 06:14 GMT
Last edited by Chris Cason (chrisc) - Thursday, 18 March 2010, 03:27 GMT
Opened by Christoph Lipka (clipka) - Tuesday, 25 August 2009, 06:14 GMT
Last edited by Chris Cason (chrisc) - Thursday, 18 March 2010, 03:27 GMT
|
DetailsThe following (bogus) SDL code causes POV-Ray 3.7 beta to crash hard with an access violation: #include "fubar.inc" Bar(42) #macro FooBar() #end //fubar.inc #macro Foo(Fnord) #end #macro Bar(Ignord) Foo(23 #end |
This task depends upon
On beta 34, from Source, linux amd64.
No crash but a really strange filename reported:
The filename is assumed to be a lost pointer here.
On Version beta 34 (win x64)... with file "foobar.pov" and "foobar.inc"
Cannot find file "foobar.inc", even after trying to append file extension.
I think this is similar to the error with the .tiff extension, the exact
filename provided should be searched for first before any attempts to
guess the file extension.
I still do get hard crashes with POV-Ray 3.7.0.beta.34 official binary, running Windows XP x64 on an Intel i7 QuadCore machine. (Though I just experimented a bit again, and once saw a clean "Expected ')', # found instead" message, but can't reproduce that.)
The error message Tim is getting makes no sense at all: Including "FOO.inc" from "FOO.pov" is nothing uncommon, and usually works perfectly fine; the .tiff extension problem also pertains to files with a >3 character file extension. So I guess that in Tim's particular case it was indeed a typo or some such - or another random weird result of POV-Ray going all crackpot on this particular combo of macros, includes and that missing closing parenthesis.
I just tested to find that POV-Ray 3.6.2 exhibits hard crashes as well on this particular combo.
The cause of this bug was a pointer to the include file input stream being retained in the token structure after the stream was closed.
When the missing parenthesis was detected, the error output code would de-reference the pointer, which would either cause an invalid memory access or otherwise return junk (if that portion of the heap was still valid).