Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Hardcopy error when printing

Subject: Hardcopy error when printing

From: omegayen

Date: 3 Mar, 2010 15:39:05

Message: 1 of 5

Hi,

Can anyone help troubleshoot this error.

Warning: Problems in UIW_SetUpGLPrinting
> In C:\Program Files\MATLAB\R2009b\toolbox\matlab\graphics\hardcopy.p>hardcopy at 21
  In graphics\private\render at 143
  In print at 277
  In my_code at 352

line 352 of my_code

print(gcf, '-djpeg', filename)

the graphics card is an geforce gt 9400 with a graphics driver that was updated to the newest version as of yesterday. thanks.

Subject: Hardcopy error when printing

From: Bruno

Date: 22 Mar, 2010 13:49:02

Message: 2 of 5

Hello omegayen,

maybe you've already searched the group for "UIW_SetUpGLPrinting".
As you can see, no one has replied to this issue yet.

I'm having a hard time with this problem at the deployment machine,
but print( ), saveas( ) never bugged at the machine where the Matlab is installed,
as seems to be your case.

If you can afford to use another renderer (zbuffer, painters), it could solve it.

I suspect this has to do with the OpenGL driver/library installed, but didn't figure
a final solution yet. Modern graphic cards (as yours) have built in OpenGL, besides
XP SP3 also got it. The problem is I have all this stuff too, and nevertheless the
Matlab code still bugs. It's a headscratcher for sure...

Cheers,
Marchesi.

"omegayen " <omegayen@ameritech.net> wrote in message <hmlvqo$p75$1@fred.mathworks.com>...
> Hi,
>
> Can anyone help troubleshoot this error.
>
> Warning: Problems in UIW_SetUpGLPrinting
> > In C:\Program Files\MATLAB\R2009b\toolbox\matlab\graphics\hardcopy.p>hardcopy at 21
> In graphics\private\render at 143
> In print at 277
> In my_code at 352
>
> line 352 of my_code
>
> print(gcf, '-djpeg', filename)
>
> the graphics card is an geforce gt 9400 with a graphics driver that was updated to the newest version as of yesterday. thanks.

Subject: Hardcopy error when printing

From: Bruno

Date: 23 Mar, 2010 12:36:22

Message: 3 of 5

Hello,

I was having this problem for some months. My specifics is that I have a development
and a deployment machine. It was all good on the first, but on the second, it always
came the 'UIW_SetUpGLPrinting' problem.

The other rendereres (zbuffer and painters, as opposite to OpenGL) may not misbehave,
but they also do not perform alpha blending, for instance, thus being somewhat
useless in some cases.

Now it has been solved. I believe this happens when the OpenGL API doesn't work as expected,
and that could be for more than one cause. If you're having this issue, try to follow the
next steps one at a time, and see if it helps.

1 - Be sure to install the correct driver for your specific graphic board. Not so obvious,
    because some manufacturers may have very specific versions. XFX is an example.
    
  - Reboot

  - Run your code again

2 - Check if your OpenGL API is good to go. Install OpenGL Extensions Viewer and check it.
    Run the renderer test if you need to.

3 - Install the latest DirectX. Test it with dxdiag.
 
  - Reboot

  - Run your code again

4 - If everything else fails, you could try to install Glide Wrapper 0.84c. It helps on some
    OpenGL problems. Configure it if you need.

Hope that helps,
Marchesi.

Subject: Hardcopy error when printing

From: Ben

Date: 6 May, 2010 16:03:04

Message: 4 of 5

