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

Crash on close #459

Closed
ghost opened this issue Sep 14, 2020 · 6 comments
Closed

Crash on close #459

ghost opened this issue Sep 14, 2020 · 6 comments

Comments

@ghost
Copy link

ghost commented Sep 14, 2020

Environment information:

  • AGI version: 1.0.0
  • Host OS: macos 10.15.6
    If tracing on Android:
  • Device model:
  • Android Version:

Bug description
Crashed on close

Reproduction steps

  1. I got excited and downloaded the newly released version 1.0.0
  2. opened the app
  3. ignored the dialog that said to specify the adb location
    4 closed the window

Stacktrace
java.lang.NullPointerException
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3788)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:823)
at org.eclipse.jface.window.Window.open(Window.java:799)
at com.google.gapid.Main$UI.show(Main.java:134)
at com.google.gapid.Main.main(Main.java:80)

Screenshots
If applicable, add screenshots to help explain your problem.
Screen Shot 2020-09-15 at 00 42 10

Additional debugging information

  • Please attach the generated gapis.log and gapic.log files you will find in the temp folder (e.g. /tmp/ on linux).
  • If using Android: Please attach a full logcat dump (adb logcat -d > logcat-full.txt) that contains logs since AGI was started.
@pmuetschard
Copy link
Member

Thank you for the bug report. I'm failing to reproduce the issue. When you say you ignored the dialog, do you mean you hit escape, closed it by clicking the red close button, or just clicked on the "Get started" button? How did you close the App? Cmd-q, the menu, the red close button? I've tried all these and couldn't replicate.

Although, looking at the stack, there could be some kind of race going on, which would explain why I can't replicate. Does this keep happening for you all the time?

@ghost
Copy link
Author

ghost commented Sep 15, 2020

I have reproduced this 2 times, first closed the ADB dialog with close button then closed the main window again with the close button. The second time specified the adb location then get "Get started", then closed the app with top panel options "Quit the android gpu inspector". I tried these steps about 6 times got this crash 2 times. I looked at the code and I thought about race condition, too. I will try to find time to investigate this crash and will provide a fix for this :)

@pau-baiget
Copy link
Contributor

HI @artyomdangizyan! Did you have some time to investigate this issue? Could you please provide the logs so we can take a look here? Thank you very much!

@ghost
Copy link
Author

ghost commented Oct 5, 2020

Hi @pau-baiget I attached the log files. I have already reproduced this crash about 10-15 times but I still can't reproduce this from the first try. I tried to build the project to debug the crash, but building this project in my environment is too painful (the bazel version is mismatched, some externals libs are failing because of some warnings, etc..) But I have looked at the sources and my hypothesis is that this crash is a result fo some race condition, a thread is asynchronously closing the application and calling destroy on the window after which the application member in windows is becoming null and the other thread is looping and it has already successfully passed the validation that window is not destroyed. But unfortunately, I couldn't find any asynchrony all to the MainWindow close method. Anyway, do you need any more info from me for the investigation of this crash?
gapic.log
gapis.log

@pau-baiget
Copy link
Contributor

@artyomdangizyan , apologies for the lack of follow-up!! We have published loads of fixes and updated UI libraries (PR) so this issue might not be reproducible anymore. Can you please try the latest dev release?

Thanks! We'll monitor this bug more closely so it doesn't get stuck again!

@pau-baiget
Copy link
Contributor

Closing this issue as we're not able to reproduce this issue anymore. @artyomdangizyan please add a comment and we'll reopen if necessary, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants