skymp icon indicating copy to clipboard operation
skymp copied to clipboard

[SP Bug]: containerChanged event is triggered an uncountable number of times when leveling up

Open Vorganger opened this issue 1 year ago • 4 comments

Severity

Major. A crucial error that indicates a deviation from business logic or disrupts the program, but doesn't have a vital impact on the app.

Priority

Medium. Anything that negatively affects the user experience.

Description

I noticed that the containerChange event is triggered an uncountable number of times when leveling up.. I noticed this when I ran a printConsole("Hello"), and found out that the console was filled with "Hello". Scrolling up seems to not show whatever came before leveling up. Also, since this event is triggered a lot, there is a minor stutter when leveling up. This is especially noticeable if there is more code (more operations) in that event

I worked around this by returning if the "LevelUp Menu" is opened, but that of course doesn't really help the issue itself. This will still run that check an uncountable number of times and still have a minor stutter

OS

Windows

OS version

10

Skyrim version

1.5.97

SKSE version

2.0.20

client commit''s hash

None

server commit''s hash

None

Videocard model

RTX 2060

Steps to reproduce

Have a Skyrim Platform plugin that has some code in a "containerChange" with printConsole("Something") and level up your character in the level up menu. This will run the containerChange event an uncountable number of times

Expected result

Container change does not run at all when leveling up

Actual result

Container change runs an uncountable number of times and produces a stutter (varying from user to user)

Vorganger avatar Feb 08 '23 10:02 Vorganger