[vwnc] Problems accessing external C libraries (through SWIG interface)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[vwnc] Problems accessing external C libraries (through SWIG interface)

Stefano Franchi
Dear all,

I am trying to interface to an external library through an interface generated
by SWIG/smalltalk. I am not successful, however, and I am having problems
trying to find the source of the bug.
The external call fails with:

Unhandled exception: exception occured  #(11 140208237463482)

from the DLL&C documentation, it seems this error refers to a mismatch format
between what the C function expects and what VisualWorks is passing. I am not
so sure, though, because the documentation says:

> #'exception occurred' error code
>
> An exception occurred during an external call. The parameter is a platform-
> defined exception error code. This is currently supported only on Windows
> platforms where the code is that returned by _exception_code().

Later in the manual, a table about exception error codes informs me that

11 ERROR_BAD_FORMAT

Since I am on Linux, does any of that apply? Or is the information returned by
VW just meaningless junk on Linux?

Furthermore, trying to get to the actual C function call through the debugger
crashes the VM with this error (in a debug VM):

Assert fail @ 320 in ext/exCallC.c      !oopIsImm(oArgumentKinds) &&
objClass(oArgumentKinds) == sysOop(byteArrayClassX)  


Any help appreciated.

Cheers,

S.



______________________________________________________________
Stefano Franchi
Department of Philosophy          Ph:  (979) 862-2211
Texas A&M University              Fax: (979) 845-0458
305B Bolton Hall                  [hidden email]
College Station, TX 77843-4237
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Problems accessing external C libraries (through SWIG interface)

Eliot Miranda-2


On Wed, Jan 6, 2010 at 8:33 AM, Stefano Franchi <[hidden email]> wrote:
Dear all,

I am trying to interface to an external library through an interface generated
by SWIG/smalltalk. I am not successful, however, and I am having problems
trying to find the source of the bug.
The external call fails with:

Unhandled exception: exception occured  #(11 140208237463482)

IIRC, on linux the error number 11 refers to the signal number (11 = SIGSEGV) and the exception code is the pc at which it occurred.


from the DLL&C documentation, it seems this error refers to a mismatch format
between what the C function expects and what VisualWorks is passing. I am not
so sure, though, because the documentation says:

> #'exception occurred' error code
>
> An exception occurred during an external call. The parameter is a platform-
> defined exception error code. This is currently supported only on Windows
> platforms where the code is that returned by _exception_code().

Later in the manual, a table about exception error codes informs me that

11 ERROR_BAD_FORMAT

Since I am on Linux, does any of that apply? Or is the information returned by
VW just meaningless junk on Linux?

Furthermore, trying to get to the actual C function call through the debugger
crashes the VM with this error (in a debug VM):

Assert fail @ 320 in ext/exCallC.c      !oopIsImm(oArgumentKinds) &&
objClass(oArgumentKinds) == sysOop(byteArrayClassX)


Any help appreciated.

Cheers,

S.



______________________________________________________________
Stefano Franchi
Department of Philosophy          Ph:  (979) 862-2211
Texas A&M University              Fax: (979) 845-0458
305B Bolton Hall                  [hidden email]
College Station, TX 77843-4237
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] Problems accessing external C libraries (through SWIG interface)

Stefano Franchi
On 01/06/10, Eliot Miranda <[hidden email]> wrote:

>On Wed, Jan 6, 2010 at 8:33 AM, Stefano Franchi <[hidden email]
>
>> wrote:
>>
>> Dear all,
>>
>> I am trying to interface to an external library through an interface
>> generated
>> by SWIG/smalltalk. I am not successful, however, and I am having problems
>> trying to find the source of the bug.
>> The external call fails with:
>>
>> Unhandled exception: exception occured  #(11 140208237463482)
>
>IIRC, on linux the error number 11 refers to the signal number (11 =
>SIGSEGV) and the exception code is the pc at which it occurred.

Thanks Eliot,
        knowing it is a segmentation fault makes things clearer.

Cheers,

S.


______________________________________________________________
Stefano Franchi
Department of Philosophy          Ph:  (979) 862-2211
Texas A&M University              Fax: (979) 845-0458
305B Bolton Hall                  [hidden email]
College Station, TX 77843-4237
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

[vwnc] volume rendering in JUN

Jim Harsh
Hi,

I have a 3D array that's data values represent density of an object
in air. (The data ranges from 0.0 or there about to say 0.7.) Using
JUN's implementation of octrees I can display the data which is above
a threshold. What I'd really like to do is to use the alpha channel
to represent the density values so that the one can view the object
and see there are regions of higher or lower density in the object.
Currently all the voxels displayed are the same.

Any suggestions?

