lttng.ust: Properly null-check the debug info state system
authorAlexandre Montplaisir <alexmonthy@efficios.com>
Mon, 27 Jun 2016 19:41:51 +0000 (15:41 -0400)
committerAlexandre Montplaisir <alexmonthy@efficios.com>
Wed, 29 Jun 2016 21:04:33 +0000 (17:04 -0400)
When opening a trace, some views (callstack etc.) might request
symbol/function names before the state system is properly loaded,
so the checkNotNull() check can fail. Actually reply that the
information is not available, instead of breaking the whole trace.

Change-Id: I9cb5446b00444d2b8388e9f21a5822187fd30734
Signed-off-by: Alexandre Montplaisir <alexmonthy@efficios.com>
Reviewed-on: https://git.eclipse.org/r/76058
Reviewed-by: Hudson CI
lttng/org.eclipse.tracecompass.lttng2.ust.core/src/org/eclipse/tracecompass/lttng2/ust/core/analysis/debuginfo/UstDebugInfoAnalysisModule.java

index 8f9cf5115134ab59ff51f1fe057553697c383e09..6b6a78940b9fad998293478d8885e130cb6edb00 100644 (file)
@@ -186,7 +186,11 @@ public class UstDebugInfoAnalysisModule extends TmfStateSystemAnalysisModule {
      */
     @Nullable UstDebugInfoLoadedBinaryFile getMatchingFile(long ts, long vpid, long ip) {
         waitForCompletion();
-        final ITmfStateSystem ss = checkNotNull(getStateSystem());
+        final ITmfStateSystem ss = getStateSystem();
+        if (ss == null) {
+            /* State system might not yet be initialized */
+            return null;
+        }
 
         List<Integer> possibleBaddrQuarks = ss.getQuarks(String.valueOf(vpid), "*"); //$NON-NLS-1$
 
This page took 0.025585 seconds and 5 git commands to generate.