comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Segmentation fault (core dumped)
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Segmentation fault (core dumped) [message #92784] Sat, 27 February 2016 05:54 Go to next message
rojofija is currently offline  rojofija
Messages: 9
Registered: January 2015
Junior Member
Dear friends,

I am kindly writing in this opportunity to ask advises regarding to a segmentation fault issue while running a shell command with spawn in idl.


When I run the command directly in the shell it works perfectly, but when I run the same command in spawn it produces a segmentation fault.

Does anyone has experienced something similar?. If yes, Any suggestion about how to solve it?.

All the best and thanks in advance,

rojofija.
Re: Segmentation fault (core dumped) [message #92785 is a reply to message #92784] Sat, 27 February 2016 09:14 Go to previous messageGo to next message
dg86 is currently offline  dg86
Messages: 118
Registered: September 2012
Senior Member
On Saturday, February 27, 2016 at 8:54:36 AM UTC-5, rojofija wrote:
> Dear friends,
>
> I am kindly writing in this opportunity to ask advises regarding to a segmentation fault issue while running a shell command with spawn in idl.
>
>
> When I run the command directly in the shell it works perfectly, but when I run the same command in spawn it produces a segmentation fault.
>
> Does anyone has experienced something similar?. If yes, Any suggestion about how to solve it?.
>
> All the best and thanks in advance,
>
> rojofija.

Tell us the version of IDL, the platform (Windows, linux, mac, ...) and the actual command
that cases the segmentation fault.

TTFN,

David
Re: Segmentation fault (core dumped) [message #92802 is a reply to message #92785] Wed, 02 March 2016 06:33 Go to previous messageGo to next message
rojofija is currently offline  rojofija
Messages: 9
Registered: January 2015
Junior Member
Dear David,

The machine I am using has Linux Ubuntu 14.04.4 with IDL 8.4.

The program I am trying to use is related with the analysis of astronomical images: http://spiff.rit.edu/ensemble/

Basically the command that is causing troubles in spawn is called solvepht which runs well directly in the terminal but not when I use it with spawn as:

spawn, 'solvepht infile=multipht.out mconst=12.0 outfile=solvepht.out imfile=solvepht.img sigfile=solvepht.sig'

or

spawn, 'solvepht '+'infile=multipht.out mconst=12.0 outfile=solvepht.out imfile=solvepht.img sigfile=solvepht.sig'

Details of the command can be found at http://spiff.rit.edu/ensemble/ensemble-latest/ensemble.html

After running it with spawn I get the error:

Segmentation fault (core dumped)

I cannot figure it out why it runs well when I run it directly in the shell but not when I run it with spawn.

In the shell it runs as:

solvepht infile=multipht.out mconst=12.0 outfile=solvepht.out imfile=solvepht.img sigfile=solvepht.sig


Any feedback is very welcome.

All the best and thanks in advance.
Roberto.

On Saturday, 27 February 2016 17:14:19 UTC, David Grier wrote:
> On Saturday, February 27, 2016 at 8:54:36 AM UTC-5, rojofija wrote:
>> Dear friends,
>>
>> I am kindly writing in this opportunity to ask advises regarding to a segmentation fault issue while running a shell command with spawn in idl.
>>
>>
>> When I run the command directly in the shell it works perfectly, but when I run the same command in spawn it produces a segmentation fault.
>>
>> Does anyone has experienced something similar?. If yes, Any suggestion about how to solve it?.
>>
>> All the best and thanks in advance,
>>
>> rojofija.
>
> Tell us the version of IDL, the platform (Windows, linux, mac, ...) and the actual command
> that cases the segmentation fault.
>
> TTFN,
>
> David
Re: Segmentation fault (core dumped) [message #92803 is a reply to message #92802] Wed, 02 March 2016 10:21 Go to previous message
dg86 is currently offline  dg86
Messages: 118
Registered: September 2012
Senior Member
On Wednesday, March 2, 2016 at 9:33:14 AM UTC-5, rojofija wrote:
> Dear David,
>
> The machine I am using has Linux Ubuntu 14.04.4 with IDL 8.4.
>
> The program I am trying to use is related with the analysis of astronomical images: http://spiff.rit.edu/ensemble/
>
> Basically the command that is causing troubles in spawn is called solvepht which runs well directly in the terminal but not when I use it with spawn as:
>
> spawn, 'solvepht infile=multipht.out mconst=12.0 outfile=solvepht.out imfile=solvepht.img sigfile=solvepht.sig'
>
> or
>
> spawn, 'solvepht '+'infile=multipht.out mconst=12.0 outfile=solvepht.out imfile=solvepht.img sigfile=solvepht.sig'
>
> Details of the command can be found at http://spiff.rit.edu/ensemble/ensemble-latest/ensemble.html
>
> After running it with spawn I get the error:
>
> Segmentation fault (core dumped)
>
> I cannot figure it out why it runs well when I run it directly in the shell but not when I run it with spawn.
>
> In the shell it runs as:
>
> solvepht infile=multipht.out mconst=12.0 outfile=solvepht.out imfile=solvepht.img sigfile=solvepht.sig
>
>
> Any feedback is very welcome.
>
> All the best and thanks in advance.
> Roberto.
>
> On Saturday, 27 February 2016 17:14:19 UTC, David Grier wrote:
>> On Saturday, February 27, 2016 at 8:54:36 AM UTC-5, rojofija wrote:
>>> Dear friends,
>>>
>>> I am kindly writing in this opportunity to ask advises regarding to a segmentation fault issue while running a shell command with spawn in idl.
>>>
>>>
>>> When I run the command directly in the shell it works perfectly, but when I run the same command in spawn it produces a segmentation fault.
>>>
>>> Does anyone has experienced something similar?. If yes, Any suggestion about how to solve it?.
>>>
>>> All the best and thanks in advance,
>>>
>>> rojofija.
>>
>> Tell us the version of IDL, the platform (Windows, linux, mac, ...) and the actual command
>> that cases the segmentation fault.
>>
>> TTFN,
>>
>> David

Dear Roberto,

This is going to be challenging to debug. The first four things that come to my mind are

1. solvepht might depend on environment variables that are not set, or are not set
appropriately under the shell the IDL spawns. This shouldn't cause a segmentation
fault, but might exercise a bug in solvepht. One way to check this would be to
see what environment variables are set in your normal shell (bash?) by running
printenv, and comparing these with environment variables defined within IDL
(perhaps by using GETENV()). I'd be surprised if this were the problem, but it's
easy to check.

2. solvepht might care about the kind of shell that it's running under. SPAWN usually
invokes bash on linux machines. You might look into the /SH flag to SPAWN, which lets
you change that. Again, I'd be surprised if this were the problem, but ...

3. solvepht may rely on a shared library that IDL also uses. In that case, IDL may load
an incompatible version of the library, leading to a crash. This is somewhat likely -- it's
bitten me. You'll have to see what libraries are loaded by solvepht (ldd solvepht), and then
check if IDL uses the same libraries. Resolving such a conflict involves making sure
that idl loads the version of the library it needs while solvepht loads the version it needs
without collisions. This can be handled by invoking solvepht with environment
variables specified on the command line, but can be tricky to get right.

4. solvepht might open its own graphics windows. Sometimes this leads to collisions
with IDL. It would be best under these circumstances to run solvepht without graphical
output (if that's possible).

None of these might be the right direction for you. These are just my first thoughts.

All the best,

David
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: TRICKY TASK USING AWK
Next Topic: Labeling logarithmic axes

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 09:22:17 PDT 2025

Total time taken to generate the page: 0.00552 seconds