Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This STARTS the thread that eventually throws the exception...
- if (Thread_Object != null)
- {
- Thread_Object.Stop(250);
- }
- Thread_Object = new ObjectDataCollection.ObjectThread();
- Thread_Object.Start();
- // Here is the ObjectThread (LoopThread is called on the above .Start()):
- public override void LoopThread()
- {
- try
- {
- LoadData();
- Random random = new Random();
- while (true)
- {
- Console.WriteLine("THIS PRINTS!");
- }
- }
- }
- private void LoadData()
- {
- try
- {
- String Path = DataPath;
- if (Path == null || Path.Length == 0)
- {
- return;
- }
- // nothing to load!
- if (!File.Exists(Path))
- {
- return;
- }
- FileInfo f2 = new FileInfo(Path);
- if (f2.Length == 0)
- {
- return;
- }
- // the below line dies w/an exception, no idea why
- DataStore = MyWoW.Classes.XmlSerializer.Deserialize<ObjectData>(Path);
- Console.WriteLine("Loaded data for {0} objects!", DataStore.Data.Count);
- }
- catch
- {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement