Nikolaj Thygesen | 1 Mar 23:46
Picon

Re: OpenEXR from shared libs.

    I must shamefully admit that the pure virtual msg of my previous 
mail was caused by some debugging code of mine :o/ Though after fixing 
this, my code still Seg-faults a while after finishing reading the 
image, which, in some cases, I get to see. I don't know what would 
happen if running my EXR code compiled into my main program instead of 
keeping it in an .so as is presently the case.
    I know 1.2.2 is a tad old, so I tried to build 1.4.0a myself, and 
run "make check" which yielded the following partial output when 
checking the RGBA interface:

file with missing and broken scan lines
writing
reading one scan line at a time, comparing
reading multiple scan lines at a time, comparing

number of threads: 1
channels RGBA, line order 0, compression 0
channels RGB, line order 0, compression 0
channels A, line order 0, compression 0
channels RB, line order 0, compression 0
channels RGBA, line order 0, compression 1
channels RGB, line order 0, compression 1
channels A, line order 0, compression 1
channels RB, line order 0, compression 1
channels RGBA, line order 0, compression 2
channels RGB, line order 0, compression 2
channels A, line order 0, compression 2
channels RB, line order 0, compression 2
channels RGBA, line order 0, compression 3
channels RGB, line order 0, compression 3
(Continue reading)

Jim Hourihan | 2 Mar 00:50

Re: OpenEXR from shared libs.


I have had problems when building newer versions of EXR: sometimes  
the build picks up my installed (older headers).  This is certainly  
caused by something in my environment, but you might want to nuke the  
existing install before building the newer version like I do. Perhaps  
you're having a similar problem.

	-Jim

On Mar 1, 2007, at 2:46 PM, Nikolaj Thygesen wrote:

>    I must shamefully admit that the pure virtual msg of my previous  
> mail was caused by some debugging code of mine :o/ Though after  
> fixing this, my code still Seg-faults a while after finishing  
> reading the image, which, in some cases, I get to see. I don't know  
> what would happen if running my EXR code compiled into my main  
> program instead of keeping it in an .so as is presently the case.
>    I know 1.2.2 is a tad old, so I tried to build 1.4.0a myself,  
> and run "make check" which yielded the following partial output  
> when checking the RGBA interface:
>
> file with missing and broken scan lines
> writing
> reading one scan line at a time, comparing
> reading multiple scan lines at a time, comparing
>
> number of threads: 1
> channels RGBA, line order 0, compression 0
> channels RGB, line order 0, compression 0
> channels A, line order 0, compression 0
(Continue reading)

Florian Kainz | 2 Mar 01:24

Re: OpenEXR from shared libs.

I have never seen this particular failure.
Is anyone else using openexr-1.4.0 on FreeBSD?
If you are, do the confidence tests work for you?

Nikolaj Thygesen wrote:
>    I must shamefully admit that the pure virtual msg of my previous mail 
> was caused by some debugging code of mine :o/ Though after fixing this, 
> my code still Seg-faults a while after finishing reading the image, 
> which, in some cases, I get to see. I don't know what would happen if 
> running my EXR code compiled into my main program instead of keeping it 
> in an .so as is presently the case.
>    I know 1.2.2 is a tad old, so I tried to build 1.4.0a myself, and run 
> "make check" which yielded the following partial output when checking 
> the RGBA interface:
> 
> file with missing and broken scan lines
> writing
> reading one scan line at a time, comparing
> reading multiple scan lines at a time, comparing
> 
> number of threads: 1
> channels RGBA, line order 0, compression 0
> channels RGB, line order 0, compression 0
> channels A, line order 0, compression 0
> channels RB, line order 0, compression 0
> channels RGBA, line order 0, compression 1
> channels RGB, line order 0, compression 1
> channels A, line order 0, compression 1
> channels RB, line order 0, compression 1
> channels RGBA, line order 0, compression 2
(Continue reading)

darby johnston | 2 Mar 20:06
Picon
Favicon

Re: OpenEXR from shared libs.

--- Florian Kainz <kainz <at> ilm.com> wrote:

> I have never seen this particular failure.
> Is anyone else using openexr-1.4.0 on FreeBSD?
> If you are, do the confidence tests work for you?

Just tried on FreeBSD 6.2 x86 and got a seg fault at
the same place. Looks like it has something to with
threads?

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x80e1400 (LWP 100079)]
Imf::(anonymous namespace)::hufBuildEncTable
(frq=0xbf85bd70, im=0xbf85bd68,
    iM=0xbf85bd6c) at ImfHuf.cpp:276
