Crash if SpyEffect.StolenTechIndex >= 32

Bug #896125 reported by FS-21
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ares
Fix Released
Medium
AlexB

Bug Description

If a spy go into a spyable building with the tag SpyEffect.StolenTechIndex with a value greater than 31 the game crash.

If is necessary I uploaded the crash dump file:
http://www.megaupload.com/?d=TONEX7BE

Revision history for this message
DCoder DCoder (dcoder1337) wrote :

That's right, the code only supports 32 indices... we should add a sanity check not to crash, but seriously, what could you possibly do with that many different stolen techs?

Revision history for this message
WoRmINaToR (worminator) wrote :

Secret hybrid faction made purely by mixing stolen techs from different factions? :P

Revision history for this message
FS-21 (jagarni1983) wrote :

To not have random numbers for different buildings of different sides I declared a default "rule" (this not mean that I'll use all the indexes):
; SpyEffect.StolenTechIndex=X0

AlexB (alexander-b)
Changed in ares:
assignee: nobody → AlexB (alexander-b)
AlexB (alexander-b)
Changed in ares:
milestone: none → 0.2-rc2
AlexB (alexander-b)
Changed in ares:
status: New → Fix Committed
Revision history for this message
Chanterier (speederyr) wrote :

FS' point is valid, I use a specific numbering method to make things easier to remember.

Until 31, there is EVA report 'Building infiltrated'.

Starting with 32, the EVA report is no more but there is no crash either.

Revision history for this message
AlexB (alexander-b) wrote :

That is a request to expand the feature by changing the underlying implementation. Maybe some coder wants to do that for a later version, but I want to get 0.2 out.

This issue is just about the crash because of a missing safeguard. The documentation will be updated to mention these limits. If an invalid index is used, the tag does not have any effect (like you described) and a developer warning is put in the debug log.

Thanks for confirming the crash is gone!

Changed in ares:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.