fact-project / fact-tools

The fact-tools are an extension to the streams framework to analyse the data of the First G-APD Cherenkov Telescope.
http://sfb876.tu-dortmund.de/FACT/
GNU General Public License v3.0
6 stars 1 forks source link

Process stopped after exception: Index: 0, Size: 0 #366

Open jebuss opened 6 years ago

jebuss commented 6 years ago

When running the pedestal sampling from the sample_pedestal_noise branch (see PR #364 ) with examples/add_pedestal_noise_template.xml. I sometimes get the following error. Not sure how to reproduce where and when it happends, but it seems to allways happen once when sampling over one of the proton MC sets.

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
        at java.util.ArrayList.rangeCheck(ArrayList.java:657)
        at java.util.ArrayList.get(ArrayList.java:433)
        at fact.io.hdureader.FITS.<init>(FITS.java:105)
        at fact.io.hdureader.FITSStream.init(FITSStream.java:48)
        at fact.io.FactFileListMultiStream.readNext(FactFileListMultiStream.java:148)
        at stream.io.AbstractStream.read(AbstractStream.java:142)
        at stream.runtime.AbstractProcess.execute(AbstractProcess.java:195)
        at stream.runtime.ProcessThread.run(ProcessThread.java:129)
Exception in thread "Thread-1" java.lang.RuntimeException: Process stopped after exception: Index: 0, Size: 0
        at stream.runtime.ProcessThread.run(ProcessThread.java:171)
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
        at java.util.ArrayList.rangeCheck(ArrayList.java:657)
        at java.util.ArrayList.get(ArrayList.java:433)
        at fact.io.hdureader.FITS.<init>(FITS.java:105)
        at fact.io.hdureader.FITSStream.init(FITSStream.java:48)
        at fact.io.FactFileListMultiStream.readNext(FactFileListMultiStream.java:148)
        at stream.io.AbstractStream.read(AbstractStream.java:142)
        at stream.runtime.AbstractProcess.execute(AbstractProcess.java:195)
        at stream.runtime.ProcessThread.run(ProcessThread.java:129)
streams exited on error: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
java.lang.RuntimeException: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
        at stream.runtime.ProcessContainer.run(ProcessContainer.java:580)
        at stream.run.main(run.java:168)
        at stream.run.main(run.java:147)
        at fact.run.main(run.java:26)
Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
        at java.util.ArrayList.rangeCheck(ArrayList.java:657)
        at java.util.ArrayList.get(ArrayList.java:433)
        at fact.io.hdureader.FITS.<init>(FITS.java:105)
        at fact.io.hdureader.FITSStream.init(FITSStream.java:48)
        at fact.io.FactFileListMultiStream.readNext(FactFileListMultiStream.java:148)
        at stream.io.AbstractStream.read(AbstractStream.java:142)
        at stream.runtime.AbstractProcess.execute(AbstractProcess.java:195)
        at stream.runtime.ProcessThread.run(ProcessThread.java:129)
2018-06-18 14:11:51,733 - erna.stream_runner_local_output - ERROR - Fact tools returned an error:
tarrox commented 6 years ago

This seems to fail due to a broken file. It would be nice to know the actual file that failed. This should also fail if just piped trough any other xml file. So You should try this firs (Make a minimal xml with the multistream and see what happens without any processors this should run pretty fast).

Also add the following at line 85 in Fits.javaor so: log.info("Reading file: {}", url.toString()); so we can get a filename.

Facundotoledo commented 3 years ago

cristian