Jump to content

Recommended Posts

If this is a frequent thing then there must be a mistake somewhere. I tried google "ofstream null write" and similar but nothing relevant really came up so it may be my code problem but I didn't see anything wrong when I looked over.

 

One way to fix all crashes related to loading this file is use exception handling and if there is an exception just treat that as file not found however this is not a real solution because data shouldn't be lost like that. Luckily I think no mods currently use this feature.

Link to comment

This is really strange. I saw several times the hint to delete the .save file but even when I do so and start a brand new game I get this error message. The funny thing is that this started just today on an brand new game with just 6 hours of gameplay.

 

I have attached my storageutil file, maybe it helps you guys.

 

Maybe if someone who is not affected by this could upload his file then other who have the problems can start and when it happens again take a look at both files to see what has changed. I am not a programmer or so so sorry if I am talking nonsense.  :blush:

 

Edit: Ok, after reading the whole thread I have reinstalled SKSE, papyrusutil v22 (before that I deleted the .save file) and also installed the MS redistributeable some pages before it still showed the error. Only after re-starting the PC it finally stopped. 

StorageUtil.rar

Link to comment

Well, it was not asking for this specific file it just said that the papyrusutil was not installed correctly. I have installed it anyways but only after a PC restart the util worked again. Pretty strange that is stopped working without changing anything but finally I was able to solve it.

 

Thanks for your support b3lisario.

Link to comment

Nice, what was wrong with it that it required redistributable?

nothing, actually it's ok when application requires redistributable  as  MS will be able to patch it later, apply security fixes and etc.

the only issue it that we have to explain it to users ..

 

So, i just switched one compile flag from /MD to /MT and now plugin bundles that redistributable 

 

 

Link to comment

all-in-one package (sources, projects, skse sources and etc), modified settings so it won't require any ms redistributable runtime

im srry i do not quite understand, do we put this in our skyim\data folder? im really newbish at modding and ive no a clue on what to do with those files,

 

p.s. srry if this was a stupid question.

 

Respectfully asked by MissLaughingWolf

Link to comment

MissLaughingWolf, the post by Earendil was for the benefit of the author of PapyrusUtil, mainly to help track a dependency issue that has caused some users grief. I would wait for an official release on the main page.

Link to comment

Glad to see the mod has been updated. Thanks! :D

 

In regards to "corrupted" save issue. Do you know of any mod that uses that save feature? I'd like to try to reproduce the problem.

 

I did more of my silly tests and I've verified that reading NULLs from a stream and doing this thing:

stream >> int variable

puts "dirt" on the int variable.

I am not sure why this should crash, I guess it enters in any of the for loops that follow.

 

I think something like

if (contents[0] = '\0') return;

while doesn't fix the issue, maybe will save users from some trouble, and also to us from support them.

Just a thought for the next update... ;)

Link to comment

Could someone help me? I installed version 2.3 and I keep getting this error:

 

checking plugin C:\Program Files\Steam\SteamApps\common\skyrim\Data\SKSE\Plugins\\StorageUtil dll
plugin C:\Program Files\Steam\SteamApps\common\skyrim\Data\SKSE\Plugins\\StorageUtil dll (00000001 papyrusutil plugin 00000001) disabled, fatal error occurred while loading plugin

 

The menu loads but it crashes when I load my save.
 

I have the latest version of sexlab installed, using the papyrusutil included in that causes skse to crash on startup.

Link to comment
  • 4 weeks later...

Since releasing SexLab 1.58 which includes the newest PapyrusUtil with the fixed dependency; I've had a couple people report being unable to start Skyrim unless they downgrade PapyrusUtil back down to 2.2, citing the same skse.log error as Werdle777 above.

 

Wild shot in the dark, as I have no idea if it'd help, but it may be to the benefit of this problem to switch the SKSE plugin hooking PapyrusUtil is using with sub_8F7E10() to the native method now enabled by SKSE 1.7:

 

 

 

