Betonquest: Conversations don't stop if Player disconnects

Created on 22 Feb 2016  路  21Comments  路  Source: BetonQuest/BetonQuest

I'm using Version 1.8.2 of your plugin on my private server and I have the following issue:

When a player disconnects form the server because of a bad internet connection or if his minecraft crashes and is in a conversation it seems that the conversation dosen't stop.

If he reconnects afther this he isn't able to talk to any NPC's, if he right klicks on them nothing happens and the Debug-log shows the message:
[21.02.2016 16:32:52] DEBUG: Player LaCore is in conversation right now, returning.

If he wants to go away he can't, becaus the stop: option of the NPC is set to 'true'
But he also is not able to end the conversation because the conversation isn't shown in chat.
If he randomly types in a number he can walk away, as if stop wasn't active, but he still can't talk to NPC's.

Also if I restart the server and use /q purge LaCore he still can't talk to the NPC.

The conversation for the NPC works fine for all oter players which did not disconnect during a conversation.

This issue also happens if you use /q reload, while a player is in a conversation.

Sorry if my english isn't the best, I'm not a native english speeker...
I hope you can understand my problem anyway.

Bug Confirmed

Most helpful comment

Sorry for that delay, I sometimes need to hide from the world for a few weeks.

All 21 comments

I'll check this out.

Same problem for me.
Some players try to connect to the server but are stuck with the NPC either if they reconnect.
The only one way to go away from the NPC is to type '1' or '2' ... in the chatbox.

Sometime when they walk and go near a npc, this one make them stuck without any dialogue.
They are just stuck and have to press '1', '2', ...

Thanks for helping.

Same problem for me also with 1.8.2. I tried everything I could think of to force terminate the conversation, but it will never actually end the conversation.

I tried purging my data, disconnect and logging back in, reloading plugin, restarting server, and all possible combinations of that as far as I can tell, and nothing really ends the conversation correctly. I was able to get myself out of the conversation so I could walk freely again (by typing a number like the above posts describe), but the plugin would have crashed on an error by then and would not let me talk again, and with a relog it would auto start the conversation immediately.

Error log:

[14:15:02] [Craft Scheduler Thread - 4/WARN]: Exception in thread "Craft Scheduler Thread - 4"
[14:15:02] [Craft Scheduler Thread - 4/WARN]: org.apache.commons.lang.UnhandledException: Plugin BetonQuest v1.8.2 generated an exception while executing task 808
at org.bukkit.craftbukkit.v1_8_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:56)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at pl.betoncraft.betonquest.BetonQuest.resolveVariables(BetonQuest.java:971)
at pl.betoncraft.betonquest.conversation.Conversation.printNPCText(Conversation.java:204)
at pl.betoncraft.betonquest.conversation.Conversation.access$1000(Conversation.java:52)
at pl.betoncraft.betonquest.conversation.Conversation$Starter.run(Conversation.java:470)
at org.bukkit.craftbukkit.v1_8_R2.scheduler.CraftTask.run(CraftTask.java:71)
at org.bukkit.craftbukkit.v1_8_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:53)
... 3 more

Hi Guys.

Same problem for me. Some players are stuck until they type "1" or "2" or ...another reply accepted by the PNJ.
Any news about this bug ?

Thank you in advance.

Not yet, I had a break from programming, I'm starting to work on it tomorrow.

Have you been able to look into this yet @Co0sh ?

I need to somehow figure out how to get 400 of new players on my server out of their conversation, and I was thinking maybe about a command that could delete their active conversation, so it would think they aren't in any anymore. Of cource the active conversation is not quest state and is not included in purge's domain.

For now just set the stop option in that conversation to "false", it should free them.

It's what i did for all conversation :-)

status?

After several tests and a lot of thinking I was able to further reduce the steps to reproduce.
Following these steps will get you stuck in a conversation:

1) Start a conversation that doesn't immediately end and requires an answer
2) Logout of the server and back in
-> At this point the conversation will keep forcing you back as you walk away the max npc distance
3) Type the number of the anwer to the conversation you started, that would otherwise end that conversation
-> Now the conversation functionally ended, and you can walk freely once again. However it still thinks there is a conversation going on in some way, observed by not being able to start any kind of conversation beyond this point. Nothing can get you out of that besides a database reset.

Alright, in 0f4c8b790a9db0106a783f676b7ff249adec80de conversations are purged with _/q purge_. I'll try to fix the bug now.

Good to have you back @Co0sh !

:smiley:

Thanks a lot for this, now if it does happen we have a safe option to fix the player without taking the server offline. I'm sure you can find and fix the bug Co0sh :)

Oh, I forgot to also remove the conversation for online players...

The problem here looks simple, BetonQuest while resuming 'stop' conversation tries to load conversation.option option instead of option. It doesn't exist, so there is an error and the conversation doesn't show up.

The real question here is: why conversation.option? Still tracking it down.

Stop option will now work correctly. It should work even for players currently stuck in the broken conversations, but I didn't test that.

You're the man! Thanks a lot, I can sleep once more :P

Sorry for that delay, I sometimes need to hide from the world for a few weeks.

So, when is there going to be a 1.8.3 release, including this high priority bugfix? :innocent:

As soon as I finish my university stuff for this week and fix other bugs ^^

"As soon as I finish my university stuff..."
-I hope you are better at finishing university stuff than me because if I would say this v1.8.3 would never get released. 馃槈

Was this page helpful?
0 / 5 - 0 ratings

Related issues

PsychoLynx picture PsychoLynx  路  3Comments

survetman picture survetman  路  6Comments

Rouchesta picture Rouchesta  路  5Comments

Namnodorel picture Namnodorel  路  6Comments

MWFIAE picture MWFIAE  路  5Comments