jackpoz / BotFarm

Application used to spawn WoW automated players compatible with 3.3.5a version only.
GNU General Public License v2.0
84 stars 68 forks source link

My BotFarm.exe crashes :( #23

Closed sout12 closed 9 years ago

sout12 commented 9 years ago

My Botfarm.exe crashes when i start it up. Here is link: What it says when it crashes then it doesn't respond sadsa That is what it says when it crashes :(

ghost commented 9 years ago

@sout12 : make BotFarm.exe use Windows Administrator permissions via the Compatibility tab. I got a similar error message before I did that, because I use the C:\Program Files\TrinityCore\ folder:

Unhandled Exception: System.InvalidOperationException: There was an error generating the XML document. ---> System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationWriterList1.Write3_ArrayOfBotInfo(Object o)
   --- End of inner exception stack trace ---
   at System.Xml.Serialization.XmlSerializer.Serialize(XmlWriter xmlWriter, Object o, XmlSerializerNamespaces namespaces, String encodingStyle, String id)
   at System.Xml.Serialization.XmlSerializer.Serialize(TextWriter textWriter, Object o, XmlSerializerNamespaces namespaces)
   at BotFarm.BotFactory.SaveBotInfos() in C:\projects\botfarm\BotFarm\BotFactory.cs:line 262
   at BotFarm.BotFactory.SetupFactory(Int32 botCount) in C:\projects\botfarm\BotFarm\BotFactory.cs:line 218
   at BotFarm.Program.Main(String[] args) in C:\projects\botfarm\BotFarm\Program.cs:line 19

botfarm properties After setting BotFarm.exe to run as Administrator, the error disappeared.


Edit: I would also recommend using a shorter path with less spaces and punctuation in the folder names, because long paths can all too often make error troubleshooting more difficult.

ghost commented 9 years ago

If your problem was solved by using the suggested solution, please close this issue. :turtle:

jackpoz commented 9 years ago

Probably better to handle the exception if this issue happens to users, showing at least a short message like "Permission denied creating new files, try running it as Administrator"

jackpoz commented 9 years ago

Lol, don't close issues I reopened, I want to handle this exception.

jackpoz commented 9 years ago

https://github.com/jackpoz/BotFarm/commit/a5dab30041130c31c1077aaefa5ca29466c3ea33 next time it's going to write a more understandable message