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

Ruger 10/22 magazine clone bug. #16445

Closed
slawr34 opened this issue Apr 29, 2016 · 12 comments

Comments

Projects
None yet
7 participants
@slawr34
Copy link

commented Apr 29, 2016

When reloading a magazine inside a Ruger 10/22 with a magazine in your inventory, the below bug occured and additionally - whilst my Ruger 10/22 was reloaded successfully and the depleted/empty magazine was added to my inventory - I would gain an additional magazine of the same type/ammunition type/rounds within the magazine.

Debug: Tried to remove an item from a character who doesn't have it

Function: virtual void item_location::item_on_person::remove_item()
File: src/item_location.cpp
Line: 216

@illi-kun illi-kun added the <Bug> label Apr 29, 2016

@slawr34

This comment has been minimized.

Copy link
Author

commented May 1, 2016

0.C-13528-g13127dc sorry, forgot the version. It only seems to happen when the mag is 4/10 full.

@hesu

This comment has been minimized.

Copy link
Contributor

commented May 9, 2016

Has it been fixed? I was unable to reproduce.

@ghost

This comment has been minimized.

Copy link

commented May 29, 2016

RM88 Battle Rifle with RMBG100 magazine also reproduces this issue. Reload the gun, then the same debug message jumps out. And a new RMBG100 magazine appeared in my inventory. Both builds by MinGW from latest commit and MSVC from my PR has the problem.

@mugling

This comment has been minimized.

Copy link
Contributor

commented Jul 1, 2016

Many recent changes. Anyone reproduce this in a recent copy of master?

@ghost

This comment has been minimized.

Copy link

commented Jul 1, 2016

I didn't reproduce this issue in the latest master branch (9e2ccb1).

Sorry, didn't test scrupulously.

BTW, it seems that #16771 is a duplication of this issue.

@BorkBorkGoesTheCode

This comment has been minimized.

Copy link
Contributor

commented Jul 2, 2016

0.C 15158 g1dbdddb
spawn 4 mp5 magazines, 1 mp5, and 4 stacks of 9mm jhp.
wield gun, r load mag 1 into the mp5, r load the mp5 with cartridges, r switch to mag 2, store mag 1 in inventory, load mag 2 with cartridges, switch to mag 3, ERROR.

Tried removing item from object which did not contain it.
item visitable: : removeitem (item&) [with T = character]
file src/visitable.cpp
line 427

and another error message for line 234

@ghost

This comment has been minimized.

Copy link

commented Jul 2, 2016

I found a simpler way to reproduce the error:

  1. Spawn a H&K MP5 and an empty magazine.
    
  2. Wield the gun, [r]eload the empty magazine, then ERROR.
    
@BorkBorkGoesTheCode

This comment has been minimized.

Copy link
Contributor

commented Jul 2, 2016

Something must have changed, because it only happens in the order I described. It is completely reproducible.

@ghost

This comment has been minimized.

Copy link

commented Jul 2, 2016

Something must have changed, because it only happens in the order I described. It is completely reproducible.

I can reproduce the issue by the simpler method in the commit yesterday (9e2ccb1).

@Lord-Helmchen

This comment has been minimized.

Copy link

commented Jul 31, 2016

as of 5313, this happens reliably to me.
new world, mods Folding Parts, Vehicle Additions
spawn Glock 22, 2 Glock. 40S&W mags, a few .40 bullets.
reload gun with mag, reload mag-in-gun with bullets, reload gun with empty mag from inventory.
-> DEBUG: item location does not point to valid item
FUNCTION: void item_location::remove_item()
FILE: src/item_location.cpp
LINE: 546

@mugling

This comment has been minimized.

Copy link
Contributor

commented Jul 31, 2016

That debugmsg was added by #17732 although the bug is older. Prior to that PR I suspect the game went on to clone or otherwise mishandle an item.

@mugling

This comment has been minimized.

Copy link
Contributor

commented Jul 31, 2016

Can reproduce

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.