RS01007: [DIAGRAMMER] NPE IN ILVSUBGRAPHRENDERER.DRAWICON WHEN SAVING THE MANAGER WITH SVGSTREAMFACTORY

Subscribe

You can track all active APARs for this component.

APAR status

  • Closed as program error.

Error description

  • NPE occurs when writing a manager with a subgraph
    (IlvSubgraphRenderer) to a SVGStreamFactory.
    java.lang.NullPointerException
    at
    ilog.views.sdm.renderer.IlvSubGraphRenderer.drawIcon(IlvSubGraph
    Renderer.java:2308)
    at
    ilog.views.sdm.renderer.IlvSubGraphRenderer.access$300(IlvSubGra
    phRenderer.java:276)
    at
    ilog.views.sdm.renderer.IlvSubGraphRenderer$GraphicManagerFrame.
    draw(IlvSubGraphRenderer.java:1644)
    at ilog.views.IlvManager.drawFrame(IlvManager.java:11381)
    at ilog.views.IlvManager.draw(IlvManager.java:11280)
    at
    ilog.views.svg.GenericGraphicTranslator.translate(GenericGraphic
    Translator.java:163)
    at
    ilog.views.svg.SVGDocumentBuilder.translate(SVGDocumentBuilder.j
    ava:805)
    at
    ilog.views.svg.SVGDocumentBuilder.fillElement(SVGDocumentBuilder
    .java:598)
    at
    ilog.views.svg.SVGDocumentBuilder.translate(SVGDocumentBuilder.j
    ava:684)
    at
    ilog.views.svg.SVGDocumentBuilder.doBuildDocument(SVGDocumentBui
    lder.java:466)
    at
    ilog.views.svg.SVGDocumentBuilder.buildDocument(SVGDocumentBuild
    er.java:330)
    at ilog.views.svg.SVGOutputStream.write(SVGOutputStream.java:67)
    at ilog.views.IlvManager.write(IlvManager.java:8019)
    at ilog.views.IlvManager.write(IlvManager.java:8057)
    at ilog.views.IlvManager.write(IlvManager.java:8075)
    
    There are two problem areas in this issue:
    
    1. SVGDocumentBuilderConfigurator.setTransformer does not accept
    identify transformer because it treats null transformer as
    identity transformer:
    
    2. IlvSubgraphRenderer.drawIcon assumes that the transformer
    parameter is not null so it accesses the transformer without
    checking if it is not null:
    

Local fix

  • If the transformer of the current view is identity, temporary
    translate the transformer, set the transformer to the
    SVGDocumentBuilderConfigurator, then re-translate the
    transformer of the current view back to identify.
    
    public void saveAsSVG(IlvDiagrammer diagrammer, File f) throws
    IOException {
        IlvSDMView currentView = diagrammer.getView();
        // Create a view at the needed size
        IlvManager manager = currentView.getManager();
        // workaround
        boolean identity =
    currentView.getTransformer().isIdentity();
    
        SVGStreamFactory streamFactory = new SVGStreamFactory();
        manager.setStreamFactory(streamFactory);
        // workaround
       if( identity )
         currentView.translate(1, 1, false);
    
    streamFactory.getBuilderConfigurator().setTransformer(currentVie
    w.getTransformer());
        if( identity)
         currentView.translate(-1, -1, false);
        /**/
        // ends workaround
        manager.write(f.getCanonicalPath());
      }
    

Problem summary

  • [Diagrammer] NPE in IlvSubgraphRenderer.drawIcon when saving
    the manager with SVGStreamFactory
    

Problem conclusion

  • Source code has been modified to fix this problem.
    

Temporary fix

Comments

APAR Information

  • APAR number

    RS01007

  • Reported component name

    ILOG JVIEWS DIA

  • Reported component ID

    5724Y3500

  • Reported release

    880

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2012-06-06

  • Closed date

    2012-10-01

  • Last modified date

    2012-10-01

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    ILOG JVIEWS DIA

  • Fixed component ID

    5724Y3500

Applicable component levels

  • R880 PSY

       UP



Rate this page:

(0 users)Average rating

Document information


More support for:

IBM ILOG JViews Diagrammer

Software version:

8.8

Reference #:

RS01007

Modified date:

2012-10-01

Translate my page

Machine Translation

Content navigation