<html>
    <head>
      <base href="http://fiji.sc/bugzilla/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - RoiEncoder throws NullPointerException when saving multipoint selections"
   href="http://fiji.sc/bugzilla/show_bug.cgi?id=1220">1220</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>RoiEncoder throws NullPointerException when saving multipoint selections
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Fiji
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P5
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>ImageJ1
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>wsr@nih.gov
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>jan.eglinger@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>imagej-bugs@imagej.net
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Here's a macro to reproduce the issue (just select a few points and click ok on
the two dialogs):

    run("Fluorescent Cells (400K)");

    setTool("multipoint");
    run("Select None");
    waitForUser("Select points. Then press 'OK'");
    run("Add to Manager");
    run("Select None");
    c=roiManager("count");
    roiManager("select", c-1);
    roiManager("Rename", "points1");

    makePoint(0, 0);
    run("Add to Manager");
    run("Select None");
    c=roiManager("count");
    roiManager("select", c-1);
    roiManager("Rename", "single_point");

    setTool("multipoint");
    run("Select None");
    waitForUser("Select more points. Then press 'OK'");
    run("Add to Manager");
    run("Select None");
    c=roiManager("count");
    roiManager("select", c-1);
    roiManager("Rename", "points2");

    roiManager("Save", getDirectory("temp") + File.separator +
"test_rois.zip");


This will throw the exception below (using up-to-date Fiji as well as the Dec
2015 life-line version), tested on Windows and Mac OSX. The behavior is
specific to multi-channel images.
Everything works fine when using the Nov 2014 life-line version of Fiji.


    (Fiji Is Just) ImageJ 2.0.0-rc-44/1.50e; Java 1.8.0_66 [64-bit]; Windows 7
6.1; 425MB of 96000MB (<1%)

    java.lang.NullPointerException
    at ij.io.RoiEncoder.putPointCounters(RoiEncoder.java:409)
    at ij.io.RoiEncoder.putHeader2(RoiEncoder.java:384)
    at ij.io.RoiEncoder.write(RoiEncoder.java:230)
    at ij.io.RoiEncoder.write(RoiEncoder.java:56)
    at ij.plugin.frame.RoiManager.saveMultiple(RoiManager.java:827)
    at ij.plugin.frame.RoiManager.save(RoiManager.java:2036)
    at ij.plugin.frame.RoiManager.runCommand(RoiManager.java:1931)
    at ij.macro.Functions.roiManager(Functions.java:2729)
    at ij.macro.Functions.getFunctionValue(Functions.java:230)
    at ij.macro.Interpreter.getFactor(Interpreter.java:1385)
    at ij.macro.Interpreter.getTerm(Interpreter.java:1356)
    at ij.macro.Interpreter.getStringExpression(Interpreter.java:1496)
    at ij.macro.Interpreter.getStringTerm(Interpreter.java:1315)
    at ij.macro.Interpreter.getString(Interpreter.java:1272)
    at ij.macro.Interpreter.doStatement(Interpreter.java:281)
    at ij.macro.Interpreter.doStatements(Interpreter.java:218)
    at ij.macro.Interpreter.run(Interpreter.java:115)
    at ij.macro.Interpreter.run(Interpreter.java:85)
    at ij.macro.Interpreter.run(Interpreter.java:96)
    at ij.plugin.Macro_Runner.runMacro(Macro_Runner.java:153)
    at ij.IJ.runMacro(IJ.java:129)
    at ij.IJ.runMacro(IJ.java:118)
    at net.imagej.legacy.IJ1Helper$3.call(IJ1Helper.java:936)
    at net.imagej.legacy.IJ1Helper$3.call(IJ1Helper.java:933)
    at net.imagej.legacy.IJ1Helper.runMacroFriendly(IJ1Helper.java:899)
    at net.imagej.legacy.IJ1Helper.runMacro(IJ1Helper.java:933)
    at net.imagej.legacy.plugin.IJ1MacroEngine.eval(IJ1MacroEngine.java:116)
    at net.imagej.legacy.plugin.IJ1MacroEngine.eval(IJ1MacroEngine.java:163)
    at org.scijava.script.ScriptModule.run(ScriptModule.java:174)
    at org.scijava.module.ModuleRunner.run(ModuleRunner.java:167)
    at org.scijava.module.ModuleRunner.call(ModuleRunner.java:126)
    at org.scijava.module.ModuleRunner.call(ModuleRunner.java:65)
    at
org.scijava.thread.DefaultThreadService$2.call(DefaultThreadService.java:191)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>