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

Make logging thread-safe #1002

Closed
TrademarkTM opened this issue Dec 6, 2017 · 4 comments
Closed

Make logging thread-safe #1002

TrademarkTM opened this issue Dec 6, 2017 · 4 comments
Labels
completed The issue has been fully resolved and the change will be in the next Skript update. enhancement Feature request, an issue about something that could be improved, or a PR improving something. priority: lowest "Nice to have" updates that are not required (tiny low impact bug fixes or QoL enhancements).

Comments

@TrademarkTM
Copy link

TrademarkTM commented Dec 6, 2017

I just came here to report this little bug that happened to me to the first time, when starting the server:
https://hastebin.com/efehareqer.md

After rebooting, I saw this message:

[18:59:30 ERROR]: [Skript] 1 log handler was not stopped properly! (at ch.njol.skript.lang.SkriptParser.parse_i(SkriptParser.java:1488)) [if you're a server admin and you see this message please file a bug report at https://github.com/bensku/skript/issues if there is not already one]

The errors magically 'fixed' in the second start.

Well, the message said to report this, so I did.
Thanks again.

@bensku
Copy link
Member

bensku commented Dec 7, 2017

Might be related to skript-yaml.

@TheBentoBox
Copy link
Member

Can anyone else reproduce this? I've never seen this before and skript-yaml is appearing in some of the stack traces, so I'd be inclined to agree with bensku. If it was just a one-off error and nobody else is encountering it then this should be closed.

@Sashie
Copy link
Contributor

Sashie commented Dec 7, 2017

ive seen this
[18:59:30 ERROR]: [Skript] 1 log handler was not stopped properly! (at ch.njol.skript.lang.SkriptParser.parse_i(SkriptParser.java:1488)) [if you're a server admin and you see this message please file a bug report at https://github.com/bensku/skript/issues if there is not already one]
but only on version dev25 not the latest version

@Sashie
Copy link
Contributor

Sashie commented Dec 7, 2017

I have to head to work now but what i've found so far leads me to believe that its the AsyncEffect class, whether i use the one from my addon or the one from skript
tracing the error all the way back to
https://github.com/bensku/Skript/blob/83330d720a43a0139c4599804721ed989cf61235/src/main/java/ch/njol/skript/log/HandlerList.java#L32
the issue thats happening is that the LinkedList is not syncronized so when using an AsyncEffect it can sometimes cause this issue.

@bensku bensku changed the title Random log error and NPE Make logging thread-safe Dec 13, 2017
@bensku bensku added the enhancement Feature request, an issue about something that could be improved, or a PR improving something. label Dec 13, 2017
@Snow-Pyon Snow-Pyon added the priority: lowest "Nice to have" updates that are not required (tiny low impact bug fixes or QoL enhancements). label Feb 11, 2018
@TPGamesNL TPGamesNL added the PR available Issues which have a yet-to-be merged PR resolving it label Mar 23, 2021
@TPGamesNL TPGamesNL added completed The issue has been fully resolved and the change will be in the next Skript update. and removed PR available Issues which have a yet-to-be merged PR resolving it labels May 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
completed The issue has been fully resolved and the change will be in the next Skript update. enhancement Feature request, an issue about something that could be improved, or a PR improving something. priority: lowest "Nice to have" updates that are not required (tiny low impact bug fixes or QoL enhancements).
Projects
None yet
Development

No branches or pull requests

7 participants