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

Dota 2 Vulkan: Unhandled exception in the UI thread. #2075

Closed
danginsburg opened this issue Jul 23, 2018 · 8 comments
Closed

Dota 2 Vulkan: Unhandled exception in the UI thread. #2075

danginsburg opened this issue Jul 23, 2018 · 8 comments
Assignees

Comments

@danginsburg
Copy link

GAPID Version: 1.1.1:developer
OS: windows 10 amd64

  1. Install Dota 2 (free from Steam) including Vulkan DLC
  2. Setup GAPID to trace: STEAM_DIR\steamapps\common\dota 2 beta\game\bin\win64\dota2.exe
  3. Add Arguments: -vulkan, set working directory to STEAM_DIR\steamapps\common\dota 2 beta\game\bin\win64
  4. Start game, go to main menu, click "Stop".
  5. The trace crashes with the following callstack (logs attached below).

org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException)
at org.eclipse.swt.SWT.error(Unknown Source)
at org.eclipse.swt.SWT.error(Unknown Source)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Unknown Source)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Unknown Source)
at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:818)
at org.eclipse.jface.window.Window.open(Window.java:794)
at com.google.gapid.Main$UI.show(Main.java:118)
at com.google.gapid.Main.main(Main.java:73)
Caused by: java.lang.NullPointerException
at java.util.Arrays.stream(Arrays.java:5004)
at com.google.gapid.models.ApiContext.highestPriorityContext(ApiContext.java:112)
at com.google.gapid.models.ApiContext.fireLoadedEvent(ApiContext.java:106)
at com.google.gapid.models.ModelBase.updateError(ModelBase.java:110)
at com.google.gapid.models.ModelBase$1.onUiThreadError(ModelBase.java:82)
at com.google.gapid.rpc.UiErrorCallback.onUiThread(UiErrorCallback.java:36)
at com.google.gapid.rpc.UiErrorCallback.onUiThread(UiErrorCallback.java:25)
at com.google.gapid.rpc.UiCallback.lambda$onFinish$0(UiCallback.java:46)
at com.google.gapid.widgets.Widgets.ifNotDisposed(Widgets.java:119)
at com.google.gapid.widgets.Widgets.lambda$scheduleIfNotDisposed$1(Widgets.java:147)
at com.google.gapid.widgets.Widgets.lambda$schedule$0(Widgets.java:139)
at org.eclipse.swt.widgets.RunnableLock.run(Unknown Source)
... 7 more

gapic.log
gapis.log

@ben-clayton
Copy link
Contributor

Relevant bit of the crash log:

 panic(0x2ce0ba0, 0x6019c00)
 	GOROOT/src/runtime/panic.go:502 +0x237
 github.com/google/gapid/gapis/api/vulkan.VkCmdDebugMarkerBeginEXTArgs?.MarkerName(...)
 	bazel-out/x64_windows-opt/genfiles/gapis/api/vulkan/api.go:25528
 github.com/google/gapid/gapis/api/vulkan.subDovkCmdDebugMarkerBeginEXT(0x37dee20, 0xc04e2a8f60, 0x381d480, 0xc04f9ad3e0, 0xa021, 0xc04fa9d4a0, 0xc05e944460, 0xc05eab2000, 0x1dd0, 0x0, ...)
 	bazel-out/x64_windows-opt/genfiles/gapis/api/vulkan/mutate.go:3716 +0x48
 github.com/google/gapid/gapis/api/vulkan.subCallCommand(0x37dee20, 0xc04e2a8f60, 0x381d480, 0xc04f9ad3e0, 0xa021, 0xc04fa9d4a0, 0xc05e944460, 0xc05eab2000, 0x1dd0, 0x0, ...)
 	bazel-out/x64_windows-opt/genfiles/gapis/api/vulkan/mutate.go:2881 +0x326d
 github.com/google/gapid/gapis/api/vulkan.subExecPendingCommands(0x37dee20, 0xc04e2a8f60, 0x381d480, 0xc04f9ad3e0, 0xa021, 0xc04fa9d4a0, 0xc05e944460, 0xc05eab2000, 0x1dd0, 0x0, ...)
 	bazel-out/x64_windows-opt/genfiles/gapis/api/vulkan/mutate.go:2678 +0x59f
 github.com/google/gapid/gapis/api/vulkan.(*VkQueueSubmit).Mutate(0xc04f9ad3e0, 0x37dee20, 0xc04e2a8f60, 0xa021, 0xc05e944460, 0x0, 0x0, 0x0)
 	bazel-out/x64_windows-opt/genfiles/gapis/api/vulkan/mutate.go:11445 +0x2162
 github.com/google/gapid/gapis/resolve.(*ResourcesResolvable).Resolve.func4(0x37dee20, 0xc04e2a8f60, 0xa021, 0x381d480, 0xc04f9ad3e0, 0x0, 0x0)
 	gapis/resolve/resources.go:88 +0x7a
 github.com/google/gapid/gapis/api.ForeachCmd(0x37dee20, 0xc04e2ae060, 0xc059f94000, 0x2cc4d, 0x2d600, 0xc067b6bcf0, 0x0, 0x0)
 	gapis/api/cmd_foreach.go:46 +0x14f
 github.com/google/gapid/gapis/resolve.(*ResourcesResolvable).Resolve(0xc04e2b4d50, 0x37dee20, 0xc04e2ae060, 0x37964a0, 0xc04e2b4d50, 0x1, 0x3798b20)
 	gapis/resolve/resources.go:85 +0x3f1
 github.com/google/gapid/gapis/database.(*record).resolve(0xc04deda240, 0x37dee20, 0xc04e2d1d70, 0x37dee20, 0xc04e2d1d70)
 	gapis/database/memory.go:127 +0xec
 github.com/google/gapid/gapis/database.(*memory).resolveLocked.func1()
 	gapis/database/memory.go:214 +0xa6
 github.com/google/gapid/core/app/crash.Go.func1(0xc04e2d1da0)
 	core/app/crash/crash.go:65 +0x4a

@AWoloszyn
Copy link
Contributor

Thank you for the bug report. I have investigated this and was able to reproduce. It looks like the issue is related using an extension we do not support. I will continue to investigate to make sure this is the case.

If it is the case, we will implement support for the extensions.

We have been reluctant as of now to filter out extensions from the reported list, as it can affect application behavior, and many extensions can be enabled without fault. However it may make sense to add that as a supported mode so that applications don't have to change their behavior in order to use GAPID.
@ben-clayton What is your opinion on this second bit.

@AWoloszyn
Copy link
Contributor

It looks like this was related to the extensions, but also that an invalid image (and ImageView) is being used in a number of places.

#2082
and
#2081

Should fix the issue once they are merged.

@AWoloszyn
Copy link
Contributor

#2090 Was the last thing that needed to be merged. For context, Dota2 does something that I have not seen before, which is intentionally over-allocate descriptor sets until they get errors from the driver. We were not handling that case correctly. We do now.

@AWoloszyn
Copy link
Contributor

This should be fixed now. I have successfully traced / replayed .

@danginsburg
Copy link
Author

Thanks @AWoloszyn! Yeah, with VK_KHR_maintenace1 we depend on descriptor set allocations to fail. Is there a build of gapid I could try this with?

@AWoloszyn
Copy link
Contributor

@danginsburg I will get a build together tomorrow for you.

@AWoloszyn
Copy link
Contributor

@danginsburg We are still working on getting nightly/canary builds out, but for now I have shared a build with you directly.

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

4 participants