Home » MODDING HQ 1.13 » v1.13 Bug Reports » Reproducible deadlock in SCI unstable 8366 (2017-01-15 build)
Reproducible deadlock in SCI unstable 8366 (2017-01-15 build)[message #348571] Mon, 30 January 2017 07:46 Go to next message
marginoferror
Messages:8
Registered:February 2007
Found a 100% reproducible deadlock (mouse cursor frozen and all, but no crash) in the latest unstable build.

1) Load the following save: https: //dl.dropboxusercontent.com/u/9157798/SaveGame11.sav (remove space after the scheme)
2) With this INI: https: //dl.dropboxusercontent.com/u/9157798/Ja2_Options.INI (remove space after the scheme)
3) Select Hitman and open his inventory
4) Open the sector inventory for the sector Hitman is in
5) Left-click on the carabiner on his Specter rig (equipped on his right thigh)
6) Select 9x18mm Mag 30 (1) from the dropdown

The deadlock happens as soon as the magazine is selected.
Re: Reproducible deadlock in SCI unstable 8366 (2017-01-15 build)[message #348584 is a reply to message #348571] Mon, 30 January 2017 22:14 Go to previous messageGo to next message
Flugente

 
Messages:3051
Registered:April 2009
Location: Germany
Strangely enough, when I try to download that save, I only get a webpage displaying it in binary, which... yeah. No idea why that worked on the other save, but I can't use this.



Saren threw his head back and screamed in impotent fury, before falling to his throne, head in his claws, trembling in horrified disbelief.

Then he heard a faint chime as Sovereign subscribed to her ECHO channel.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.


Re: Reproducible deadlock in SCI unstable 8366 (2017-01-15 build)[message #348586 is a reply to message #348571] Mon, 30 January 2017 23:15 Go to previous messageGo to next message
Someone64

 
Messages:36
Registered:May 2015
Location: Philippines
Right click the page that's displayed, press save page as. It will prompt you on where to install the proper .sav file.
Re: Reproducible deadlock in SCI unstable 8366 (2017-01-15 build)[message #348591 is a reply to message #348586] Tue, 31 January 2017 02:10 Go to previous messageGo to next message
Flugente

 
Messages:3051
Registered:April 2009
Location: Germany
Hmpf. Why didn't I think of that? shy

Anyway, can reproduce the issue. It seems to be down deep in pocket code. Apparently when you click, the game creates the mag, and tries to place it. But that fails, so we are stuck in a loop without an exit condition. Once again, I'm bewildered, cause I assume this has to have worked at some time. It also seems highly suspicious to me that we try to place an SMG mag on a carabiner, but I'm not well versed in Molle stuff.

Not sure if I can find a solution quick, cause it's sleepy time down here. If not, likely tomorrow angel



Saren threw his head back and screamed in impotent fury, before falling to his throne, head in his claws, trembling in horrified disbelief.

Then he heard a faint chime as Sovereign subscribed to her ECHO channel.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.


Re: Reproducible deadlock in SCI unstable 8366 (2017-01-15 build)[message #348597 is a reply to message #348591] Tue, 31 January 2017 03:12 Go to previous messageGo to next message
marginoferror
Messages:8
Registered:February 2007
I can't find any good documentation for what is and is not acceptable on a carabiner but I don't think magazines usually qualify (?) so I assume that's related to the problem. Not sure why it's showing up on the dropdown menu if it's just going to fail.

Thanks for taking a look at it. =)
Re: Reproducible deadlock in SCI unstable 8366 (2017-01-15 build)[message #348614 is a reply to message #348597] Tue, 31 January 2017 23:15 Go to previous message
Flugente

 
Messages:3051
Registered:April 2009
Location: Germany
Urgs. I guess its fixed now, but not the underlying issue.

Basically, when clicking on that pocket, the game is told to give us the option to create ammo for the guns we have in our inventory.
http://i.imgur.com/QiXc22a.png

However, once we actually click on ammo, the game discovers that there is no space for that in that slot. Even though we've checked for that earlier. As usual, any sort of error handling doesn't exist, which is rather sad, as we are in a while-loop while putting the created item into our inventory (why? No idea speechless ). Thus we have a deadlock.

In my (uninformed) opinion, either the stock MOLLE data is bad, or the pocket code is bad, or both. As I have no interest in diving deeper into that, I've simply added an exit clause to the while-loop, resulting in the created SMG mag to be dumped into the sector inventory. This has been done in r8385.

Just in case someone else actually tries to fix this: When clicking on the Carabiner (item 1695, ubClassIndex 95), we get the option to create a 9x18mm Mag 30 (item 510, size 16). LBE 95's only pcoket is 38, which has ItemCapacityPerSize16 of 1. Apparently this means one item of size 16 would fit here... which is why we have that option (void addAmmoToPocketPopup( SOLDIERTYPE *pSoldier, INT16 sPocket, POPUP* popup ) in InterfaceItems.cpp). Only that stuff doesn't really fit - in void popupCallbackAmmo(UINT16 item, UINT16 pocket, SOLDIERTYPE* pSoldier ), this bit loops because AddObjectsToStack(...) fails:
while ( tempStack.ubNumberOfObjects > 0 )
{
	if(pocket != -1)
	{
		pSoldier->inv[pocket].AddObjectsToStack(tempStack, bLoop, pSoldier, pocket);
	}
	else
	{
		bLoop--;
	}
	if(bLoop < 1)
		break;
}

And as ItemSlotLimit(...) takes an object instead of just the item number, I'm not sure we have a fitting function to check whether the item fits (the current method obviously fails).

Edit: lvlup! big grin

[Updated on: Tue, 31 January 2017 23:16]




Saren threw his head back and screamed in impotent fury, before falling to his throne, head in his claws, trembling in horrified disbelief.

Then he heard a faint chime as Sovereign subscribed to her ECHO channel.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.


Previous Topic: Reproducible crash in SCI unstable 8366 (2017-01-15 build)
Next Topic: Henning Van Branitz
Goto Forum:
  


Current Time: Sat May 27 05:16:21 EEST 2017

Total time taken to generate the page: 0.00767 seconds