SKSEPapyrusInterface        * g_papyrus = NULL;

extern "C" {

	bool SKSEPlugin_Query(const SKSEInterface * skse, PluginInfo * info) {
		// ... 
		g_papyrus = (SKSEPapyrusInterface *)skse->QueryInterface(kInterface_Papyrus);
		if(!g_papyrus) {
			_MESSAGE("couldn't get papyrus interface");
			return false;
		}
		// ... 
		return true;
	}

	bool SKSEPlugin_Load(const SKSEInterface * skse) {
		// ... 
		g_papyrus->Register(RegisterFuncs);
		// ... 
		return true;
	}

}

bool RegisterFuncs(VMClassRegistry* registry) {
	// Register all papyrus function implementations here.
	registry->RegisterFunction(new NativeFunction3<StaticFunctionTag, UInt32, TESForm*, BSFixedString, UInt32>("SetIntValue", "StorageUtil", i_SetIntValue, registry));
	registry->SetFunctionFlags("StorageUtil", "SetIntValue", VMClassRegistry::kFunctionFlag_NoWait);
	// ... 
	return true;
} 

 

 

 

I can update it myself if need be and you post the updated source for 2.3

Link to comment

You get this message when the StorageUtil.save file is filled with nulls (corrupted).

 

This is my suggestion:

 

File main.cpp, function LoadFileValues

replace:

std::stringstream ss(contents);
with

std::stringstream ss(contents);
if (contents[0] = '\0') return;
This won't fix the real cause of the "corrupted StorageUtil.save" issue (I don't think this is caused by PapyrusUtil BTW), it's just a workaround.
Link to comment

Alternatively the file values could be switched to using the existing json file system, which currently seems much more stable than the StorageUtil.save system, just connect all the former .save functions to to a single json file to serve the same purpose as the StorageUtil.save. This could even be implemented by just switching the existing file storage functions to serve as papyrus based adaptation to the json functions, rather than having to mess around with the dll files code (except maybe to delete the then unused native functions).

Link to comment

I'm getting crashes with 2.3. Specifically, I can reproduce it consistently with Deviously Helpless, at the end of the Draugr scene. Downgrading to 2.2 solved the problem, I've also had others confirm the same thing.

 

After a bit of tinkering, I've narrowed it down to this bit:

 

function SandBoxCreatures()
    int num = FormListCount(none, creatureList)
    RemoveAllPackageOverride(gatherPackage)
    while num > 0
        num -= 1
        Actor creature = FormListGet(none, creatureList, num) as Actor
        AddPackageOverride(creature, sandboxPackage, 100)
        creature.EvaluatePackage()
    endWhile
endFunction

Commenting that out from my code prevented the crash with 2.3. Currently I'm thinking the problem might be RemoveAllPackageOverride, as the other functions I've used elsewhere as well and they seem to be working fine.

Link to comment

You get this message when the StorageUtil.save file is filled with nulls (corrupted).

 

This is my suggestion:

 

File main.cpp, function LoadFileValues

replace:

std::stringstream ss(contents);
with

std::stringstream ss(contents);
if (contents[0] = '\0') return;
This won't fix the real cause of the "corrupted StorageUtil.save" issue (I don't think this is caused by PapyrusUtil BTW), it's just a workaround.

 

 

Ultimately while it might fix it, it's definitely just a workaround, as it just prevents the crashing and does nothing to to actually stop the file from corrupting itself.

I can update it and add the fix in, but as one of the main people making heavy use of PapyrusUtil though, I'd like to hear your opinion on the json replacement idea I mentioned in my previous post, or other ideas in general. 

Link to comment

JSON might corrupt the same way, I think corruption happens if game crashes during file saving or some OS file access problem. Maybe workaround would be to save to a new file, then when saving is done, delete old file and rename new file to old file. If game has crashed in between then nothing really is lost.

 

Srende I looked over package code and it seems ok. Do you think you can get the memory address where game exception occurred?

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use