Issue966

Title application crash after "The item array for level 0 was full"
Priority release-blocker Status resolved
Assigned To fluzz Keywords
Linked issues Watchers fluzz

Submitted on 2020-05-10 21h19 by gfobe, last changed by fluzz.

Files
File name Uploaded Type Edit Remove
FreedroidRPG-savegame_Sari.zip gfobe, 2020-05-10.21:19:27 application/x-zip-compressed
Messages
Author: gfobe Date: 2020-05-10   21h19
"FreedroidRPG 1.0rc1 encountered a problem in function: find_free_floor_index
The item array for level 0 was full."

Steps to reproduce:
0. unzip and load attached savegame "Sari"
1. Teleport via "protecting zone" to town
2. Drop one police shield to floor
3. Dropping next shield will not working
4. in the inventory swap the attached helmet with the worker helmet of inventory
5. application will crash

expected behavior:
- error message dropping item to floor
- working helmet switch

discovered behavior:
- not working drop item, no error message
- application crash on helmet change
Author: gfobe Date: 2020-05-10   21h36
reproduceable also in FreedroidRPG 1.0rc2
Author: gfobe Date: 2020-05-10   21h59
Position to add status message e.g. "There is not enough space on the ground." on item drop: https://gitlab.com/freedroid/freedroid-src/-/blob/master/src/items.c#L1204

No idea what the helmet switch has to do with it.
Author: jesusalva Date: 2020-05-15   05h14
When you try switching the item, it forces the placement of the item on the 
floor. If there is no more space to drop items, it silently explodes (not even 
a traceback O.o)


The guilt is items.c:590, function "MakeHeldFloorItemOutOf".
It calls Terminate(EXIT_FAILURE), so not traceback is produced.


Review Request 2402 will get rid of both DebugPrintf and Terminate in favor of 
error_message(IS_FATAL).

The ideal behavior, however, would be canceling the operation, reason why I 
assing this to fluzz and raise priority to "important". (Why not critical if it 
is a crash, again? Meh, nevermind.)
Author: fluzz Date: 2021-12-24   10h22
commit 9937c9cae replaces the static C array by a dynarray.

this fixes the reported issues
History
Date User Action Args
2021-12-24 10:22:28fluzzsetstatus: open -> resolved
messages: + msg3721
2021-11-05 10:54:37fluzzsetpriority: important -> release-blocker
2020-05-15 05:14:32jesusalvasetpriority: bug -> important
nosy: + fluzz
messages: + msg3685
assignedto: fluzz
2020-05-10 21:59:22gfobesetmessages: + msg3682
2020-05-10 21:36:16gfobesetmessages: + msg3681
2020-05-10 21:19:28gfobecreate