Chat Replacement Processing Exception #5


  • Defect
  • Accepted
Open
Assigned to tustin2121
  • _ForgeUser9390828 created this issue Sep 26, 2012

    Not sure what causes it, but once in a while I would check server logs and would see this exception:

    22:11:32 [SEVERE] [Commander] An exception was caught during chat replacement processing! Chat passed through.
    java.lang.IllegalArgumentException: Illegal group reference
            at java.util.regex.Matcher.appendReplacement(Matcher.java:808)
            at org.digiplex.bukkitplugin.commander.module.PlayerChatModule.onPlayerChat(PlayerChatModule.java:78)
            at sun.reflect.GeneratedMethodAccessor191.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
            at java.lang.reflect.Method.invoke(Method.java:601)
            at org.bukkit.plugin.java.JavaPluginLoader$1.execute(JavaPluginLoader.java:330)
            at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:62)
            at org.bukkit.plugin.SimplePluginManager.fireEvent(SimplePluginManager.java:477)
            at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:459)
            at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:830)
            at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:807)
            at net.minecraft.server.Packet3Chat.handle(Packet3Chat.java:44)
            at net.minecraft.server.NetworkManager.i(NetworkManager.java:216)
            at net.minecraft.server.NetworkManager.c(NetworkManager.java:331)
            at net.minecraft.server.NetworkReaderThread.run(SourceFile:93)

  • _ForgeUser9390828 added the tags New Defect Sep 26, 2012
  • Tustin2121 posted a comment Sep 27, 2012

    Need more information: What version are you using? See if you can reproduce the error message. What replacement causes this? Are you using a dollar sign ($) anywhere in the replacement?

  • Tustin2121 removed a tag New Sep 27, 2012
  • Tustin2121 added a tag Waiting Sep 27, 2012
  • _ForgeUser9390828 posted a comment Sep 30, 2012

    @tustin2121: Go

    Actually, I am using a dollar sign in one of the replacements, I'll change that and see if it still throws the exception.

  • _ForgeUser9390828 removed a tag Waiting Sep 30, 2012
  • _ForgeUser9390828 added a tag Replied Sep 30, 2012
  • Tustin2121 posted a comment Sep 30, 2012

    You will need to put a backslash (\) in front of the dollar sign (\$) to escape the back reference. I will make the error message more user-friendly and/or have the pre-regex replacement code catch an arbitrary character after a dollar sign.

  • Tustin2121 removed a tag Replied Sep 30, 2012
  • Tustin2121 added a tag Accepted Sep 30, 2012

To post a comment, please login or register a new account.