#4 Blocked q operator causes stack underflow


When a q operator is detected, device.saveState is called. However the following check from CSDeviceBasedInterpreter.java(522-525) might block this call:

if (frame.graphicsObjectState != PageLevel) {
throw new CSWarning("'q' not allowed");

If now the associated Q operator is valid and executed, a stack underflow will occur, since saveState was never called in the first place.

The attached PDF causes exactly this error :-(.


  • Andreas Haufler

    Andreas Haufler - 2009-10-16
  • Elfi Heck

    Elfi Heck - 2009-10-19
    • assigned_to: nobody --> eheck
  • Elfi Heck

    Elfi Heck - 2009-10-28

    We introduced the check when a "q" operator between BT and ET messed up the display for some user. In the present case a path has been started which seems legal. I've modified the code to allow "PathObject" in addition to "PageLevel".

  • Elfi Heck

    Elfi Heck - 2009-10-28
    • status: open --> open-fixed
  • Elfi Heck

    Elfi Heck - 2009-10-28
    • status: open-fixed --> closed-fixed

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks