From 33c6813eb8d4c7480eaf4bc2584c0345383e35c4 Mon Sep 17 00:00:00 2001 From: Alexandre Montplaisir Date: Wed, 13 Jul 2016 15:09:45 -0400 Subject: [PATCH] lttng.ust: Catch TimeRangeException in UstDebugInfoAnalysisModule This exception may happen if the statesystem was not fully built due to using pre-release traces that do not have all the expected event fields. Since there are such traces out in the wild, this situation can happen sometimes. Bug: 497863 Change-Id: Id8c14e36f9dcfe1858628f96298ed3959c0a58f5 Signed-off-by: Alexandre Montplaisir Reviewed-on: https://git.eclipse.org/r/77263 Reviewed-by: Marc-Andre Laperle Tested-by: Marc-Andre Laperle Reviewed-by: Hudson CI --- .../core/analysis/debuginfo/UstDebugInfoAnalysisModule.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lttng/org.eclipse.tracecompass.lttng2.ust.core/src/org/eclipse/tracecompass/lttng2/ust/core/analysis/debuginfo/UstDebugInfoAnalysisModule.java b/lttng/org.eclipse.tracecompass.lttng2.ust.core/src/org/eclipse/tracecompass/lttng2/ust/core/analysis/debuginfo/UstDebugInfoAnalysisModule.java index ca83c6ceb8..dad1258a40 100644 --- a/lttng/org.eclipse.tracecompass.lttng2.ust.core/src/org/eclipse/tracecompass/lttng2/ust/core/analysis/debuginfo/UstDebugInfoAnalysisModule.java +++ b/lttng/org.eclipse.tracecompass.lttng2.ust.core/src/org/eclipse/tracecompass/lttng2/ust/core/analysis/debuginfo/UstDebugInfoAnalysisModule.java @@ -26,6 +26,7 @@ import org.eclipse.tracecompass.statesystem.core.ITmfStateSystem; import org.eclipse.tracecompass.statesystem.core.StateSystemUtils; import org.eclipse.tracecompass.statesystem.core.exceptions.AttributeNotFoundException; import org.eclipse.tracecompass.statesystem.core.exceptions.StateSystemDisposedException; +import org.eclipse.tracecompass.statesystem.core.exceptions.TimeRangeException; import org.eclipse.tracecompass.statesystem.core.interval.ITmfStateInterval; import org.eclipse.tracecompass.statesystem.core.statevalue.ITmfStateValue; import org.eclipse.tracecompass.tmf.core.analysis.requirements.TmfAbstractAnalysisRequirement; @@ -168,7 +169,7 @@ public class UstDebugInfoAnalysisModule extends TmfStateSystemAnalysisModule { } } catch (AttributeNotFoundException e) { throw new IllegalStateException(e); - } catch (StateSystemDisposedException e) { + } catch (TimeRangeException | StateSystemDisposedException e) { /* Oh well, such is life. */ } return files; @@ -255,7 +256,7 @@ public class UstDebugInfoAnalysisModule extends TmfStateSystemAnalysisModule { // TODO: that's probably not true anymore /* We're only using quarks we've checked for. */ throw new IllegalStateException(e); - } catch (StateSystemDisposedException e) { + } catch (TimeRangeException | StateSystemDisposedException e) { return null; } } -- 2.34.1