Thanks,
Jim

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] volume rendering in JUN

Henrik Sperre Johansen
On 08.01.2010 22:27, Jim Harsh wrote:

> Hi,
>
> I have a 3D array that's data values represent density of an object
> in air. (The data ranges from 0.0 or there about to say 0.7.) Using
> JUN's implementation of octrees I can display the data which is above
> a threshold. What I'd really like to do is to use the alpha channel
> to represent the density values so that the one can view the object
> and see there are regions of higher or lower density in the object.
> Currently all the voxels displayed are the same.
>
> Any suggestions?
>
> Thanks,
> Jim
>
>    
Switch to use the OpenGL interface included on 7.7/from Store.
I'm serious.
Getting this to work in Jun is just too much effort.

Here's a list of the things you'd need to do this easily, none of which
are easy to tack onto Jun
Either:
- 32bit texture support. (should be easier in 7.7)
- Do all raytracing /viewport adjustment on CPU (will still be dog slow)
Or:
(Hard on Windows, easier if you only need Mac/Linux support)
- Add Pixel shader support.
- Add 3dTexture/VBO support, depending on the range of graphic cards you
intend it to run on.

Cheers,
Henry
_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] volume rendering in JUN

Jim Harsh
In reply to this post by Jim Harsh
Thanks for the info Henry. I hope my 7.7 cd arrives soon., I'll take
a look when it does.

Jim

At 03:41 PM 1/8/2010, you wrote:

>On 08.01.2010 22:27, Jim Harsh wrote:
> > Hi,
> >
> > I have a 3D array that's data values represent density of an object
> > in air. (The data ranges from 0.0 or there about to say 0.7.) Using
> > JUN's implementation of octrees I can display the data which is above
> > a threshold. What I'd really like to do is to use the alpha channel
> > to represent the density values so that the one can view the object
> > and see there are regions of higher or lower density in the object.
> > Currently all the voxels displayed are the same.
> >
> > Any suggestions?
> >
> > Thanks,
> > Jim
> >
> >
>Switch to use the OpenGL interface included on 7.7/from Store.
>I'm serious.
>Getting this to work in Jun is just too much effort.
>
>Here's a list of the things you'd need to do this easily, none of which
>are easy to tack onto Jun
>Either:
>- 32bit texture support. (should be easier in 7.7)
>- Do all raytracing /viewport adjustment on CPU (will still be dog slow)
>Or:
>(Hard on Windows, easier if you only need Mac/Linux support)
>- Add Pixel shader support.
>- Add 3dTexture/VBO support, depending on the range of graphic cards you
>intend it to run on.
>
>Cheers,
>Henry
>_______________________________________________
>vwnc mailing list
>[hidden email]
>http://lists.cs

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc
Reply | Threaded
Open this post in threaded view
|

Re: [vwnc] volume rendering in JUN

Jim Harsh
In reply to this post by Jim Harsh
thanks for the suggestion, but I tried that and ran out of memory
part way though the first plane of data,  probably the way I was doing it.

Jim

At 06:45 PM 1/8/2010, you wrote:

>Hi Jim,
>
>Would it be possible to put different diameter spheres in each voxel, so
>that large diameter objects indicate greater density? I know, that's not
>nearly what you want. Another approach would be to simulate (at some
>expense) density using a random distribution of "points" in each voxel,
>more points in the dense volumes, etc. Not at all as nice as a fog
>effect, which I believe you're after. But, it might be easier over the
>short term.
>
>- Dave
>
>______________________________________________________________________
>Dave Wallen                      e-mail:  [hidden email]
>Development                       phone:  (707)620-0076 or (408)216-4580
>Cincom Systems, Inc.                fax:
>
>http://www.cincom.com/visualworks
>
>______________________________________________________________________
>
>
> > -----Original Message-----
> > From: [hidden email] [mailto:[hidden email]] On
>Behalf
> > Of Jim Harsh
> > Sent: Friday, January 08, 2010 1:28 PM
> > To: [hidden email]
> > Subject: [vwnc] volume rendering in JUN
> >
> > Hi,
> >
> > I have a 3D array that's data values represent density of an object
> > in air. (The data ranges from 0.0 or there about to say 0.7.) Using
> > JUN's implementation of octrees I can display the data which is above
> > a threshold. What I'd really like to do is to use the alpha channel
> > to represent the density values so that the one can view the object
> > and see there are regions of higher or lower density in the object.
> > Currently all the voxels displayed are the same.
> >
> > Any suggestions?
> >
> > Thanks,
> > Jim
> >
> > _______________________________________________
> > vwnc mailing list
> > [hidden email]
> > http://lists.cs.uiuc.edu/mailman/listinfo/vwnc

_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc