bergerhealer / BKCommonLib

An extensive library used in bergerhealer's plugins
Other
181 stars 45 forks source link

Reload causes a crash #41

Closed Etienne-Wattebled closed 7 years ago

Etienne-Wattebled commented 7 years ago
BkCommonLib version: All
Spigot version: 1.11.2

Problem or bug:

When a reload is done, the BkCommonLib doesn't work and appears to be in red when a /plugin is done, we need to restart the server.

Expected behaviour:

BkCommonLib should stay in green when a /reload and a /plugins is done and should continue to work.

Steps to reproduce:

Just reload the server and do /plugins

bergerkiller commented 7 years ago

Are you using MyWorlds? If that is the case, this build may fix it:

https://ci.mg-dev.eu/job/MyWorlds/14/

Otherwise can you post the error youre getting? I don't get any errors on /reload on my test server right now.

Etienne-Wattebled commented 7 years ago

Hello,

I don't use MyWorlds. You can see logs here:

http://textup.fr/219402v0

Thanks

bergerkiller commented 7 years ago

I noticed this in the logs: Ambiguous plugin name BKCommonLib' for filesplugins/BKCommonLib.jar' and plugins/BKCommonLib-1.12.1-v1.jar' inplugins'

Can you delete the duplicate BKCommonLib jar file and see if that fixes things? I'm not sure if it will influence it, but resource loading bugs have happened before because of this.

Since I plan on pushing a new version today or tomorrow, can you check if the latest development build suffers the same issues? https://ci.mg-dev.eu/job/BKCommonLib/184/

I cannot reproduce it here. The error log indicates a potential bug in protocollib causing this, however Im using the exact same version of ProtocolLib. It is difficult for me to figure out what the real cause is.

bergerkiller commented 7 years ago

I did spot a potential bug with the tab controller packet listener. It was not un-registered on shutdown of BKCommonLib. I think this does not matter much (because protocollib disables too and will wipe all listeners), but just in case, a fix. https://ci.mg-dev.eu/job/BKCommonLib/185/

Etienne-Wattebled commented 7 years ago

Hello,

I deleted the duplicate. Sorry, I did a lot of tests but the problem is not here. http://textup.fr/219614Sj

With 184: http://textup.fr/219616AL

With 185: http://textup.fr/219620H8

Thanks :)

bergerkiller commented 7 years ago

I could reproduce the issue on 1.11.2 myself. After updating ProtocolLib to the latest development build, the issue appears resolved. Can you check yourself whether reloading works correctly with the latest build of ProtocolLib? http://ci.dmulloy2.net/job/ProtocolLib/386/

It is probably a bug that has been fixed in ProtocolLib.

I do spot some strange things happening in your 185 log related to it being unable to read the init declaration file resulting in missing declaration, which might mean some strange corruption going on with the BKCommonLib jar file. If that continues to occur, let me know.

Etienne-Wattebled commented 7 years ago

Hello,

I reload 1 time => it works I reload 2 times or more => it doesn't work.

This build of ProcolLib resolves partially the issue.

bergerkiller commented 7 years ago

I have contacted dmulloy2* with these errors, since they don't appear to originate from BKCommonLib. After disabling all listeners the error simply moved elsewhere, when sending packets instead. Hopefully he has advice for fixing it, or fixes it himself.

If you don't have other plugins that use ProtocolLib, you could remove it for now and depend on BKCommonLib's own packet hooks.

Etienne-Wattebled commented 7 years ago

Hello,

So, there is a real bug ? I am don't have a mental problem ? Haha (which it doesn't come from you) Does BkCommonLib continue to need ProtocolLib ? I am french I don't understand everything you say me but if I can understand I can use Bk without ProtocolLib?

Thanks

bergerkiller commented 7 years ago

Yes you can use BKCommonLib without protocollib. Protocollib is only needed if you have more plugins (other than BKCommonLIb) that play with the network protocol.

bergerkiller commented 7 years ago

Closing this issue as it is caused by ProtocolLib. If you want to reload the server with ProtocolLib running, do so without any players logged in. That is, kick everyone off the server or tell everyone to leave, then use /reload in the server terminal. I have added a warning message for this. https://github.com/bergerhealer/BKCommonLib/commit/305b813aee8a02896605129aa7c30e0b33e1c25d