"Bruno " <bruno.marchesi@gmail.com> wrote in message <hoack6$alm$1@fred.mathworks.com>...
> Hello,
>
> I was having this problem for some months. My specifics is that I have a development
> and a deployment machine. It was all good on the first, but on the second, it always
> came the 'UIW_SetUpGLPrinting' problem.
>
> The other rendereres (zbuffer and painters, as opposite to OpenGL) may not misbehave,
> but they also do not perform alpha blending, for instance, thus being somewhat
> useless in some cases.
>
> Now it has been solved. I believe this happens when the OpenGL API doesn't work as expected,
> and that could be for more than one cause. If you're having this issue, try to follow the
> next steps one at a time, and see if it helps.
>
> 1 - Be sure to install the correct driver for your specific graphic board. Not so obvious,
> because some manufacturers may have very specific versions. XFX is an example.
>
> - Reboot
>
> - Run your code again
>
> 2 - Check if your OpenGL API is good to go. Install OpenGL Extensions Viewer and check it.
> Run the renderer test if you need to.
>
> 3 - Install the latest DirectX. Test it with dxdiag.
>
> - Reboot
>
> - Run your code again
>
> 4 - If everything else fails, you could try to install Glide Wrapper 0.84c. It helps on some
> OpenGL problems. Configure it if you need.
>
> Hope that helps,
> Marchesi.


I doubt this is solely a problem with graphics drivers.

I have a script that produces 4 figures, each with several subfigures, containing mixtures of plot and meshc. Two of the figures (figure 1 and figure 2) render perfectly with OpenGL, but the others (figure 3 and figure 4) require painters or zbuffer (with OpenGL I get a black box and a 'UIW_SetUpGLPrinting' warning).

If it were a problem with drivers, I'd expect none of the figures to render properly. 2/4 is pretty mysterious...

Subject: Hardcopy error when printing

From: omegayen

Date: 6 May, 2010 20:46:04

Message: 5 of 5

"Ben " <drlightx@gmail.com> wrote in message <hrup7o$sh3$1@fred.mathworks.com>...
> "Bruno " <bruno.marchesi@gmail.com> wrote in message <hoack6$alm$1@fred.mathworks.com>...
> > Hello,
> >
> > I was having this problem for some months. My specifics is that I have a development
> > and a deployment machine. It was all good on the first, but on the second, it always
> > came the 'UIW_SetUpGLPrinting' problem.
> >
> > The other rendereres (zbuffer and painters, as opposite to OpenGL) may not misbehave,
> > but they also do not perform alpha blending, for instance, thus being somewhat
> > useless in some cases.
> >
> > Now it has been solved. I believe this happens when the OpenGL API doesn't work as expected,
> > and that could be for more than one cause. If you're having this issue, try to follow the
> > next steps one at a time, and see if it helps.
> >
> > 1 - Be sure to install the correct driver for your specific graphic board. Not so obvious,
> > because some manufacturers may have very specific versions. XFX is an example.
> >
> > - Reboot
> >
> > - Run your code again
> >
> > 2 - Check if your OpenGL API is good to go. Install OpenGL Extensions Viewer and check it.
> > Run the renderer test if you need to.
> >
> > 3 - Install the latest DirectX. Test it with dxdiag.
> >
> > - Reboot
> >
> > - Run your code again
> >
> > 4 - If everything else fails, you could try to install Glide Wrapper 0.84c. It helps on some
> > OpenGL problems. Configure it if you need.
> >
> > Hope that helps,
> > Marchesi.
>
>
> I doubt this is solely a problem with graphics drivers.
>
> I have a script that produces 4 figures, each with several subfigures, containing mixtures of plot and meshc. Two of the figures (figure 1 and figure 2) render perfectly with OpenGL, but the others (figure 3 and figure 4) require painters or zbuffer (with OpenGL I get a black box and a 'UIW_SetUpGLPrinting' warning).
>
> If it were a problem with drivers, I'd expect none of the figures to render properly. 2/4 is pretty mysterious...


Just following up on this issue...... I was formerly running Matlab 2009b on the machine with I originally posted...

Since then I have updated to Matlab 2010.

Now the saving of the figure actually will work on the machine properly as it should but only for a limited period of time.

I am running long codes that take hours and looping over many iterations which causes several different figures to be printed and thus saved with the command I stated originally. Now the issue is I get

Error using ==> subplotlayout
UIJ_AreThereWindowShowsPending - timeout waiting for window to show up

and then the hardcopy error as above comes up......

so now it appears to work for some time and then timeout and stop working....

so I suspect something changed in Matlab 2010 that helped fixed this issue although it still has problems

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us