Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Concatenation bug: IndexOutOfRangeException in DataIntegrityCheckForZeroSignal #124

Closed
atruskie opened this issue Sep 17, 2017 · 3 comments
Labels

Comments

@atruskie
Copy link
Member

Expected behaviour

Concatenation of this result set Y:\Results\2017Sep15-203834, Tshering, Towsey.Indices, #167\Tshering\WBH_Walaytar\WBH_2017\Ada Lake with these arguments concatenateindexfiles -inputd "Y:\Results\2017Sep15-203834, Tshering, Towsey.Indices, #167\Tshering\WBH_Walaytar\WBH_2017\Ada Lake" -outputdirectory "Y:\Results\2017Sep15-203834, Tshering, Towsey.Indices, #167\ConcatResults\Tshering_WBH_Walaytar_WBH_2017" -directoryfilter *.wav -indexpropertiesconfig "Y:\Results\2017Sep15-203834, Tshering, Towsey.Indices, #167\IndexPropertiesConfig.yml" -falsecolourspectrogramconfig "Y:\Results\2017Sep15-203834, Tshering, Towsey.Indices, #167\SpectrogramFalseColourConfig.yml" -f "Ada Lake" -timespanoffsethint 06:00 -drawimages true -n should execute without throwing an exception.

Actual behaviour

An exception was thrown while rendering day 3 of 103:


CONCATENATING DAY 3 of 103:   2017-02-03 00:00:00 +10:00
2017-09-18T09:34:49.9173725+10:00 [1] FATAL AnalysisPrograms.MainEntry - Unhandled exception ->
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
   at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
   at AudioAnalysisTools.Indices.ErroneousIndexSegments.DataIntegrityCheckForZeroSignal(Double[] zeroSignalArray) in C:\Work\Github\audio-analysis\AudioAnalysis\AudioAnalysisTools\Indices\ErroneousIndexSegments.cs:line 153
   at AnalysisPrograms.ConcatenateIndexFiles.Execute(Arguments arguments) in C:\Work\Github\audio-analysis\AudioAnalysis\AnalysisPrograms\ConcatenateIndexFiles.cs:line 690
   at System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid2[T0,T1](CallSite site, T0 arg0, T1 arg1)
   at PowerArgs.ArgAction`1.Invoke() in c:\Work\Software Dev\Github\PowerArgs\PowerArgs\ArgAction.cs:line 38
   at AnalysisPrograms.MainEntry.Main(String[] args) in C:\Work\Github\audio-analysis\AudioAnalysis\AnalysisPrograms\MainEntry.cs:line 55

Steps to reproduce the behaviour

  • What command did you use?
    "C:\Temp\FalseColor\Run-ParallelJobs\131501647686439424\0\AP\AnalysisPrograms.exe" concatenateindexfiles -inputd "Y:\Results\2017Sep15-203834, Tshering, Towsey.Indices, #167\Tshering\WBH_Walaytar\WBH_2017\Ada Lake" -outputdirectory "Y:\Results\2017Sep15-203834, Tshering, Towsey.Indices, #167\ConcatResults\Tshering_WBH_Walaytar_WBH_2017" -directoryfilter *.wav -indexpropertiesconfig "Y:\Results\2017Sep15-203834, Tshering, Towsey.Indices, #167\IndexPropertiesConfig.yml" -falsecolourspectrogramconfig "Y:\Results\2017Sep15-203834, Tshering, Towsey.Indices, #167\SpectrogramFalseColourConfig.yml" -f "Ada Lake" -timespanoffsethint 06:00 -drawimages true -n
    
  • What config file did you use?
    • Y:\Results\2017Sep15-203834, Tshering, Towsey.Indices, #167\SpectrogramFalseColourConfig.yml
    • Y:\Results\2017Sep15-203834, Tshering, Towsey.Indices, #167\IndexPropertiesConfig.yml
  • Where can we find the source data used?
    • Y:\Results\2017Sep15-203834, Tshering, Towsey.Indices, #167

Any other details

  • Customized IndexProperties were used, as described in https://github.com/QutBioacoustics/Ecoacoustics/issues/167#issuecomment-328692700
  • log file: log.txt
@atruskie
Copy link
Member Author

This failed a second time with standard IndexProperties set as well. Second failure found here: Y:\Results\2017Sep18-094546 - Tshering, Towsey.Indices, #167\ConcatResults\Tshering_WBH_Walaytar_WBH_2017\Ada Lake

@towsey
Copy link
Contributor

towsey commented Sep 19, 2017

a) I have fixed this bug
b) I have tested the fixed code on the dataset
c) I have not done a unit test. I have left a TODO in the method summary.
Method at fault was ErroneousIndexsegments.DataIntegrityCheckForZeroSignal(double[] zeroSignalArray). For a unit test should provide an a array of zeros with two insertions of short runs of ones, One of the runs should terminate the array. that was where the bug was.
d) Closes #124

@towsey
Copy link
Contributor

towsey commented Sep 19, 2017

This issue fixed in commit 3352bb7

@towsey towsey closed this as completed Sep 19, 2017
towsey added a commit that referenced this issue Sep 19, 2017
Changes to method
ErroneousIndexsegments.DataIntegrityCheckForZeroSignal() closes Issue
#123.

Changes in ConcatenateIndexFiles.cs where change break to continue fixes
issue #124.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants