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

Attempting to wield or wear an item from the Pickup menu will cause a CTD if you can't fit it into your inventory #62314

Closed
Ilysen opened this issue Nov 20, 2022 · 12 comments · Fixed by #62317
Labels
(S1 - Need confirmation) Report waiting on confirmation of reproducibility

Comments

@Ilysen
Copy link
Contributor

Ilysen commented Nov 20, 2022

Describe the bug

See title. The game will hang and then close when you try to wield or wear an item in this manner.

Steps to reproduce

  1. Find an item that you can wield/wear but not fit into your inventory. A big thing like a 60 L tank usually works.
  2. Use the pickup menu (default hotkey g) for that tile. Try to wield it or Wear it.
  3. CTD and cry.

Expected behavior

You should be able to wield or wear items from the world without crashing the game.

Screenshots

N/A - see Additional context

Versions and configuration

You'll notice that the version is dirty; I compile my game from source when I play/code/etc, and this happened on a branch for an existing PR I've got. The master commit it's based on, however, is f6e4f2f.

  • OS: Windows
    • OS Version: 10.0.19044.2251 (21H2)
  • Game Version: 0.F-12437-g082aba1ce0-dirty [64-bit]
  • Graphics Version: Tiles
  • Game Language: System language []
  • Mods loaded: [
    Dark Days Ahead [dda],
    Blaze Industries [blazeindustries],
    Bionic Slots [cbm_slots],
    Disable NPC Needs [no_npc_food],
    No Fungal Growth [no_fungal_growth],
    No Rail Stations [No_Rail_Stations]
    ]

Additional context

This appears to be caused by #62226. Rolling back the changes to inventory_ui.cpp stops the issue from happening.

devenv_uVnC0lNzR3

image

I'm attaching my save file I used to verify this bug, although you probably won't need it:
Sidney.zip

And here's the debug.log, although it's cluttered from a bunch of previous runs I was doing for testing of other bugs:
debug.log

@Ilysen Ilysen added the (S1 - Need confirmation) Report waiting on confirmation of reproducibility label Nov 20, 2022
@DSeyka
Copy link
Contributor

DSeyka commented Nov 20, 2022

Can confirm, I was just about to report this as well.

@andrei8l
Copy link
Contributor

Model bug report

@aleksandrtikh
Copy link

It's the case for any greyed-out item. Same thing happens with too heavy items and liquids.

@Luthaar
Copy link

Luthaar commented Nov 21, 2022

It still didn't get fixed with the latest experimental version, hope this gets fixed soon

@Wishbringer
Copy link
Contributor

The current patch doesn't fix the CTD when trying to select liquids.

@andrei8l
Copy link
Contributor

The current patch doesn't fix the CTD when trying to select liquids.

I can't reproduce. You should make comments about the patch on the PR rather than here.

Screenshot from 2022-11-21 14-27-04

@Wishbringer
Copy link
Contributor

@andrei8l: Looks like you are trying to directly wield the item not select it?

@andrei8l
Copy link
Contributor

What are the exact steps? Tell me the exact keys you press to get the crash please

@Wishbringer
Copy link
Contributor

Wishbringer commented Nov 21, 2022

@andrei8l: Pick up items from one/all nearby tile, followed by Marked/unmark selected item (not using default keys).
Expected behavior is a + prefix instead of the -.

@andrei8l
Copy link
Contributor

andrei8l commented Nov 21, 2022

I've added F7 to Marked/unmark selected item and I still cannot reproduce the crash.

Expected behavior is a + prefix instead of the -.

Are you sure? I cannot reproduce this for liquids with yesterday's build either. Liquids are not supposed to be selectable at all.

EDIT: is the liquid frozen maybe?

@Wishbringer
Copy link
Contributor

Wishbringer commented Nov 21, 2022

Not frozen no, It's possible my problem is due to an interaction with other yet unmerged PRs.
Maybe the problem is in function inventory_multiselector::toggle_entries as there is another instance of std::vector<inventory_entry *> selected there (pure guess)?
Edit: Will try reverting the PR #62226 to make sure the problem is caused by it.

@Wishbringer
Copy link
Contributor

Wishbringer commented Nov 21, 2022

Tried reverting PR #62226 and that fixed the problem for me.
Just to be clear the crash doesn't happen in category select mode, only when trying to select a single item.
Also happens when trying to select spilled liquids.
Does this happen to anyone else?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
(S1 - Need confirmation) Report waiting on confirmation of reproducibility
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants