Menu

#320 NPE thrown by LayerNamePanel

closed-fixed
nobody
5
2014-11-18
2013-05-24
No

Create two layers A and B in category Working
Click on layer A
Shift press Layer B (note I did not click, but just pressed without releasing)
Move the two selected layers in another Category
==> throws the following exception :
Exception in thread "AWT-EventQueue-0" com.vividsolutions.jts.util.AssertionFailedException: If this event is being fired because you are constructing a Layer, cat will be null because you haven't yet added the Layer to the LayerManager. While constructing a layer, you should set firingEvents to false. (Layerable = Nouvelle Couche (2))
at com.vividsolutions.jts.util.Assert.isTrue(Assert.java:71)
at com.vividsolutions.jump.workbench.model.LayerManager.fireLayerChanged(LayerManager.java:445)

Discussion

  • michael michaud

    michael michaud - 2013-05-24

    Sorry, the exact sequence is :
    Click on layer A
    Shift doucle click Layer B without releasing the button after second click (layer B should be in edit mode, shift is still pressed).
    Move the two selected layers in another Category
    ==> Exception

     
  • michael michaud

    michael michaud - 2013-05-24

    After this first bug, another one may appear :
    Select layer A
    Shift double click layer B
    Layer A and B are selected, B is in edition mode
    Release shift key and press control
    Left click on another category
    ==> Layer B is duplicated in this category with the same name (nor really duplicated as this is the same layer which is shown in bith categories)

     
  • michael michaud

    michael michaud - 2014-04-05

    Found an even simpler case :

    Just create one layer A
    Double click it without releasing (or simple click + mouse press)
    Shift the layer in another category
    ==> throws exception (while removing layer from original category)
    ==> does not add it in new category
    ==> OpenJUMP becomes instable (layer has been removed from its category but is still visible)

     
  • michael michaud

    michael michaud - 2014-04-06
    • labels: General / Other --> UI, LayerNamePanel
    • status: open --> closed-fixed
    • Group: --> Linux / Unix
     
  • michael michaud

    michael michaud - 2014-04-06

    Fix in r3921

     

Log in to post a comment.