2025-07-21 05:41 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0002403Spring engineGeneralpublic2012-03-31 11:49
ReporterGoogle_Frog 
Assigned ToKloot 
PrioritynormalSeverityminorReproducibilitysometimes
StatusresolvedResolutionduplicate 
Product Version0.82.7.1 
Target VersionFixed in Version 
Summary0002403: Error in lua unit script
DescriptionThere is a crash in Sleep in a unit lua script, the thread is missing. This often occurs at the end of the firing loop for armstilleto_laser in
version 0.8.4.4 (r2258) of ZK.
http://planet-wars.eu/ss/SS-20110408213500.jpg (The bit after scripts/bombers is irrelevant, already fixed bug)
Additional Informationfunction Spring.UnitScript.Sleep(milliseconds)
    local n = floor(milliseconds / 33)
    if (n <= 0) then n = 1 end
    n = n + sp_GetGameFrame()
    local zzz = sleepers[n]
    if (not zzz) then
        zzz = {}
        sleepers[n] = zzz
    end
    local thread = activeUnit.threads[co_running() or error("not in a thread", 2)]
    zzz[#zzz+1] = thread
    thread.container = zzz
    -- yield the running thread:
    -- it will be resumed in frame #n (in gadget:GameFrame).
    co_yield()
end

Crash on line thread.container = zzz
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files

-Relationships
+Relationships

-Notes

~0008547

Kloot (developer)

fixed and duplicate of 2565
+Notes

-Issue History
Date Modified Username Field Change
2011-04-14 16:25 Google_Frog New Issue
2012-03-31 11:49 Kloot Note Added: 0008547
2012-03-31 11:49 Kloot Status new => resolved
2012-03-31 11:49 Kloot Resolution open => duplicate
2012-03-31 11:49 Kloot Assigned To => Kloot
+Issue History