Final Fantasy Hacktics

Modding => Help! => Topic started by: Timbo on October 27, 2014, 12:08:15 pm

Title: Object reference not set to an instance of an object.
Post by: Timbo on October 27, 2014, 12:08:15 pm
Object reference not set to an instance of an object. What does this mean?

I started getting this error on my most recent revision of tactext. It doesn't happen on my file from the day before. I've taken it back to that version and started over several times but I can't seem to isolate what is causing this error. I've only changed a handful of things. I've changed two ability descriptions, three job descriptions, four job names, and one ability name. I've tried it on both clean and dirty iso files and I get the problem no matter what. I need some help figuring this out.
Title: Re: Object reference not set to an instance of an object.
Post by: Xifanie on October 27, 2014, 12:14:09 pm
load your .ffttext, not the ISO
Title: Re: Object reference not set to an instance of an object.
Post by: Timbo on October 27, 2014, 12:33:24 pm
Unfortunately, I always load from my .ffttext file
Title: Re: Object reference not set to an instance of an object.
Post by: Angel on October 27, 2014, 03:20:38 pm
There's also the problem of some versions of Tactext being completely freaking broken. I never remember which versions, but it's kind of like a list of which versions of utorrent are whitelisted on private trackers.
Title: Re: Object reference not set to an instance of an object.
Post by: Choto on October 27, 2014, 10:05:06 pm
that's definitely a C# code issue, try another version.
Title: Re: Object reference not set to an instance of an object.
Post by: Timbo on October 27, 2014, 10:29:14 pm
I tried both the version in .482 and .478 and neither of them are working for me. Are there any more versions? Is there something else I can do? My patch is kind of dead in the water if I can't fix the text issues.
Title: Re: Object reference not set to an instance of an object.
Post by: 3lric on October 28, 2014, 03:29:02 am
If you already only have minimal changes, just make a new tactext patch and save after each bit you do to isolate the issue.

A big part of modding is redoing things a hundred or so times, so it might be a good thing to get used to.
Title: Re: Object reference not set to an instance of an object.
Post by: Timbo on October 28, 2014, 05:07:31 pm
So, I'm still patching all of the changes one asset at a time right now but I've isolated at least one instance of the bug. It happens every time I change Elidibs' job name from White Chocobo back to Serpentarius. I'm wondering if I can try to just change his name in Battle.Bin instead of Quick Edit since he only appears in battle wouldn't this be the only place I need to give him a job name? wor

Edit: made some small progress on the bug. I was just now able to blank out the name and patch that. I'm going to try renaming him now and see if that works.

Edit 2: It totally worked. Blanking out and rewriting the ability and Quick Edit totally solved the problem. Now can anybody tell me why that worked?
Title: Re: Object reference not set to an instance of an object.
Post by: Choto on October 28, 2014, 06:11:48 pm
if anybody could it would be Glain. That exception description "object reference not set..." happens when you try to use an object that you haven't declared or initialized already. You'd have to look at the code to see why it's happening. I haven't so far as opened TacText source code and have no plans to...ever. That shit scary.
Title: Re: Object reference not set to an instance of an object.
Post by: Glain on October 28, 2014, 09:21:23 pm
As it happens, I don't really know the science behind Tactext very well; I was able to make some additions/changes to it, but it didn't require understanding why it does all the things it does, or looking into the nuts and bolts of everything going on behind the scenes. 

The null reference exception you got is caused when a null object is dereferenced (an attempt is made to access the state of, or invoke a method on, a null object); I could probably figure out where the error is happening if I ran it in a debugger, but I'd need to be able to reproduce this exact case... and even then I probably wouldn't know why the algorithm is failing, since I'm not familiar with how it works or what it's trying to do.  Honestly, melonhead might be the only one who knows... although I have to wonder if even he would remember at this point.  So there may actually be nobody that knows what's up with Tactext.  \o/
Title: Re: Object reference not set to an instance of an object.
Post by: Timbo on October 28, 2014, 10:22:17 pm
I'm just happy that I got past that bug. I don't really need to know the why of it. Thanks for your responses folks. Just having people to turn to when you need help, makes a huge difference.