Skip to content

Exceptions in function loading aren't properly handled #8279

@Fusezion

Description

@Fusezion

Skript/Server Version

[01:25:33 INFO]: [Skript] Skript's aliases can be found here: https://github.com/SkriptLang/skript-aliases
[01:25:33 INFO]: [Skript] Skript's documentation can be found here: https://docs.skriptlang.org/
[01:25:33 INFO]: [Skript] Skript's tutorials can be found here: https://docs.skriptlang.org/tutorials
[01:25:33 INFO]: [Skript] Server Version: 1.21.8-60-29c8822 (MC: 1.21.8)
[01:25:33 INFO]: [Skript] Skript Version: 2.13.1 (skriptlang-github)
[01:25:33 INFO]: [Skript] Installed Skript Addons:
[01:25:33 INFO]: [Skript]  - oopsk v1.0-beta1 (https://github.com/sovdeeth/oopsk)
[01:25:33 INFO]: [Skript]  - skript-gui v1.3.2 (https://github.com/APickledWalrus/skript-gui)
[01:25:33 INFO]: [Skript]  - SkBee v3.13.1 (https://github.com/ShaneBeee/SkBee)
[01:25:33 INFO]: [Skript]  - SkBriggy v1.5.4 (https://github.com/ShaneBeee/SkBriggy)
[01:25:33 INFO]: [Skript]  - skript-yaml v1.7.2
[01:25:33 INFO]: [Skript]  - skript-reflect v2.6.1 (https://github.com/SkriptLang/skript-reflect)
[01:25:33 INFO]: [Skript]  - skript-placeholders v1.7.0 (https://github.com/APickledWalrus/skript-placeholders)
[01:25:33 INFO]: [Skript]  - skript-particle v1.3.2 (https://github.com/sovdeeth/skript-particle)
[01:25:33 INFO]: [Skript] Installed dependencies:
[01:25:33 INFO]: [Skript]  - Vault v2.4.9
[01:25:33 INFO]: [Skript]  - WorldGuard v7.0.14+2339-43997ec

Bug Description

When skript encounters an exception within a function the unregistration process is never handled. This leads to the function never properly unloading and preventing new changes from applying until the server is restarted or manually unregistered via reflect.

Expected Behavior

Skript to properly unregister any related functions when an exception occurs within it.

Steps to Reproduce

function bored():
  set {_x} to vector((1))
on load:
  bored()

Errors or Screenshots

Screenshot is me running it with a new function and then rerunning reload after the initial issue.
Image

Other

Using the debug effect cause exception doesn't appear to replicate this issue so I am unsure of its difference in handling there.

Agreement

  • I have read the guidelines above and affirm I am following them with this report.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn issue that needs to be fixed. Alternatively, a PR fixing an issue.functionsRelated to functionspriority: mediumIssues that are detrimental to user experience (prohibitive bugs or lack of useful implementation).

    Type

    No type

    Projects

    Status

    Planned Issues

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions