View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0002267 | Spring engine | Unit Scripting | public | 2010-12-21 07:50 | 2011-02-07 23:17 | ||||
Reporter | user744 | ||||||||
Assigned To | Kloot | ||||||||
Priority | normal | Severity | crash | Reproducibility | always | ||||
Status | resolved | Resolution | fixed | ||||||
Product Version | 0.82.6.1 | ||||||||
Target Version | Fixed in Version | 0.82.7+git | |||||||
Summary | 0002267: killing unit with AddUnitDamage in script.Create crashes on /give but not from factory | ||||||||
Description | if below script is used on a unit, spring.exe crashes when the unit is spawned with the /give command if made via a factory, spring does not crash. http://pastebin.ca/2025211 http://pastebin.ca/2025210 | ||||||||
Additional Information | function script.Create() Spring.Echo ("yo") Spring.AddUnitDamage (unitID, 9001) end function script.Deactivate() end function script.Killed(recentDamage, maxHealth) return 0 end | ||||||||
Tags | No tags attached. | ||||||||
Checked infolog.txt for Errors | |||||||||
Attached Files |
|
![]() |
|
2010-12-21 08:14 |
a slightly changed version: http://pastebin.ca/2025221 crashes even when build from factory. unit gets build but instead of destroying itself, it kills spring.exe http://pastebin.ca/2025219 Btw i use addunitdamage to avoid recursion warning http://springrts.com/phpbb/viewtopic.php?f=23&t=24728 |
Kloot (developer) 2010-12-21 16:15 Last edited: 2010-12-21 16:16 |
Neither of those scripts crashes master (build + base content from 375affbde3a71fc27430abd7ea94b6457a459399) through /give or through building the unit normally, please confirm this. |
abma (administrator) 2011-02-04 13:01 |
missing feedback :-/ |
2011-02-07 09:28 |
hey, sorry late answer had forgotten about this one.. I think the crash was actually due to a missing wreck 3dobject in the unitdef. That is now visible with Spring 0.82.7.1: [f=0000252] WARNING: could not load model "objects3d/bgenericwreckage.s3o" (missing file?) (0.82.7.1 gives that error in chat & and does not crash) I still have 0.81 installed so tested again and 0.81 does just crash at this point. So the reason why it worked from factory might have been because the unit was still a nanoframe when being killed and thus left no wreck. But with /give it was completed and then the missing wreck crashed it. Now why it only crashed on this unit and not on any other unit that also have entries for non-existing wrecks, i dont know. As I had already made a "non-crashing script version" and now know it was probally the wreck's fault, for me this issue is closed/resolved. In case someone wants to have a closer look still, here is the mod: http://www.file-upload.net/download-3195716/Brickcraft.sdd.zip.html 1) /give tpupgradewheels script = [[selfkill_bugged.lua]], 0.82: killing itself works, missing wreck message 0.81: crash 2) /give tpupgradequadcannon script = [[selfkill.lua]], 0.82: killing itself works, no error message 0.81: killing itself works, no error message infolog with using /give on both units 0.82: http://pastebin.com/B91dHvxa |
![]() |
|||
Date Modified | Username | Field | Change |
---|---|---|---|
2010-12-21 07:50 |
|
New Issue | |
2010-12-21 08:14 |
|
Note Added: 0006112 | |
2010-12-21 16:15 | Kloot | Note Added: 0006117 | |
2010-12-21 16:15 | Kloot | Status | new => feedback |
2010-12-21 16:16 | Kloot | Note Edited: 0006117 | |
2011-02-04 13:01 | abma | Note Added: 0006342 | |
2011-02-04 13:01 | abma | Status | feedback => resolved |
2011-02-04 13:01 | abma | Resolution | open => unable to reproduce |
2011-02-04 13:01 | abma | Assigned To | => abma |
2011-02-07 09:28 |
|
Note Added: 0006356 | |
2011-02-07 09:28 |
|
Status | resolved => assigned |
2011-02-07 09:28 |
|
Resolution | unable to reproduce => reopened |
2011-02-07 23:16 | Kloot | Status | assigned => resolved |
2011-02-07 23:16 | Kloot | Fixed in Version | => 0.82.7+git |
2011-02-07 23:16 | Kloot | Resolution | reopened => fixed |
2011-02-07 23:17 | Kloot | Assigned To | abma => Kloot |
2011-02-07 23:17 | Kloot | Status | resolved => assigned |
2011-02-07 23:17 | Kloot | Resolution | fixed => reopened |
2011-02-07 23:17 | Kloot | Status | assigned => resolved |
2011-02-07 23:17 | Kloot | Resolution | reopened => fixed |