POV-Ray

The Persistence of Vision Raytracer (POV-Ray).

This is the legacy Bug Tracking System for the POV-Ray project. Bugs listed here are being migrated to our github issue tracker. Please refer to that for new reports or updates to existing ones on this system.

Tasklist

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
Task Type Definite Bug
Category Backend → Parser/SDL
Status Closed
Assigned To Chris Cason (chrisc)
Operating System All
Severity Critical
Priority Normal
Reported Version 3.70 beta 32
Due in Version 3.70 beta 35
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

The 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

Closed by  Chris Cason (chrisc)
Thursday, 18 March 2010, 03:27 GMT
Reason for closing:  Fixed
Comment by Grimbert Jérôme (Le_Forgeron) - Thursday, 17 September 2009, 17:50 GMT

On beta 34, from Source, linux amd64.

No crash but a really strange filename reported:

File '              d' line 3: Parse Error: Expected ')', # found instead
Fatal error in parser: Cannot parse input.
Render failed

The filename is assumed to be a lost pointer here.

Comment by Grimbert Jérôme (Le_Forgeron) - Thursday, 17 September 2009, 17:52 GMT
Comment by Tim Attwood (TimA) - Tuesday, 17 November 2009, 01:14 GMT

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.

Comment by Christoph Lipka (clipka) - Tuesday, 17 November 2009, 09:05 GMT

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.

Comment by Christoph Lipka (clipka) - Tuesday, 17 November 2009, 09:06 GMT

I just tested to find that POV-Ray 3.6.2 exhibits hard crashes as well on this particular combo.

Comment by Chris Cason (chrisc) - Thursday, 31 December 2009, 12:09 GMT

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).

Loading...