The Hotfix Share

Welcome Guest ( Log In | Register )

Reply to this topicStart new topic
 OutOfMemoryException in .NET Framework 4.6.1 and higher, Insufficient jump stubs
post Apr 4 2016, 11:26 AM
Post #1

Group: Hotfixer
Posts: 78
Joined: 25-September 07
Member No.: 6,596

If you use .NET Framework 4.6.1 or higher, you may be getting an out-of-memory exception. Microsoft has released the following Knowledge Base article to document the problem and provide a mitigation:

KB3152158 - Out-of-memory exception in a managed application that targets .NET Framework 4.6.1

There are two ways to mitigate this problem:

1. Add a registry entry (this is the method recommended by the Knowledge Base article)

Copy the following lines (everything between the dashes; do not include the dashes) into Notepad:

Windows Registry Editor Version 5.00



Save the file to your Desktop as NGenReserveForJumpStubs.reg . To do this successfully, you will have to make sure you change the Save as type to All files (*.*) before entering NGenReserveForJumpStubs.reg as the file name.

Then, double-click the NGenReserveForJumpStubs.reg file on your Desktop, and answer in the affirmative until the keys and values have successfully been added to the Registry. Note: You need Administrative privileges to do this.

Now, restart your computer.

2. Create the system environment variable COMPLUS_NGenReserveForJumpStubs and set its value to 5.

Open the System Control Panel (WinKey+Pause)
Click Advanced System Settings (on the left-hand side)
Click Environment Variables...
Under System Variables, click New...
In Variable name enter: COMPLUS_NGenReserveForJumpStubs
In Variable value enter: 5
Click OK.

Now, restart your computer.

Incidentally, the fact that the Knowledge Base article recommends a registry entry to solve the problem tells me that .NET Framework 4.6.2, which was released in the last week of March 2016, also has this problem.
Go to the top of the page

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


RSS Lo-Fi Version Time is now: 25th September 2020 - 10:12 AM
All trademarks mentioned on this page are the property of their respective owners
The Hotfix Share is not affiliated with Microsoft
Copyright © 2019