Opening an empty trace called queryFullStates an infinite number
of times resulting in OOM. Checking the arguments will avoid
this.
Bug 479996
Change-Id: I0ac29da7a883d154fffb5c4d24aa50db32796a6f
Signed-off-by: Loïc Prieur-Drevon <loic.prieurdrevon@gmail.com>
Reviewed-on: https://git.eclipse.org/r/86862
Reviewed-by: Hudson CI
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-by: Patrick Tasse <patrick.tasse@gmail.com>
Tested-by: Patrick Tasse <patrick.tasse@gmail.com>
*/
protected void queryFullStates(ITmfStateSystem ss, long start, long end, long resolution,
@NonNull IProgressMonitor monitor, @NonNull IQueryHandler handler) {
+ if (end < start) {
+ /* We have an empty trace, the state system will be empty: nothing to do here. */
+ return;
+ }
List<List<ITmfStateInterval>> fullStates = new ArrayList<>();
List<ITmfStateInterval> prevFullState = null;
try {