How can I resolve ERR gprim?

3 次查看(过去 30 天)
Lina
Lina 2023-6-16
We are trying to run a teststarter program in Matlab R2016b (files and toolbox can be downloaded here: https://drive.google.com/file/d/1wg3XjqTPFTYhr6PMUedr7aapmgeuDs2G/view?usp=sharing). This runs on an old laptop and we are now trying to set up a new laptop with the same setup. The tasks in teststarter e.g., Actigraph.m have a line of code (e.g., config_display(1...). When that line of code starts with the number 1 it attempts to open the task in full screen, whereas when the first number is 0 it attempts to open the task in a window. The window version works, however as we are trying to run this task in full screen we are encountering a problem. We receive an error "ERR gprim..."
We do not know why but we think it may be something to do with the graphics driver (however, we do not know how to test this as we do not know how to instruct matlab to use a specific driver. It seems that matlab just defaults to the primary driver used by the system).
In any case, do you think you could help us to solve this issue? We are working in a sleep laboratory running experiments on participants in a study and this is causing us to pause data collection.
On the older working laptop we have this:
Version: '4.6.14802 Compatibility Profile Context 21.40.52 30.0.14052.5'
Vendor: 'ATI Technologies Inc.'
Renderer: 'AMD Radeon(TM) Graphics'
RendererDriverVersion: '30.0.14052.5'
RendererDriverReleaseDate: '13-Apr-2022'
MaxTextureSize: 16384
Visual: 'Visual 0x08, (RGBA 32 bits (8 8 8 8), Z depth 16 bits, Hardware acceleratio…'
Software: 'false'
HardwareSupportLevel: 'full'
SupportsGraphicsSmoothing: 1
SupportsDepthPeelTransparency: 1
SupportsAlignVertexCenters: 1
Extensions: {306×1 cell}
MaxFrameBufferSize: 16384
On the newer non-working laptop we have this:
Version: '4.6.0 Compatibility Profile Context 22.…'
Vendor: 'ATI Technologies Inc.'
Renderer: 'AMD Radeon(TM) Graphics'
RendererDriverVersion: '31.0.12028.15003'
RendererDriverReleaseDate: '24-Mar-2023'
MaxTextureSize: 16384
Visual: 'Visual 0x14, (RGBA 32 bits (8 8 8 8), Z…'
Software: 'false'
HardwareSupportLevel: 'full'
SupportsGraphicsSmoothing: 1
SupportsDepthPeelTransparency: 1
SupportsAlignVertexCenters: 1
Extensions: {253×1 cell}
MaxFrameBufferSize: 16384
____________________________________________________________
MATLAB Version: 9.1.0.441655 (R2016b)
MATLAB License Number: 863595
Operating System: Microsoft Windows 11 Pro Version 10.0 (Build 22621)
Java Version: Java 1.7.0_60-b19 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
----------------------------------------------------------------------------------------------------
MATLAB Version 9.1 (R2016b)
Simulink Version 8.8 (R2016b)
Aerospace Blockset Version 3.18 (R2016b)
Aerospace Toolbox Version 2.18 (R2016b)
Antenna Toolbox Version 2.1 (R2016b)
Audio System Toolbox Version 1.1 (R2016b)
Bioinformatics Toolbox Version 4.7 (R2016b)
Communications System Toolbox Version 6.3 (R2016b)
Computer Vision System Toolbox Version 7.2 (R2016b)
Control System Toolbox Version 10.1 (R2016b)
Curve Fitting Toolbox Version 3.5.4 (R2016b)
DSP System Toolbox Version 9.3 (R2016b)
Data Acquisition Toolbox Version 3.10 (R2016b)
Database Toolbox Version 7.0 (R2016b)
Datafeed Toolbox Version 5.4 (R2016b)
DatapixxToolbox Version 0.9, Aug
Econometrics Toolbox Version 3.5 (R2016b)
Embedded Coder Version 6.11 (R2016b)
Filter Design HDL Coder Version 3.1 (R2016b)
Financial Instruments Toolbox Version 2.4 (R2016b)
Financial Toolbox Version 5.8 (R2016b)
Fixed-Point Designer Version 5.3 (R2016b)
Fuzzy Logic Toolbox Version 2.2.24 (R2016b)
Global Optimization Toolbox Version 3.4.1 (R2016b)
HDL Coder Version 3.9 (R2016b)
HDL Verifier Version 5.1 (R2016b)
Image Acquisition Toolbox Version 5.1 (R2016b)
Image Processing Toolbox Version 9.5 (R2016b)
Instrument Control Toolbox Version 3.10 (R2016b)
LTE System Toolbox Version 2.3 (R2016b)
MATLAB Coder Version 3.2 (R2016b)
MATLAB Compiler Version 6.3 (R2016b)
MATLAB Compiler SDK Version 6.3 (R2016b)
MATLAB Report Generator Version 5.1 (R2016b)
Mapping Toolbox Version 4.4 (R2016b)
Model Predictive Control Toolbox Version 5.2.1 (R2016b)
Model-Based Calibration Toolbox Version 5.2 (R2016b)
Neural Network Toolbox Version 9.1 (R2016b)
OPC Toolbox Version 4.0.2 (R2016b)
Optimization Toolbox Version 7.5 (R2016b)
Parallel Computing Toolbox Version 6.9 (R2016b)
Partial Differential Equation Toolbox Version 2.3 (R2016b)
Phased Array System Toolbox Version 3.3 (R2016b)
Polyspace Bug Finder Version 2.2 (R2016b)
Polyspace Code Prover Version 9.6 (R2016b)
Powertrain Blockset Version 1.0 (R2016b+)
Psychtoolbox Version 3.0.19 17 February
RF Toolbox Version 3.1 (R2016b)
Risk Management Toolbox Version 1.0 (R2016b)
Robotics System Toolbox Version 1.3 (R2016b)
Robust Control Toolbox Version 6.2 (R2016b)
Signal Processing Toolbox Version 7.3 (R2016b)
SimBiology Version 5.5 (R2016b)
SimEvents Version 5.1 (R2016b)
SimRF Version 5.1 (R2016b)
Simscape Version 4.1 (R2016b)
Simscape Driveline Version 2.11 (R2016b)
Simscape Fluids Version 2.1 (R2016b)
Simscape Multibody Version 4.9 (R2016b)
Simscape Power Systems Version 6.6 (R2016b)
Simulink 3D Animation Version 7.6 (R2016b)
Simulink Code Inspector Version 2.6 (R2016b)
Simulink Coder Version 8.11 (R2016b)
Simulink Control Design Version 4.4 (R2016b)
Simulink Design Optimization Version 3.1 (R2016b)
Simulink Design Verifier Version 3.2 (R2016b)
Simulink Desktop Real-Time Version 5.3 (R2016b)
Simulink PLC Coder Version 2.2 (R2016b)
Simulink Real-Time Version 6.5 (R2016b)
Simulink Report Generator Version 5.1 (R2016b)
Simulink Test Version 2.1 (R2016b)
Simulink Verification and Validation Version 3.12 (R2016b)
Spreadsheet Link Version 3.3 (R2016b)
Stateflow Version 8.8 (R2016b)
Statistics and Machine Learning Toolbox Version 11.0 (R2016b)
Symbolic Math Toolbox Version 7.1 (R2016b)
System Identification Toolbox Version 9.5 (R2016b)
Vehicle Network Toolbox Version 3.2 (R2016b)
Vision HDL Toolbox Version 1.3 (R2016b)
WLAN System Toolbox Version 1.2 (R2016b)
Wavelet Toolbox Version 4.17 (R2016b)

回答(1 个)

Milan Bansal
Milan Bansal 2023-8-30
编辑:Milan Bansal 2023-8-30
Hi,
I understand that the error is due to new Renderer Driver Version in the new laptop.
With this new version, when the display mode is set to 1 (Full Screen), the graphics window goes out of focus of MATLAB and hence, the program is not able to take action on it. This error is invoked when Line 125 is run in "start_cogent.m" file, where "CogInput.mex" file is called.
You may try modifying your code in "CogInput.mex" such that the graphics window becomes active again and then regenerate the mex file. The following command can be used to display graphics window in full screen and focus on a particular figure.
FigH = figure('Position', get(0, 'Screensize')); % display in full screen
figure(FigH) % focus on particular figure
Refer to the documentation link given below for further reference.

类别

Help CenterFile Exchange 中查找有关 Model Statistics 的更多信息

产品


版本

R2016b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by