From: Bruno on 10 Feb 2010 11:22 Update: it worked at development. At deployment, there was a problem. At the machine where Matlab is installed, the .exe runs with Matlab opened and closed as well. At the deployment machine, this is the first time the .exe misbehaved, the new statement is: set(handleImage,'InvertHardcopy','off'); % new statement print(['-f',int2str(handleImag)],'-dpng',... % this was ok [dialog.outputPath dialog.outputFilename '.png']) At the deployment machine, the .exe gives the following dump. What should be done? Marchesi --------------------------------------------------------------------------------- v ----dump start Warning: Problems in UIW_SetUpGLPrinting > In graphics\private\render at 143 In print at 277 In posproc003b at 39 In rodando at 62 ??? Error using ==> print at 325 Bad data returned by HARDCOPY. Not calling IMWRITE. Error in ==> posproc003b at 39 Error in ==> rodando at 62 MATLAB:render:badData Warning: 1 invisible figure(s) exist at MCR termination. If your application has terminated unexpectedly, please note that applications generated by the MATLAB Compiler terminate when there are no visible figure windows. See the documentation for WaitForFiguresToDie and WAITFORCALLBACKS for more information. Warning: Class 'graph2d.lineseries' in use at MCR termination. If your application has terminated unexpectedly, please note that applications generated by the MATLAB Compiler terminate when there are no visible figure windows. See the documentation for WaitForFiguresToDie and WAITFORCALLBACKS for more information. --------------------------------------------------------------------------------- ^ ----dump end
From: Matthew Whitaker on 19 Feb 2010 11:08 "Bruno " <bruno.marchesi(a)gmail.com> wrote in message <hkumfg$4nb$1(a)fred.mathworks.com>... > Update: it worked at development. At deployment, there was a problem. > > At the machine where Matlab is installed, > the .exe runs with Matlab opened and closed as well. > > At the deployment machine, > this is the first time the .exe misbehaved, > the new statement is: > > set(handleImage,'InvertHardcopy','off'); % new statement > print(['-f',int2str(handleImag)],'-dpng',... % this was ok > [dialog.outputPath dialog.outputFilename '.png']) > > > At the deployment machine, the .exe gives the following dump. > > What should be done? > > Marchesi > > --------------------------------------------------------------------------------- v ----dump start > Warning: Problems in UIW_SetUpGLPrinting > > In graphics\private\render at 143 > In print at 277 > In posproc003b at 39 > In rodando at 62 > ??? Error using ==> print at 325 > Bad data returned by HARDCOPY. Not calling IMWRITE. > > Error in ==> posproc003b at 39 > > > > Error in ==> rodando at 62 > > > > MATLAB:render:badData > Warning: 1 invisible figure(s) exist at MCR termination. > > If your application has terminated unexpectedly, please note that > applications generated by the MATLAB Compiler terminate when there are no > visible figure windows. See the documentation for WaitForFiguresToDie and > WAITFORCALLBACKS for more information. > > Warning: Class > 'graph2d.lineseries' > in use at MCR termination. > > If your application has terminated unexpectedly, please note that > applications generated by the MATLAB Compiler terminate when there are no > visible figure windows. See the documentation for WaitForFiguresToDie and > WAITFORCALLBACKS for more information. > --------------------------------------------------------------------------------- ^ ----dump end For deployed applications you have to use deployprint
From: Bruno on 23 Feb 2010 12:24
> For deployed applications you have to use deployprint Thank you. Indeed, that is the most apropriated function. However, it's still nogo. Same error: Warning: Problems in UIW_SetUpGLPrinting > > > In graphics\private\render at 143 > > In print at 277 > > In posproc003b at 39 > > In rodando at 62 > > ??? Error using ==> print at 325 > > Bad data returned by HARDCOPY. Not calling IMWRITE. UIW_SetUpGLPrinting has appeared some times at the newsgroup, apparently with no solution. I decided to use getframe( ). Whilst it works at the deploy machine (industrial PC), it has two disadvantages. Even with set(gcf,'Visible','off'); the image is forced to appear during the capture. Secondly, if some 'always on top' application is running, the capture can be jammed with it. Like task manager and so. getframe(), print() and deployprint() all work in the machine with Matlab installed. Only getframe() work at the deploy machine. I've tried a 'repair' in .net framework and MCR installer at the deploy machine, but the code still bugs. Marchesi |