Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Holograms stay forever #385

Open
suunr opened this issue Sep 7, 2015 · 3 comments
Open

Holograms stay forever #385

suunr opened this issue Sep 7, 2015 · 3 comments

Comments

@suunr
Copy link
Contributor

suunr commented Sep 7, 2015

When the starfall chip exceeds CPU Quota while creating a hologram the hologram will stay forever there and there isn't an owner assigned to it (=you can't remove it).

@suunr suunr changed the title Holograms stay forever when Holograms stay forever Sep 7, 2015
@awilliamson
Copy link
Member

Ownership & CPPI stuff for holograms is currently pending #360.

To error 'during' creation should be incredibly rare. Tbh, something I've not really considered before. I know that holograms should clean up when a chip errors/is removed though.

@suunr suunr closed this as completed Sep 10, 2015
@awilliamson
Copy link
Member

This is still valid, please leave open.

@awilliamson awilliamson reopened this Sep 10, 2015
@Jazzelhawk
Copy link
Member

I was looking into this and created this script:

local function quotaCheck ( n )
    return ( quotaUsed() < quotaMax() * n ) and ( quotaAverage() < quotaMax() * n )
end

hook.add( "think", "test", function()
    local x = 0
    while quotaCheck( 0.96 ) do
        x = x + 1 
    end
    if quotaCheck( 0.97 ) and not quotaCheck( 0.96 ) then
        holograms.create( entities.self():getPos(), Angle(), "models/sprops/cuboids/height06/size_1/cube_6x6x6.mdl", Vector( 1, 1, 1 ) ) 
    end
end )

The chip sometimes quotas and the hologram doesn't get removed if it quotas when creating the hologram but most of the time the chip errors, the hologram doesn't get deleted and I get this in the console:

[ERROR] 

scripted_ents.Get failed!
Processor of Jazzelhawk errored: addons/starfall/lua/starfall/libs_sv/holograms.lua:318: attempt to call method 'SetScale' (a nil value)

Can anyone else confirm this? Before I was getting a different error where [ERROR] was and it was a stacktrace which started from a concommand and ended up getting to SF.Editor.runJS with a nil parameter. And I can't recreate that error. Confusing...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants