Why am I getting an NVIDIA Error code: 3 (subcode 2) popup?
14 次查看(过去 30 天)
显示 更早的评论
MathWorks Support Team
2023-1-10
回答: MathWorks Support Team
2023-2-6
I am using MATLAB R2022a to create a plot with the "scatter" function from a 50,000-by-50,000 size matrix. I received a popup titled "NVIDIA OpenGL Driver" with the following message:
Unable to recover from a kernel exception. The application must close.
Error code: 3 (subcode 2)
Originally I was only getting the popup when trying to plot the large dataset, but eventually I was getting it even when plotting smaller datasets.
This popup would not appear when I used software OpenGL, but the plots would then come out grainy and pixelated. Why is this popup occurring, and how can I prevent it?
采纳的回答
MathWorks Support Team
2023-1-10
This issue is being caused by the Java heap size being too small, and can be resolved by increasing the Java heap size.
There are two ways to change the Java heap size:
Method 1:
1. In MATLAB, open Preferences, which is under the Home tab.
2. Navigate to MATLAB > General > Java Heap Memory.
3. Set the slider to the maximum value.
If the crash is still occurring, try setting the value higher by using the following steps:
Method 2:
1. Open MATLAB as Administrator.
2. Execute the following commands in the Command Window:
>> matlabroot
>> computer(‘arch’)
3. Set the Current Folder in MATLAB to (result of “matlabroot”)\bin\(result of “computer(‘arch’)”). For example, "C:\Program Files\MATLAB\R2022a\bin\win64"
4. Create a new script with the following line:
-Xmx120m
This is case-sensitive, and you can change “120” to larger values. The number sets the number of MB that constitutes the maximum heap size.
5. Save the script as “java.opts”.
6. Close and reopen MATLAB in non-Administrator mode.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Graphics Performance 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!