View Single Post
06/23/17, 07:56 AM   #1
silvereyes
 
silvereyes's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2015
Posts: 66
[notabug] Certain d() colored formatting causing game to crash

This isn't so much a feature request as a fix request for a strange bug that creeps up sometimes during addon development.

The d() system chat channel output function sometimes freezes the game - as if there's an infinite loop - if given specific strings with color formatting as input. The most simple form of the pattern that I could find is as follows:

Lua Code:
  1. d("|cFFFFFF|r<any character not a color code>|r")

The following all crash the game:
Lua Code:
  1. d("|cFFFFFF|r)|r")
  2. d("|cFFFFFF|rx|r")
  3. d("|cFFFFFF|r|r|r")

The following all work fine:
Lua Code:
  1. d("|cFFFFFF|r|r")
  2. d("|r)|r")
  3. d("|cFFFFFF|r|cFFFFFF|r")