canelacaliente
6 days agoSeasoned Ace
Status:
Reviewed
[BH] Spoiled Food Items Become Corrupted Preventing Saving
1. Summary
Spoiled food items placed on refrigerated retail display cases become permanently corrupted if the display case is moved or stored in the household inventory during Build/Buy mode. The corrupted food cannot be placed back in the world, causing errors, and if placed, instantly turns into an ash pile, breaking the retail system.
2. Detailed Description of the Bug
This bug occurs through a specific sequence of events involving the retail and object state systems:
Step-by-Step Cause:
- Creation of Spoiled Food: Food is created (e.g., via a "Cooking Class" event) and stored in a fridge. The food is left to spoil, activating its "spoiled" state.
- Placement on Retail Display: The player, owning a home retail business, places the already spoiled food item on a refrigerated display case. The game's retail system attempts to assign a value and retail data to the item.
- Build/Boy Interaction: The player enters Build/Buy mode and modifies the lot in a way that causes the display case (and the spoiled food on it) to be moved to the household inventory.
- Corruption Trigger: The process of being sent to the household inventory while in a "spoiled" state and with "retail" data attached causes the food item's data to become corrupted. A key value (likely its price or spoilage state) is lost and becomes None.
- Manifestation of the Bug:
- In Inventory: The food item becomes stuck. Attempting to place it may generate a system error (light_retail_surface_component.py:198 - AttributeError: 'NoneType' object has no attribute 'get_value').
- If Placed: The item appears briefly but immediately turns into an ash pile, as the game's state system cannot resolve its corrupted data.
3. Technical Analysis (Based on Provided Error Logs)
The error logs point directly to the core of the problem:
- Error Signature: AttributeError: 'NoneType' object has no attribute 'get_value' in light_retail_surface_component.py:198.
- What's Happening in the Code:
- The light_retail_surface_component.py file handles the pricing and data for items placed on retail shelves.
- When the game tries to read the value of the corrupted food item (to display a price, save the game, or place it from inventory), it calls a function to get_value().
- However, the internal data structure that should hold this value is None (empty/missing). You cannot ask "nothing" for its value, so the game crashes with this AttributeError.
- Cascading Failures: This single corruption then causes failures in:
- Saving: The game cannot serialize the corrupted item's data, throwing an exception during the save process.
- Build/Buy Mode: The dynamic tagging system crashes when it tries to update and cannot find the corrupted item's data in the manager.
- Object Cleanup: The game crashes when trying to destroy or reset the corrupted object.
4. Steps to Reproduce
- Prerequisites:
- Own a home lot with a retail business.
- Have a refrigerator and a refrigerated display case.
- Have a Sim prepare a meal (e.g., via Cooking Class or normally).
- Reproduction Steps:
- Let the prepared meal spoil inside the refrigerator.
- Open the retail store. Take the spoiled meal from the fridge and place it on the refrigerated display case for sale.
- Close the retail store.
- Enter Build/Buy mode.
- Move the refrigerated display case (with the spoiled food on it) to your household inventory, or modify the room in a way that causes this to happen automatically.
- Exit Build/Buy mode.
- Re-enter Build/Buy mode and try to place the display case (with the food) from your household inventory back onto the lot.
- Observe Result 1: The food item cannot be placed and generates an error (system error).
- Observe Result 2: If the food does place, it immediately turns into an ash pile or it works like normal. The error log will contain multiple light_retail_surface_component.py exceptions.
5. Player Impact
This bug is highly destructive as it can permanently corrupt a player's save file.
- Gameplay Block: The retail functionality on the affected lot can become permanently broken.
- Save File Corruption: The corrupted item can prevent the game from saving properly.
- Loss of Assets: Items become permanently stuck in the household inventory, cluttering it and potentially causing ongoing instability.
- Frustration: The chain of events is not intuitive, and the resulting bugs seem unrelated to the player's actions, making it difficult to troubleshoot.
Last Exception
Report 1: The Save File Failure
<report>
<version>2</version>
<sessionid>ba05b2e926977adc68e4e7f5</sessionid>
<type>desync</type>
<sku>ea.maxis.sims4_64.15.pc</sku>
<createtime>2025-10-07 03:42:16</createtime>
<buildsignature>Local.Unknown.Unknown.1.118.257.1020-1.300.000.223.Release</buildsignature>
<categoryid>light_retail_surface_component.py:198</categoryid>
<desyncid>ba05b2e926977adc68e4e7f5</desyncid>
<systemconfig/>
<screenshot/>
<desyncdata>Exception occurred while attempting to populate a repeated field: (AttributeError: 'NoneType' object has no attribute 'get_value')
Traceback (most recent call last):
File "T:\InGame\Gameplay\Scripts\Core\sims4\utils.py", line 179, in wrapper
File "T:\InGame\Gameplay\Scripts\Server\areaserver.py", line 219, in c_api_server_tick
File "T:\InGame\Gameplay\Scripts\Server\scheduling.py", line 231, in simulate
File "T:\InGame\Gameplay\Scripts\Server\elements.py", line 376, in _run
File "T:\InGame\Gameplay\Scripts\Server\services\persistence_service.py", line 465, in call_save_game_gen
File "T:\InGame\Gameplay\Scripts\Server\services\persistence_service.py", line 502, in save_game_gen
File "T:\InGame\Gameplay\Scripts\Server\services\persistence_service.py", line 547, in _save_game_gen
File "T:\InGame\Gameplay\Scripts\Server\services\persistence_service.py", line 616, in _fill_and_send_save_game_protobufs_gen
File "T:\InGame\Gameplay\Scripts\Core\sims4\service_manager.py", line 537, in save_all_services
File "T:\InGame\Gameplay\Scripts\Server\zone_manager.py", line 122, in save
File "T:\InGame\Gameplay\Scripts\Server\zone.py", line 1781, in save_zone
File "T:\InGame\Gameplay\Scripts\Core\sims4\service_manager.py", line 537, in save_all_services
File "T:\InGame\Gameplay\Scripts\Server\objects\object_manager.py", line 961, in save
File "T:\InGame\Gameplay\Scripts\Server\objects\object_manager.py", line 916, in save_game_object
File "T:\InGame\Gameplay\Scripts\Server\objects\game_object.py", line 1346, in save_object
File "T:\InGame\Gameplay\Scripts\Server\objects\script_object.py", line 2563, in save_object
File "T:\InGame\Gameplay\Scripts\Core\caches.py", line 169, in wrapper
File "T:\InGame\Gameplay\Scripts\Server\objects\script_object.py", line 2572, in get_attribute_save_data
File "T:\InGame\Gameplay\Scripts\Server\objects\components\__init__.py", line 98, in wrapped_method
File "T:\InGame\Gameplay\Scripts\Server\objects\components\crafting_component.py", line 705, in save
File "T:\InGame\Gameplay\Scripts\Server\objects\components\spoilable_object_mixin.py", line 106, in spoilable_pre_save
File "T:\InGame\Gameplay\Scripts\Server\objects\components\__init__.py", line 470, in exported_func
File "T:\InGame\Gameplay\Scripts\Server\objects\components\tooltip_component.py", line 1029, in update_tooltip_field
File "T:\InGame\Gameplay\Scripts\Server\objects\components\tooltip_component.py", line 723, in update_object_tooltip
File "T:\InGame\Gameplay\Scripts\Server\objects\client_object_mixin.py", line 1763, in get_mark_up_values
File "T:\InGame\Gameplay\Scripts\Server\small_business\light_retail_surface_component.py", line 198, in get_mark_up_values_for_item
AttributeError: 'NoneType' object has no attribute 'get_value'rtim=0
Client Session Time: 47.88
Num Save Errors: 0
Num Load Errors: 0
Current Game State: 0x96d01090
LoadingScreenActiveFlag: 1
Origin Version: 13,566,0,6079
Modded: False
SystemInfo: Windows 11 10.0.26100 GPU: NVIDIA GeForce RTX 3050 Ti Laptop GPU 32.0.15.7270, GUID: C42BB5F6-9FB4-11EF-984E-B45CECEBCF08
</desyncdata>
</report>
Report 2: Build/Buy Placement Failure
<report>
<version>2</version>
<sessionid>ba05b2e926977adc68e4e7f5</sessionid>
<type>desync</type>
<sku>ea.maxis.sims4_64.15.pc</sku>
<createtime>2025-10-07 03:43:48</createtime>
<buildsignature>Local.Unknown.Unknown.1.118.257.1020-1.300.000.223.Release</buildsignature>
<categoryid>light_retail_surface_component.py:198</categoryid>
<desyncid>ba05b2e926977adc68e4e7f5</desyncid>
<systemconfig/>
<screenshot/>
<desyncdata>Exception occurred while attempting to populate a repeated field: (AttributeError: 'NoneType' object has no attribute 'get_value')
Traceback (most recent call last):
File "T:\InGame\Gameplay\Scripts\Core\sims4\utils.py", line 179, in wrapper
File "T:\InGame\Gameplay\Scripts\Server\build_buy.py", line 1348, in c_api_buildbuy_get_save_object_data
File "T:\InGame\Gameplay\Scripts\Server\objects\game_object.py", line 1346, in save_object
File "T:\InGame\Gameplay\Scripts\Server\objects\script_object.py", line 2563, in save_object
File "T:\InGame\Gameplay\Scripts\Core\caches.py", line 169, in wrapper
File "T:\InGame\Gameplay\Scripts\Server\objects\script_object.py", line 2572, in get_attribute_save_data
File "T:\InGame\Gameplay\Scripts\Server\objects\components\__init__.py", line 98, in wrapped_method
File "T:\InGame\Gameplay\Scripts\Server\objects\components\crafting_component.py", line 705, in save
File "T:\InGame\Gameplay\Scripts\Server\objects\components\spoilable_object_mixin.py", line 106, in spoilable_pre_save
File "T:\InGame\Gameplay\Scripts\Server\objects\components\__init__.py", line 470, in exported_func
File "T:\InGame\Gameplay\Scripts\Server\objects\components\tooltip_component.py", line 1029, in update_tooltip_field
File "T:\InGame\Gameplay\Scripts\Server\objects\components\tooltip_component.py", line 723, in update_object_tooltip
File "T:\InGame\Gameplay\Scripts\Server\objects\client_object_mixin.py", line 1763, in get_mark_up_values
File "T:\InGame\Gameplay\Scripts\Server\small_business\light_retail_surface_component.py", line 198, in get_mark_up_values_for_item
AttributeError: 'NoneType' object has no attribute 'get_value'rtim=0
Client Session Time: 47.88
Num Save Errors: 0
Num Load Errors: 0
Current Game State: 0x96d01090
LoadingScreenActiveFlag: 1
Origin Version: 13,566,0,6079
Modded: False
SystemInfo: Windows 11 10.0.26100 GPU: NVIDIA GeForce RTX 3050 Ti Laptop GPU 32.0.15.7270, GUID: C42BB5F6-9FB4-11EF-984E-B45CECEBCF08
</desyncdata>
</report>
Report 3: Object Cleanup Failure
<report>
<version>2</version>
<sessionid>ba05b2e926977adc68e4e7f5</sessionid>
<type>desync</type>
<sku>ea.maxis.sims4_64.15.pc</sku>
<createtime>2025-10-07 03:43:48</createtime>
<buildsignature>Local.Unknown.Unknown.1.118.257.1020-1.300.000.223.Release</buildsignature>
<categoryid>light_retail_surface_component.py:198</categoryid>
<desyncid>ba05b2e926977adc68e4e7f5</desyncid>
<systemconfig/>
<screenshot/>
<desyncdata>Exception thrown while calling remove on object_Food_PlateFork_Multi:0x03771566f3ef767c (AttributeError: 'NoneType' object has no attribute 'get_value')
Traceback (most recent call last):
File "T:\InGame\Gameplay\Scripts\Core\sims4\utils.py", line 179, in wrapper
File "T:\InGame\Gameplay\Scripts\Server\objects\system.py", line 244, in c_api_destroy_object
File "T:\InGame\Gameplay\Scripts\Server\objects\script_object.py", line 984, in destroy
File "T:\InGame\Gameplay\Scripts\Server\objects\base_object.py", line 448, in destroy
File "T:\InGame\Gameplay\Scripts\Server\services\reset_and_delete_service.py", line 297, in trigger_destroy
File "T:\InGame\Gameplay\Scripts\Server\services\reset_and_delete_service.py", line 312, in trigger_reset
File "T:\InGame\Gameplay\Scripts\Server\services\reset_and_delete_service.py", line 438, in start_processing
File "T:\InGame\Gameplay\Scripts\Server\services\reset_and_delete_service.py", line 462, in _process
File "T:\InGame\Gameplay\Scripts\Server\services\reset_and_delete_service.py", line 578, in _process_one_record
File "T:\InGame\Gameplay\Scripts\Server\objects\base_object.py", line 412, in on_reset_destroy
File "T:\InGame\Gameplay\Scripts\Server\objects\object_manager.py", line 742, in remove
File "T:\InGame\Gameplay\Scripts\Server\objects\object_manager.py", line 166, in remove
File "T:\InGame\Gameplay\Scripts\Server\indexed_manager.py", line 289, in remove
File "T:\InGame\Gameplay\Scripts\Server\indexed_manager.py", line 343, in call_on_remove
File "T:\InGame\Gameplay\Scripts\Server\objects\game_object.py", line 1039, in on_remove
File "T:\InGame\Gameplay\Scripts\Server\objects\components\__init__.py", line 98, in wrapped_method
File "T:\InGame\Gameplay\Scripts\Server\objects\components\crafting_component.py", line 133, in on_remove
File "T:\InGame\Gameplay\Scripts\Server\objects\components\crafting_component.py", line 421, in _remove_hovertip
File "T:\InGame\Gameplay\Scripts\Server\objects\components\crafting_component.py", line 386, in _remove_recipe_name_from_hovertip
File "T:\InGame\Gameplay\Scripts\Server\objects\components\__init__.py", line 470, in exported_func
File "T:\InGame\Gameplay\Scripts\Server\objects\components\tooltip_component.py", line 1020, in update_tooltip_field
File "T:\InGame\Gameplay\Scripts\Server\objects\components\tooltip_component.py", line 723, in update_object_tooltip
File "T:\InGame\Gameplay\Scripts\Server\objects\client_object_mixin.py", line 1763, in get_mark_up_values
File "T:\InGame\Gameplay\Scripts\Server\small_business\light_retail_surface_component.py", line 198, in get_mark_up_values_for_item
AttributeError: 'NoneType' object has no attribute 'get_value'rtim=0
Client Session Time: 47.88
Num Save Errors: 0
Num Load Errors: 0
Current Game State: 0x96d01090
LoadingScreenActiveFlag: 1
Origin Version: 13,566,0,6079
Modded: False
SystemInfo: Windows 11 10.0.26100 GPU: NVIDIA GeForce RTX 3050 Ti Laptop GPU 32.0.15.7270, GUID: C42BB5F6-9FB4-11EF-984E-B45CECEBCF08
</desyncdata>
</report>