#304 Sort category can remove layer

closed-fixed
Windows
7
2016-03-10
2013-04-03
No

Today, I had to sort a category containing about 40 layers. I used
Layer > Sort Selected Categories > By Name > Ascending
I get a ConcurrentModificationException and lost all the layers in the Category but one.
Too bad...

Discussion

  • ede

    ede - 2013-04-03

    try to reproduce it and save the error stack.. important for fixing to pinpoint where the concurrent mod happens.

    ..ede

     
  • michael michaud

    michael michaud - 2013-04-03

    Cannot reproduce it at home.
    It will be difficult as I did not notice any special operation I did during the sort operation.
    I'll try again tomorrow.

     
  • michael michaud

    michael michaud - 2013-04-04

    I can see two ways to make SortACategory more safe :
    - synchronizing removeLayers / addLayers in SortCategoryAbstractPlugIn
    - setting setFiringEvents to false during these operations
    Not sure which is the good approach, would like to reproduce the problem first.

     
  • michael michaud

    michael michaud - 2015-05-17

    I changed the code of SortCategory. It does not remove/add layer from layerManager any more but just remove/add from category.
    Hopefully, it solves the problem. If no one can confirm the problem, let's close the ticket before next release.

     
  • michael michaud

    michael michaud - 2016-03-10
    • status: open --> closed-fixed
    • assigned_to: michael michaud
    • Operating System: --> Windows
     
  • michael michaud

    michael michaud - 2016-03-10

    I consider this problem as 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