Karlovsky120 / 7DaysProfileEditor

Tool for editing *.ttp save files of 7 Days To Die
40 stars 32 forks source link

Object reference not set to an instance of an object #1

Closed Sceeker closed 4 years ago

Sceeker commented 7 years ago

Hello ! When I want to load my profile, I get this: bug I've tried with a fresh install of the game. Tried with multiple profiles. Nothing works :/ The software don' t even create a error log...

Karlovsky120 commented 7 years ago

Are you sure you have the appropriate version for the save file? Could you upload the save file somewhere where I can get it? There must be a bug in the loader code... Once I see where it fails exactly, I'll be able to fix it. I'll try to come up with logging system for null reference exceptions.

Karlovsky120 commented 7 years ago

I just updated the project, but I made no changes that would fix the error. There was a bug in the logger code, which I now fixed. There should be a "ProfileEditorCrash.log" file created in the same folder as the executable if any error occurs.

DannScott commented 7 years ago

I have the same problem with the error. I found that my error in particular focuses on weapons with flashlights attached. simply do not attach a flashlight via the editor. and save the profile. It fixed the error for me. let us see if a new error arises.

BTW: my error focused on saving changes on the profile. when the error occurred the whole profile was done for and you were forced to close the editor and start editing the file again from scratch or restore a backup.

Karlovsky120 commented 7 years ago

Sorry it took me so long.

I've located the error and fixed it. Attachments will now show up properly and it's now possible to save such files without errors. Look for the latest version (1.15.1.1).

Karlovsky120 commented 7 years ago

However, this only fixed DannScott's problem. Sceeker had a problem when opening it's file, and this was not the cause. But I don't have enough info to be able to fix it. I'll still need the exact file that fails to load, as well as list of each and every mod installed when opening that file. Note that the same mods used in game with the save file have to be installed at the time of editing it.

Karlovsky120 commented 7 years ago

Note to self: I'll have to create a better error reporting system that will take and package all the info I need into one neat zip file you will then be able to upload somewhere for me to examine. The contents will most likely be your save file, version of the program and your config folder.

EDIT: I did that.

MichaelLDX commented 7 years ago

I'm having the same issue. It seems to be related to the mods, as I can open ttps from older saves before the mods were added.

Mods being used are the Valmod Overhaul with the Bigger Backpack Mod. https://github.com/7days2mod/Valmod-Overhaul/archive/master.zip

One of the files unable to open: https://www.dropbox.com/s/k2if3jl1w71v31f/76561198031834916.ttp?dl=0

Link to the output file from Profile Editor: https://www.dropbox.com/s/yjp5w5v3ciwi4mo/ProfileEditor.log?dl=0

Karlovsky120 commented 7 years ago

While it's the same error, I don't think it was cause by the same thing. I'll look into it today when I get home. Might be an error or my side, or the mod is doing something funny. If the bigger backpack mod is is editing the dll, then it might be due to extra inventory space. If you're in a hurry, you could try to clear any extra inventory the mod adds and try to it open that way.

Karlovsky120 commented 7 years ago

I think this has come up already on the thread on the forums. There is a mistake in Valmod configs - if you look at masonry skill, it has entry

added twice. This used make my program lose its shit and crash. Given that this is not the first time this has happened, instead of hoping the modders won't make mistakes, I added a line that checks for duplicates and makes my program keeps its shit together.

Hope this fixes it.

MichaelLDX commented 7 years ago

It still seems to be an issue. Please let me know if there is anything I can do to further be of assistance. https://www.dropbox.com/s/q8qegk2czge3g6h/error_latest.rpt.zip?dl=0

Karlovsky120 commented 7 years ago

Well, from what I can tell, you're trying to open a save that is incompatible with the version of the game you have installed. You have an item in your inventory that isn't present in the xmls, meaning that this save wasn't created by the game you currently have installed.

There is an item with id=1843, which you have 47 of. I don't know what it is (that data is in the xmls). It's in position 12 in your inventory, which should be the third spot of the second row, if I'm not mistaking. I couldn't find it in the items.xml, and that's why the program fails.

Have you maybe recently updated a mod or something like that?

Can you open the save within the game? If so, depending how the games handles things, you might be able to open it with the editor after you exit the game. If that doesn't work, try removing that item from your inventory.

Do you have multiple installations of the game? If so, are you pointing the program to the right one? Try deleting 7DaysProfileEditor.config file and make sure you point the game at the exe you created the save with.

If I can help you with anything else, don't hesitate to ask.

NaturalBornCamper commented 6 years ago

I've also had this error and submitted the report! Hopefully you can test yourself with the file and see for yourself

babaThom commented 6 years ago

I got the same problem but only with that file. I'll try to locate the problem too. 76561198162848620.zip

babaThom commented 6 years ago

Ok the problem is the spotlight. I got 2 in my inventory and this cause the error in the editor