View Single Post
04-04-12, 01:32 AM   #5
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
This wasn't too difficult to reproduce.

It appears to be caused by calling GetTrainerServiceCost on an index out of bounds. Simply typing /run GetTrainerServiceCost(1) while not talking to a trainer will immediately crash the client.

It probably isn't the only function that does it, but I can tell you it definitely does.

edit: Upon closer inspection, calling GetNumTrainerServices() after talking to a trainer continues to return the number of items that trainer had, even if you aren't talking to them. This could easily lead to an addon calling GetTrainerServiceCost while you aren't interacting with a trainer.

A workaround would be calling a function that fails gracefully like GetTrainerServiceInfo on the index and only call GetTrainerServiceCost if it succeeds.

Last edited by semlar : 04-04-12 at 01:55 AM.
  Reply With Quote