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

Home » Public Forums » archive » Re: Keyword DLM crashes with IDL 5.2?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Keyword DLM crashes with IDL 5.2? [message #24884 is a reply to message #24883] Mon, 30 April 2001 09:57 Go to previous message
Randall Skelton is currently offline  Randall Skelton
Messages: 169
Registered: October 2000
Senior Member
I think I have figured out the answer to my own question...

replace: IDL_KWGetParams(argc,inargv,argk,kw_err,NULL,1)
with: IDL_KWGetParams(argc,inargv,argk,kw_err,argv,1)
^^^^
or any other valid IDL_VPTR pointer array.

From the EDG...

Plain_args is defined as an array of IDL_VPTR into which the
IDL_VPTRs of the positional arguments will be copied. This array must
have enough elements to hold the maximum possible number of positional
arguments as defined in IDL_SYSFUN_DEF2...

Reading the above suggests I need a finite array dimension as I am
expecting to pass 2 plain arguments. The root of my problem was in the
EDG Example code they pass a NULL and I assumed I should do the same. It
is somewhat surprising that it worked in IDL 5.3 and I didn't notice any
bizarre behavior...

Cheers,
Randall

On Mon, 30 Apr 2001, Randall Skelton wrote:

> Date: Mon, 30 Apr 2001 17:29:21 +0100
> From: Randall Skelton <rhskelto@atm.ox.ac.uk>
> Newsgroups: comp.lang.idl-pvwave
> Subject: Keyword DLM crashes with IDL 5.2?
>
> Hi all,
>
> I am trying to port a DLM that works in IDL 5.4/5.3 to work with IDL 5.2.
> As a demonstration of my problem I have modified the file testmodule.c to
> include a simple procedure called 'testr' that takes a keyword and
> distributed it below. It compiles under unix with:
>
> gcc -Wall -Wimplicit -fpic -shared -I/usr/local/PACK/idl-5.3/external
> testmodule.c -o testmodule.so
>
> Execution in IDL is:
>
> IDL> testr, 1, a, ERROR=b
> % Loaded DLM: TESTMODULE.
> IDL> print, a, b
> 10 0
>
> This routine compiles and works just fine under IDL 5.3, but it seg-faults
> during execution with IDL 5.2. Without the keywords, the procedure works
> fine, and I can trace the fault to calling 'IDL_KWGetParams' in IDL 5.2.
> I've read the relevant sections of the EDG at least twice over and after
> an afternoon of fiddling, I cannot find the bug. Any and all help is
> greatly appreciated!
>
> Randall
>
[Message index]
 
Read Message
Read Message
Previous Topic: Keyword DLM crashes with IDL 5.2?
Next Topic: how to speed up multiple regressions?

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

Current Time: Thu Oct 09 19:53:24 PDT 2025

Total time taken to generate the page: 0.00550 seconds