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

Segfault during startup #273

Closed
hka opened this issue Nov 13, 2023 · 6 comments
Closed

Segfault during startup #273

hka opened this issue Nov 13, 2023 · 6 comments
Labels
bug Something isn't working
Milestone

Comments

@hka
Copy link

hka commented Nov 13, 2023

I get a segfault running the latest build on my laptop: linux-v0.8.1-cc259c5.zip

Last lines before exiting:

Set camera limits to [lb: 2782, lt: -2782, ll: -3836, lr: 3836] and pos [(0, 0)]
GameScene has loaded.
ERROR: Can't create buffer of size: 26357760, error -2.
   at: _buffer_allocate (drivers/vulkan/rendering_device_vulkan.cpp:1360)                                                                       
zsh: segmentation fault  ./youtd2.x86_64

Tested 0.7.14 and that works fine. The web verison here: https://youtd2.com/ works as well.

It looks like it tries to allocate more video memory than I have. Details about the GPU I tested on below.

Vendor: Intel Open Source Technology Center (0x8086)
Device: Mesa DRI Intel(R) HD Graphics 4000 (IVB GT2) (0x166)
Version: 20.3.5
Accelerated: yes
Video memory: 1536MB
Unified memory: yes
Preferred profile: core (0x1)
Max core profile version: 4.2
Max compat profile version: 3.0
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.0
@Kvel2D Kvel2D added the bug Something isn't working label Nov 13, 2023
@Kvel2D
Copy link
Collaborator

Kvel2D commented Nov 13, 2023

I checked and 0.8 version does consume significantly more memory than 0.7.

  • 0.7 = 1GB
  • 0.8 = 1.7GB

The main difference between 0.7 and 0.8 is that 0.8 added new tiles so that's what consuming the memory.

We'll try to reduce memory consumption to something more reasonable.

@Kvel2D
Copy link
Collaborator

Kvel2D commented Nov 13, 2023

Removed "-floor2" tilesets in this commit 20160b1
This resulted in ~20% reduction in used memory (1.7GB->1.4GB).

Should try to improve memory use more.

@hka
Copy link
Author

hka commented Nov 13, 2023

That fixed it, now it loads fine. But sounds big with 1GB of video memory use? Is the same texture stored multiple times?

@hka
Copy link
Author

hka commented Nov 13, 2023

Or not, crashed when I placed a tower. Attaching log of output.
youtd_crash.log

@Kvel2D
Copy link
Collaborator

Kvel2D commented Nov 14, 2023

I created a separate issue #274 where we'll try to get VRAM usage down to something reasonable.

That fixed it, now it loads fine. But sounds big with 1GB of video memory use? Is the same texture stored multiple times?

It's because of tiles and the way we use them. The tilesheets are high-res and you can't compress them if you want to use them in Godot tilemaps. And we use a lot of tiles in general.

@hka
Copy link
Author

hka commented Nov 15, 2023

Tested 0.8.4 now and it works fine playing, closing this issue.

@hka hka closed this as completed Nov 15, 2023
@Praytic Praytic added this to the 0.9 milestone Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants