03-16-2017, 12:50 AM
@NiLSPACE Added a call to collectgarbage, it doesn't print the log message on first time. After every additional call it prints the message.
Random Chitchat 2017
|
03-16-2017, 12:50 AM
@NiLSPACE Added a call to collectgarbage, it doesn't print the log message on first time. After every additional call it prints the message.
03-16-2017, 01:46 AM
Could you show your code?
03-16-2017, 01:49 AM
I started testing bound checking in cBlockArea. Here the small code:
Code: function Initialize(Plugin)
Could you try this?:
function CommandDoit(a_Split) do local area = cBlockArea() area:Create(500, 100, 100) for x = 0, 499 do for y = 0, 99 do for z = 0, 99 do area:SetBlockType(x, y, z, 1) end end end end collectgarbage() print("finished") return true end Thanks given by: Seadragon91
03-16-2017, 05:59 PM
@Seadragon91 In your code, when calling the collectgarbage() function, the area variable is still in scope so it is not collected yet. Upon the next call, the cBlockArea from the previous call is collected and the current one is still kept, and so on.
(Yes, garbage collection is difficult NiLSPACE's code fixes that by enclosing the inner code in yet another do .. end, which makes the area variable go out of scope before calling the collectgarbage() function, allowing it to be collected. Thanks given by: NiLSPACE , Seadragon91
03-21-2017, 11:49 PM
@xoft I see this in the travis builds from LuaThreadStress-testing. Is this a problem or can it be ignored?
Code: Invalidate: Inconsistent callback at 0x2abac4000990, has a CS but an invalid Ref. This should not happen
03-22-2017, 11:20 PM
That is indeed a problem, I'd need to look at that. But I can't seem to reproduce it on neither Win or Linux builds of mine.
03-23-2017, 04:24 PM
Do we have a thread about metadata for items? I think this could be also used for items like: firework rocket, firework star, books and for a few more.
03-25-2017, 06:43 AM
Thanks given by: Seadragon91 , sphinxc0re , xoft
|
« Next Oldest | Next Newest »
|