#278 Crash with simple (malformed?) shader

fatal/crash
open
nobody
4
2012-09-20
2007-12-07
No

The following shader compiles properly, but crashes Aqsis when rendering the RIB file below:

surface test ( normal Nf = faceforward( N, I ) )
{
Ci = 1;
Oi = 1;
}

Format 256 256 1

FrameBegin 1
Display "outputimage" "framebuffer" "rgb"
Projection "perspective" "fov" 40

WorldBegin
Surface "test"
Color [ 1 1 1 ]

Translate 0 .1 3
Rotate 50 1 0 0
Torus .65 .3 0 360 360

WorldEnd
FrameEnd

Discussion

  • Chris Foster

    Chris Foster - 2008-02-10

    Logged In: YES
    user_id=1086736
    Originator: NO

    This crash was being caused by the fact that faceforward() needs the geometric normal, Ng, to operate internally, but that fact wasn't specified by the corresponding CqFuncDef. I fixed this small problem in svn revision 1896.

    However, the shader is probably malformed, and won't do what the user expects anyway. I think we need to make this a compiler error somehow, possibly by restricting access to the standard variable symbol table in the instance variable declarations section?

     
  • Chris Foster

    Chris Foster - 2008-02-18

    Logged In: YES
    user_id=1086736
    Originator: NO

    I'm downgrading the priority of this bug as the crash has now been fixed.

     
  • Paul Gregory

    Paul Gregory - 2008-07-10

    Logged In: YES
    user_id=117924
    Originator: NO

    This has been further lowered, it no longer crashes, and PRman raises a runtime error with this shader, so it's invalid anyway. We'll need to catch it somehow either at compile or runtime, but that's for the future, after 1.4.

     


Anonymous

Cancel  Add attachments