TownyAdvanced / Towny

Towny Advanced Minecraft plugin for Bukkit/Spigot.
https://townyadvanced.github.io
Other
521 stars 354 forks source link

/plot set name - Incorrect string value Crashes the server #2243

Closed LlmDl closed 9 years ago

LlmDl commented 9 years ago

Originally reported on Google Code with ID 2221

What steps will reproduce the problem?
1. In a plot do: /plot set name Arena_PvP_Malbork_ ♪♫

What do you see instead? :

[16:25:00] [Craft Scheduler Thread - 664/WARN]: [Towny] Error: SQL: Incorrect string
value: '\xE2\x99\xAA\xE2\x99\xAB' for column 'name' at row 1 --> com.mysql.jdbc.JDBC4PreparedStatement@638956a8:
REPLACE INTO CIUDADES_TOWNBLOCKS (`price`, `outpost`, `name`, `permissions`, `locked`,
`town`, `type`, `z`, `world`, `changed`, `resident`, `x`) VALUES ('-1.0','0','Arena
PvP Malbork ♪♫','pvp','0','Malbork','0','-218','Ciudades','1','','212')
[16:25:00] [Craft Scheduler Thread - 644/WARN]: [Towny] Error: SQL: Incorrect string
value: '\xE2\x99\xAA\xE2\x99\xAB' for column 'name' at row 1 --> com.mysql.jdbc.JDBC4PreparedStatement@23dfb8a0:
REPLACE INTO CIUDADES_TOWNBLOCKS (`price`, `outpost`, `name`, `permissions`, `locked`,
`town`, `type`, `z`, `world`, `changed`, `resident`, `x`) VALUES ('-1.0','0','Arena
PvP Malbork ♪♫','pvp','0','Malbork','0','-217','Ciudades','1','','213')
[16:25:00] [Craft Scheduler Thread - 644/WARN]: [Towny] Error: SQL: Incorrect string
value: '\xE2\x99\xAA\xE2\x99\xAB' for column 'name' at row 1 --> com.mysql.jdbc.JDBC4PreparedStatement@74f14fd8:
REPLACE INTO CIUDADES_TOWNBLOCKS (`price`, `outpost`, `name`, `permissions`, `locked`,
`town`, `type`, `z`, `world`, `changed`, `resident`, `x`) VALUES ('-1.0','0','Arena
PvP Malbork ♪♫','pvp','0','Malbork','0','-217','Ciudades','1','','213')
[16:25:00] [Craft Scheduler Thread - 657/WARN]: [Towny] Error: SQL: Incorrect string
value: '\xE2\x99\xAA\xE2\x99\xAB' for column 'name' at row 1 --> com.mysql.jdbc.JDBC4PreparedStatement@120e382a:
REPLACE INTO CIUDADES_TOWNBLOCKS (`price`, `outpost`, `name`, `permissions`, `locked`,
`town`, `type`, `z`, `world`, `changed`, `resident`, `x`) VALUES ('-1.0','0','Arena
PvP Malbork ♪♫','pvp','0','Malbork','0','-217','Ciudades','1','','212')
[16:25:00] [Craft Scheduler Thread - 644/WARN]: [Towny] Error: SQL: Incorrect string
value: '\xE2\x99\xAA\xE2\x99\xAB' for column 'name' at row 1 --> com.mysql.jdbc.JDBC4PreparedStatement@eb129e3:
REPLACE INTO CIUDADES_TOWNBLOCKS (`price`, `outpost`, `name`, `permissions`, `locked`,
`town`, `type`, `z`, `world`, `changed`, `resident`, `x`) VALUES ('-1.0','0','Arena
PvP Malbork ♪♫','pvp','0','Malbork','0','-217','Ciudades','1','','213')

[...] x10000000times

Memory full and crash.

Reported by kennosis on 2015-01-31 15:38:29

LlmDl commented 9 years ago
The command doesn't support musical notes. Stick to alphanumeric symbols.

Reported by LlmDlio on 2015-01-31 16:59:00

LlmDl commented 9 years ago
fix it, because random people are joining the servers to crash them.

Reported by kennosis on 2015-01-31 23:10:32

LlmDl commented 9 years ago
Having same issue. This is a *critical* bug in Towny. One command can crash a server
and completely deplete it of disk space. Yesterday my server got a 7GB log file thanks
to Towny throwing this error. What's it going to take to get a fix?

Reported by zane.kt.woodard on 2015-02-28 20:43:14

LlmDl commented 9 years ago
@ zane.kt.woodard

https://dl.dropboxusercontent.com/u/31426972/Towny.jar

Could you please test using this build. Let me know if it works or not.

Reported by LlmDlio on 2015-02-28 21:16:13

LlmDl commented 9 years ago

Reported by LlmDlio on 2015-02-28 21:21:50

LlmDl commented 9 years ago
Updated to that jar, still have a similar issue. Millions of SQL errors:

[23:46:56] [Craft Scheduler Thread - 1993/WARN]: [Towny] Error: SQL: Data truncation:
Out of range value for column 'price' at row 1 --> com.mysql.jdbc.JDBC4PreparedStatement@6c2c342a:
REPLACE INTO T_TOWNBLOCKS (`price`, `outpost`, `name`, `permissions`, `locked`, `town`,
`type`, `z`, `world`, `changed`, `resident`, `x`) VALUES ('1.0E55','0','','','0','Momentum','0','34','world','0','AT41','-38')
[23:46:56] [Craft Scheduler Thread - 1976/WARN]: [Towny] Error: SQL: Data truncation:
Out of range value for column 'price' at row 1 --> com.mysql.jdbc.JDBC4PreparedStatement@4a14e8e1:
REPLACE INTO T_TOWNBLOCKS (`price`, `outpost`, `name`, `permissions`, `locked`, `town`,
`type`, `z`, `world`, `changed`, `resident`, `x`) VALUES ('1.0E91','0','','','0','Momentum','0','34','world','0','AT41','-38')
[23:46:56] [Craft Scheduler Thread - 1993/WARN]: [Towny] Error: SQL: Data truncation:
Out of range value for column 'price' at row 1 --> com.mysql.jdbc.JDBC4PreparedStatement@22c531c6:
REPLACE INTO T_TOWNBLOCKS (`price`, `outpost`, `name`, `permissions`, `locked`, `town`,
`type`, `z`, `world`, `changed`, `resident`, `x`) VALUES ('1.0E55','0','','','0','Momentum','0','34','world','0','AT41','-38')

And my towny version:
[01:04:24 INFO]: Towny version 0.89.2.3

Reported by zane.kt.woodard on 2015-03-02 05:56:48

LlmDl commented 9 years ago
That jar wont fix any existing mysql errors. Did you fix the database first?

Reported by LlmDlio on 2015-03-02 16:07:02

LlmDl commented 9 years ago
If it was fixed, what command did you use?

Reported by LlmDlio on 2015-03-02 16:07:37

LlmDl commented 9 years ago
@ zane.kt.woodard

I just noticed you're not testing /plot set name NAME, your problem is the plot price
is being set too high.
https://dl.dropboxusercontent.com/u/31426972/Towny.jar

Please test that build which has plot fs prices capped at 1000000.

Reported by LlmDlio on 2015-03-02 16:49:29

LlmDl commented 9 years ago
really fixed in 0.89.2.8

Reported by LlmDlio on 2015-04-09 17:27:17