276     {
(gdb) where
#0  Imf::(anonymous namespace)::hufBuildEncTable
(frq=0xbf85bd70, im=0xbf85bd68, iM=0xbf85bd6c) at
ImfHuf.cpp:276
#1  0x281034a3 in Imf::hufCompress (raw=0x812d000,
nRaw=30336, compressed=0x813d77f "") at
ImfAutoArray.h:81
#2  0x28105e4d in Imf::PizCompressor::compress
(this=0x80e49c0, inPtr=0x819cd00 "", inSize=60672,
range=Error accessing memory address 0x60: Bad
address.
) at ImfPizCompressor.cpp:478
#3  0x2810610d in Imf::PizCompressor::compress
(this=0x80e49c0, inPtr=0x818e000 "", inSize=60672,
(Continue reading)

Florian Kainz | 2 Mar 20:42

Re: OpenEXR from shared libs.

Is it possible that you are running into the same problem
as Jim Hourihan, where the build conflicts with an older
version that's already installed?

Without access to FreeBSD, I don't know how to debug this issue.

darby johnston wrote:
> --- Florian Kainz <kainz <at> ilm.com> wrote:
> 
>>I have never seen this particular failure.
>>Is anyone else using openexr-1.4.0 on FreeBSD?
>>If you are, do the confidence tests work for you?
> 
> Just tried on FreeBSD 6.2 x86 and got a seg fault at
> the same place. Looks like it has something to with
> threads?
> 
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 0x80e1400 (LWP 100079)]
> Imf::(anonymous namespace)::hufBuildEncTable
> (frq=0xbf85bd70, im=0xbf85bd68,
>     iM=0xbf85bd6c) at ImfHuf.cpp:276
> 276     {
> (gdb) where
> #0  Imf::(anonymous namespace)::hufBuildEncTable
> (frq=0xbf85bd70, im=0xbf85bd68, iM=0xbf85bd6c) at
> ImfHuf.cpp:276
> #1  0x281034a3 in Imf::hufCompress (raw=0x812d000,
> nRaw=30336, compressed=0x813d77f "") at
> ImfAutoArray.h:81
(Continue reading)

darby johnston | 3 Mar 00:05
Picon
Favicon

Re: OpenEXR from shared libs.

--- Florian Kainz <kainz <at> ilm.com> wrote:

> Is it possible that you are running into the same
> problem
> as Jim Hourihan, where the build conflicts with an
> older
> version that's already installed?

I double-checked with ldd and it looked ok.

> Without access to FreeBSD, I don't know how to debug
> this issue.

Disabling threading seems to be a workaround.

Also, after looking at the stack trace I tried running
the tests with threading enabled, but without using
PIZ compression, and the tests passed.
Jim Hourihan | 3 Mar 00:47

Re: OpenEXR from shared libs.


On Mar 2, 2007, at 3:05 PM, darby johnston wrote:

> --- Florian Kainz <kainz <at> ilm.com> wrote:
>
>> Is it possible that you are running into the same
>> problem
>> as Jim Hourihan, where the build conflicts with an
>> older
>> version that's already installed?
>
> I double-checked with ldd and it looked ok.

That won't tell you. The problem I was describing occurs when  
building the new version of EXR in the presence of an existing  
install -- if the new build picks up "mildly" compatible .h files you  
can get a skewed build of EXR (this is only possible in certain  
unlikely circumstances, yet it has happened to me).

The only way to be sure is to remove the installed EXR include files.

	-Jim
Florian Kainz | 3 Mar 01:13

Re: OpenEXR from shared libs.

Darby, Nikolaj,

I wonder if the problem has something to do with the size
of the stack when threads are enabled.  Could you please
try this:

In file IlmImf/ImfAutoArray.h, replace the line that reads

     #if defined (HAVE_DARWIN) || defined (_WIN32) || defined (_WIN64)

with

     #if 1

Then rebuild from scratch and re-run the convidence tests.

Florian

darby johnston wrote:
> --- Florian Kainz <kainz <at> ilm.com> wrote:
> 
>>Is it possible that you are running into the same
>>problem
>>as Jim Hourihan, where the build conflicts with an
>>older
>>version that's already installed?
> 
> I double-checked with ldd and it looked ok.
> 
>>Without access to FreeBSD, I don't know how to debug
(Continue reading)

darby johnston | 3 Mar 01:18
Picon
Favicon

Re: OpenEXR from shared libs.

--- Jim Hourihan <jimh <at> tweakfilms.com> wrote:

> On Mar 2, 2007, at 3:05 PM, darby johnston wrote:
> 
> > I double-checked with ldd and it looked ok.
> 
> That won't tell you.

I checked and there's no other versions of exr
installed.

Darby
darby johnston | 3 Mar 02:20
Picon
Favicon

Re: OpenEXR from shared libs.


--- Florian Kainz <kainz <at> ilm.com> wrote:

> I wonder if the problem has something to do with the
> size
> of the stack when threads are enabled.

Nice one; looks like that fixed it. 

How about:

#if defined (HAVE_DARWIN) || defined (_WIN32) \
  || defined (_WIN64) || defined(__FreeBSD__)

Or would a test in the configure script be better?

Thanks, Darby

Gmane