Guest User

Untitled

a guest
Jul 8th, 2016
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.30 KB | None | 0 0
  1. [Patch]
  2.  
  3. ; Info: Completely disable Skyrim's memory allocator and use regular C malloc. That means memory blocks will not exist anymore
  4. ; and game will not crash at some arbitrary limit. Theoretically it should also be faster (especially loading screens)
  5. ; and eliminate most ILS or freezing issues.
  6. ; IMPORTANT!!: You NEED custom plugin loader to run this so CrashFixPlugin.dll gets loaded before the game initializes!
  7. ; Here is the link to "SKSE Plugin Preloader": http://www.nexusmods.com/skyrim/mods/75795/?
  8. ; When this is enabled then Safety Load and SSME/SKSE memory patch are not needed, but they don't cause any trouble if you do have them.
  9. UseOSAllocators=1
  10.  
  11. ; Info: Crash happens unknown constructor (TESObjectLAND::unk_24 object), movaps instruction is used
  12. ; but heap allocate did not allocate this object to have 16 align. Crash happens more frequently
  13. ; with high Ugrids because more cells are loaded and greater chance to misalign.
  14. ; Solution: Could align only this object or align all objects. Trying with all to see what happens since
  15. ; same error could be elsewhere as well and I think I have seen it elsewhere.
  16. ; Result: Fixes these type of crashes. Some people report longer loading times and higher memory usage with this enabled!
  17. ; Update: Disabled by default since it's incompatible with some ENB settings, higher memory usage and longer loading times.
  18. ; It's safe and probably good to enable if you are ok with those downsides.
  19. AlignHeapAllocate=1
  20.  
  21. ; Info: Game crashes when strcmp is passed NULL char*
  22. ; Address: D573A8
  23. ; Cause: Most frequently happens in TthkbClipGenerator::activate (0xBF2FB3),
  24. ; tracked issue to skeleton was deleted in another thread while
  25. ; this function is attempting to use it. Have seen in other places
  26. ; too.
  27. ; Solution: Unknown. This doesn't really fix it for BF2FB3 because it just pops up in foot IK.
  28. ; If patched in foot IK it pops up in hand IK, the problem is larger than just this.
  29. ; Still enabled because it may fix crashes in other places too this is a very common function.
  30. ; There's really no reason not to have it since the game would crash certainly with this off.
  31. ; Enable one. NoTry may be slightly faster but catches less crashes.
  32. StrCmp=1
  33. ;StrCmpNoTry=1
  34.  
  35. ; Info: Game crashes when strlen is used on NULL char*
  36. ; Address: 46EDF0
  37. ; Cause: NiNode names are compared, one of the NiNode's name is NULL.
  38. ; Code:
  39. ; NiNode ** v72 = NiNode::children.data - this is iterated until count
  40. ; NiNode * v69 = ...
  41. ; const char * v56 = v69->name;
  42. ; if ( v56 )
  43. ; {
  44. ; const char * v57 = v72[v49]->name; // <- v57 name is not checked for NULL for some reason ?
  45. ; _strnicmp(v56, v57, strlen(v57)); <- strlen on NULL, also result is not even used anywhere!
  46. ; }
  47. ; Solution: Unknown, temporarily bypass whole strcmp since it's unused.
  48. ; Result: Seems to have stopped the crash for me.
  49. StrLen=1
  50.  
  51. ; Info: Unknown, reported as loading save game.
  52. ; Address: 8B437C - vtable seems to be 0 or wrong pointer is used.
  53. ; Solution: Skip since this is the last part of the function and already has a check anyway
  54. UnkUniqueId=1
  55.  
  56. ; Info: Unknown, reported as loading save game. Possibly related to rendering. First
  57. ; argument is gNiDX9Renderer->unk_650 which is a pointer.
  58. ; Address: CEC5EC - null pointer is passed as second argument to function, this function does not expect it
  59. ; Solution: Bypass using argument if it's null. Maybe doesn't fix.
  60. Render650=1
  61.  
  62. ; Info: Unknown, no info was provided. // char __thiscall TESObjectREFR::unk_4D4EB0(TESObjectREFR *this)
  63. ; Address: 4D4EB9 - vtable of base form is 0
  64. ; Solution: Bypass and pretend that base form is 0 since the function does this check itself already
  65. UnkObjRef4D4EB0=1
  66.  
  67. ; Info: Game is saving location's seen data to save game. The data is NULL.
  68. ; Address: 4C6031
  69. ; Cause: Game doesn't check for null pointer
  70. ; Code:
  71. ; TESObjectCELL * v3 = ...
  72. ; v5 = BaseExtraList::GetSeenData_40D980(&v3->extraData);
  73. ; result = (void *)(*((int (__thiscall **)(_DWORD, _DWORD))*v5 + 1))(v5, v2); // <-- v5 can be null! but not checked
  74. ; v5 is IntSeenData, size is known.
  75. ; Solution: Only solution seems to be temporarily creating an empty IntSeenData and writing this to stream instead.
  76. NullSeenData=1
  77.  
  78. ; Info: BSFixedString::Set is called with NULL argument.
  79. ; Address: A51285
  80. ; Solution: Ignore call when NULL argument. Not really a solution :P probably better than crashing though.
  81. StringRefSetNull=1
  82.  
  83. ; Info: This crash happens because StrLen crash was prevented.
  84. ; Address: 46EE1D
  85. ; Solution: Skip over it.
  86. ; Result: See StrLen.
  87. SkipStrLenCrash=1
  88.  
  89. ; Info: This crash happens because unknown reasons during loading. Something to do with behavior graph.
  90. ; One of the more common crashes I get.
  91. ; Address: C27A8F
  92. ; Solution: Don't know, trying to let game think the value is 0 and see what happens.
  93. ; Result: Haven't had this crash since.
  94. bhvGraphUpdateLoad=1
  95.  
  96. ; Info: Crash happens during loading, no idea. Might be related to rendering.
  97. ; Address: D822D8
  98. ; Solution: Tried patch something but it probably doesn't work.
  99. Unk11=1
  100.  
  101. ; Info: Incompatible skeleton, but could be something else too.
  102. ; Address: 46ECF5 - NiNode children access
  103. ; Solution: No solution from here, but since it's going to crash anyway we could at least
  104. ; warn user about possible incompatible skeleton and let them fix it. Shows messagebox
  105. MissingNode=1
  106.  
  107. ; Info: Crash, it's function array and index goes out of bounds which causes it to call invalid address.
  108. ; Address: 6F3A31
  109. ; Solution: Check index before calling.
  110. ; Result: Haven't had this crash since.
  111. IndexError1=1
  112.  
  113. ; Info: Crash happens in "MovementPlannerAgentWarp" function, unknown what it does. LookupFormById returns
  114. ; NULL and game does not check or expect this to happen.
  115. ; Address: 76E358
  116. ; Solution: Game has a check for if returned isn't actor it sets 0 as value, we will do same if NULL is returned.
  117. MovementPlannerAgentWarp=1
  118.  
  119. ; Info: Crash happens in DDB0A0, seems to be used in some havok animated object's vtables.
  120. ; Normally these crashes are fixed by aligning allocated memory with 16 bytes. But
  121. ; this one isn't because it can be used on static memory locations which aren't using
  122. ; Skyrim's allocator at all, this means that memory isn't guaranteed to be 16 byte aligned.
  123. ; Address: DDB0B2
  124. ; Solution: Use movups instruction instead of movaps.
  125. UnallocatedMovaps=1
  126.  
  127. ; Info: Weird crash with NULL ptr in TESWorldSpace::GetCellByCoordMask_4375D0, don't know why it happens.
  128. ; Address: 437604
  129. ; Solution: return 0 if this crash would happen.
  130. ; Result: Haven't had this crash since, but it's rare anyway so it could be coincidence.
  131. CellNullCrash=1
  132.  
  133. ; Info: Crash when trying to do: v14 = MagicItem::unk_406C70(a3)->properties.projectile;
  134. ; This 406C70 function is something like "GetMainMagicEffect". Sometimes though it may return
  135. ; NULL and in 90% of places the game expects this and checks for NULL result, this patch will
  136. ; fix the remaining locations.
  137. ; Address: 7E39EC, 657677, 6577D5, 65FEEC, 8127CF
  138. ; Solution: Check for NULL and skip (depends on location) if it is.
  139. GetMainMagicEffect=1
  140.  
  141. ; Info: Crash when game searches node "NPC COM [COM ]" on actor but the node was not found. This is unexpected
  142. ; for game because it uses the result without checking for NULL. This whole thing has something to do
  143. ; with mounting. The function that does this whole thing is present in "StopMountCameraHandler" and
  144. ; "MountInteraction" vtable. Also it seems that this has something to do with updating position.
  145. ; More info: Was reported that this could happen if non-humanoid tries to mount a horse. This is a rather specific
  146. ; error with a mod. Instead we will show error message to user when this happens so they can
  147. ; fix or uninstall that mod.
  148. ; Address: 6E7F85
  149. ; Solution: Check for NULL and if it is NULL then use base node of actor instead of this. It's fine because
  150. ; we only take X and Y position from it.
  151. ; Solution2: Show error message and crash after.
  152. MountNodeCrash=0
  153. MountNodeWarn=1
  154.  
  155. ; Info: Crash when game is trying to setup foot IK but there's a problem. Real cause is unknown but for me.
  156. ; So we will display a message box when this crash happens. Seems related to the
  157. ; StrCmp crash in BF2FB3, maybe. Try reducing the amount of installed animations.
  158. ; Address: BFECC1
  159. ; Solution: No solution from here, display warning with helpful tips.
  160. IKCrashWarn=1
  161.  
  162. ; Info: Crash happens when rendering and saving. I think this is when it renders the save game image.
  163. ; if ( v8 ) // <- not null
  164. ; {
  165. ; if ( v8 )
  166. ; v9 = *(v8 + 8); // <- *(v8 + 8) is null
  167. ; else
  168. ; v9 = 0;
  169. ; v10 = *(v9 + 140) * *(a2 + 4) // <- crash because null
  170. ; + *(v9 + 136) * *a2
  171. ; + *(v9 + 144) * *(a2 + 8);
  172. ; v21 = v10 - *(*(v8 + 8) + 148) * a3;
  173. ; }
  174. ; Address: CB051A
  175. ; Solution: We will skip this if block when *(v8 + 8) is null, as if v8 was null.
  176. RenderSave=1
  177.  
  178. ; Info: Crash was reported as casting spell. Only happens sometimes. Happens in movement controller.
  179. ; Seems like vtable is NULL.
  180. ; Address: 76636B
  181. ; Solution: This happens in a for loop and it happens in if clause. We can skip if this crash would happen.
  182. MoveControllerCast=1
  183.  
  184. ; Info: Crash when saving game and trying to render (possibly save game image again?). It's trying to get
  185. ; vtable of NULL pointer which will crash.
  186. ; if ((*a2 + 76)(a2, a1)) // a2 is null
  187. ; {
  188. ; *(0x1BA9344) = a1;
  189. ; *(0x1BA9340) = a2;
  190. ; }
  191. ; else
  192. ; {
  193. ; *(0x1BA9340) = 0;
  194. ; *(0x1BA9344) = 0;
  195. ; }
  196. ; Address: CAF9F7
  197. ; Solution: Skip function call and set return value to false so we don't have to use the NULL value.
  198. SaveRenderCrash=1
  199.  
  200. ; Info: Crash when game tries to get loaded node but it is set to NULL. Only ever seen this on two people.
  201. ; It is most likely actually related to corrupted mesh being unable to be loaded and game does not expect it.
  202. ; NiNode * node = a->GetLoadedStateNiNode();
  203. ; v2 = node->(*(vtable+0x14))(); // <- node is NULL
  204. ; if(v2) { *((int*)(v2 + 212)) = 0; } // <- we can skip this part since it has a check anyway
  205. ; Address: 4C119E
  206. ; Solution: Real solution would be to find the broken mesh and remove it. So lets notify user instead of ignoring this part.
  207. ; Enable one of the following, ignore problem and try to continue or show message box with object reference form ID and form Type.
  208. NullLoadedNodeIgnore=0
  209. NullLoadedNodeNotify=1
  210.  
  211. ; Info: Crash in GarbageCollector::Add when actor argument's base form is NULL. Game does not check this, when in
  212. ; some other places it does check for this possibility.
  213. ; Address: 690A69
  214. NullActorBaseForm=1
  215.  
  216. ; Info: Crash when modifying actor value but the pointer is bad, possibly due to actor being invalid. This happens often
  217. ; when script engine is lagged and spells want to modify actor values a lot.
  218. ; Address: 6E07C6
  219. AVSetCrash=1
  220.  
  221. ; Info: If your scripts use more than 65535 different strings then the save game will be corrupt and not possible to load.
  222. ; This fixes it by changing the save file format slightly if string count is higher than 65520. That means if you
  223. ; have this option enabled and your save game would have become corrupt it changes format instead and vanilla game
  224. ; or save game tools will not be able to open it! Opposite is true as well, if the count goes below 65520 after
  225. ; and you save again then the format reverts to vanilla.
  226. ; TLDR: Fix for https://forums.nexusmods.com/index.php?/topic/3924850-corrupt-saves-strcount-0xffff-ctd-on-load/
  227. ; Address: Around 30 different parts of code had to be patched.
  228. StringCount32=1
  229.  
  230. ; Info: Warn if SKSE memory patch is not active. This checks if default heap size is 256 or less and warns if you try to
  231. ; click New, Continue or Load in main menu. Still lets you play the game, just shows a warning.
  232. WarnSKSEMemoryPatch=1
  233.  
  234. ; Info: If AlignHeapAllocate is disabled by user then fix that one movaps crash manually. There's no downside to having this enabled.
  235. ; Address: 4BD832
  236. FixMovApsManuallyIfAlignedAllocateIsDisabled=1
  237.  
  238. ; Info: Overwrite array allocator directly when UseOSAllocators is set to 1. Don't understand the code enough yet to
  239. ; say if it's safe or not. At this point it's just here for testing.
  240. OverwriteArrayAllocator=0
Add Comment
Please, Sign In to add comment