Community
Participate
Working Groups
A Null pointer exception is triggered the very first debug session while in the C++ perspective, There does not seem to be a user impact as the visualizer behaves properly once the multi-core visualizer view is available.
Created attachment 235151 [details] stack trace
Hi, I am sometimes able to reproduce the NPE. I think it's a race condition at startup of the first debug session, where some of the time we process debug events and try to update the visualizer model before it has had the chance to be created. It doesn't make sense to try to update the model if it doesn't exist yet, so a simple way to prevent the NPEs is to check if the model is null before trying to update it. Nothing important will be lost since the model will be created soon after from the latest state of the debug session. I will submit a patch for this soon. Thanks for reporting the issue.
Here is the proposed patch. While investigating this bug, I noticed that if I protect only for the specific NPE described here, other similar NPEs happen in the other listener methods. So I have added protection to all listener methods that modify the visualizer model. https://git.eclipse.org/r/16156
Thanks Marc. I've committed to master: http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=cf3f7a88971d00f5876c393d76630c2f64bc730b and cdt_8_2: http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?h=cdt_8_2&id=02393d61f18f0ac50f4d32e23ba6177cf6e214e2
*** cdt git genie on behalf of Marc Dumais *** Bug 416524 - [Visualizer] NPE first session in C++ perspective Change-Id: I586bccc85b043d7e1cadf5298aaf3c22bb79e950 Reviewed-on: <a href="https://git.eclipse.org/r/16156">https://git.eclipse.org/r/16156</a> Reviewed-by: Alvaro Sanchez-Leon <alvsan09@xxxxxxxxx> Reviewed-by: Marc Khouzam <marc.khouzam@xxxxxxxxxxxx> IP-Clean: Marc Khouzam <marc.khouzam@xxxxxxxxxxxx> Tested-by: Marc Khouzam <marc.khouzam@xxxxxxxxxxxx> Signed-off-by: Marc Khouzam <marc.khouzam@xxxxxxxxxxxx> Signed-off-by: Marc Dumais <marc.dumais@xxxxxxxxxxxx> [*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=02393d61f18f0ac50f4d32e23ba6177cf6e214e2