Re: segmentation fault and netcdf/mex problems - R14S3/Red Hat <long>



<snip>

> The MEXEXT command gives the extension MEX files need to have to be
> recognized on your system. For 32-bit Linux, MEXEXT should return mexglx;
> for 64-bit Linux, if I'm not mistaken, it should return mexa64. Therefore,
> on machine B, your MEX file will need to be named netcdf.mexa64 to be
> recognized. You shouldn't just rename the MEX file, though -- I'd recompile
> it or see if the location where you obtained the library before has a 64-bit
> version of this file.

Ah, yes, Computer B would like mexa64 files instead. I will look for a
64-bit version and have this recompiled.


> > This is very reproducable, but only on Computer B (yes, I should send
> > this to support, all 20 files involved). I do not get a segmentation
> > fault if I print a simpler figure with the same command, only when I
> > try to print my complicated figure (which has an imported jpg
> > background overlain with several thousand line segments). For example,
> > if I plot only the background image, then use the same print -djpeg
> > command, Matlab prints with no problems.
>
> Since you have a figure with which you can consistently reproduce the
> failure, please send it in to our support staff as a FIG file -- they will
> let you know if they need the code to recreate the figure. Also, as a
> potential workaround, try changing the Renderer property of your figure
> before printing. I believe, from the stack trace, that it's set to
> 'zbuffer' -- try setting it to 'painters' or 'opengl' and see if the
> segmentation fault still occurs.

I will send in the FIG file to support. I tried setting the renderer
to both painters and opengl (by adding '-painters' or '-opengl' into
the print command list); neither of these worked.

> > Are these problems possibly related? Has the netcdf library become
> > corrupted in the transfer from Computer A to B, or could there be a
> > deeper mex-related problem? Is there any other way I can output a jpg
> > with a set size and resolution aside from the print command?
>
> Probably not; probably not, I think you're trying to use a MEX file for
> 32-bit Linux on 64-bit Linux; and look at the IMWRITE function,
> respectively.

Does the IMWRITE command support assigned resolution? I need to output
a jpg which is 4096x2048 in size, and have been using the combination

set(gcf,'PaperUnits','inches','PaperPosition',[0 0 16 8]);
print('-djpeg',outname,'-r256');

to get the right output size. The options for the jpg type in
'imwrite' do not include resolution.

I have noticed that Matlab sometimes gives a segmentation fault when I
exit or quit on the new Computer B (by entering "exit" at the command
line) - the program looks like it is quitting normally, but the
terminal window gives a segmentation fault. This is erratic and I am
not sure yet if there is a combination of events which makes it
reproducable.

Thank you for your help,
-Nikki

.



Relevant Pages

  • Re: mexPrintf output delayed
    ... user inputs. ... Because of that I'm having the MEX file periodically output ... something to the command window to let the user know that it's working. ... if the MEX file is called from within a script or another ...
    (comp.soft-sys.matlab)
  • Re: the system command on unix
    ... We can check that running the dos set command like ... I wrote a little mex file that is able to the job. ... If that's the case any environment ... therefore wrapping putenv() in a MEX file? ...
    (comp.soft-sys.matlab)
  • Re: Find neighbor points for given voronoi polygon
    ... I used Matlab 7.0.1 in XP. ... I then checked command below: ... I am new to work with a MEX file and I ... Any idea how can I get the header file for this Mex ...
    (comp.soft-sys.matlab)
  • [SLE] Foo Billiards broke.
    ... When foobillard runs it opens a window filled with a black background for a ... [snip -- several pages of command line options] ... Segmentation Fault ... ldd reports these libraries are being loaded: ...
    (SuSE)
  • Re: Getting a "Segmentation Fault" when running on Linux
    ... copies the standard input to standard output and to the file provided ... command line it will append the output at the end of the file. ... it i get a segmentation fault. ... Where is tempBuf provided a value. ...
    (comp.lang.c)