On Sun, 2010-01-10 at 20:18 +0100, Erik Hofman wrote:
> Geoff McLane wrote:
> > Hi all,
> 
> > But in Ubuntu 8.04 LTS, now get an error exit when running the
> > default c172... it ran great a few days ago, when I reported
> > all seemed well... but now...
> 
> > Running it under gdb, and setting a break point
> > at SGSoundMgr::load(), and on the 2nd time 
> > through this function, got the trace attached...
> > 
> > Essentially from the lines of code -
> > 
> > 555       data = alutLoadMemoryFromFile(samplepath.c_str(), &format,
> > &size, &freqf );
> > 556       freq = (ALsizei)freqf;
> > 557       int error = alutGetError();
> > 558       if (data == NULL || error != ALUT_ERROR_NO_ERROR) {
> > 
> > the 'data' is NULL, but even if it was not, additionally 
> > 'error' contains a value 518 (0x206)...
> > 
> > Again, I though I had read this before in a recent board
> > message, and thought a CVS 'fix' had been made, but now not
> > so sure...
> 
> At least it's not the latest CVS code, this code has been replaced by a 
> (supposedly) better check.
> 
> Erik
> 
Hi Erik,

Thank you for the reply, but now I am even more
confused ;=()

This is the soundmgr_openal.cxx I have...
~/fg/fg7/simgear/source/simgear/sound$ cvs status soundmgr_openal.cxx
===================================================================
File: soundmgr_openal.cxx  Status: Up-to-date

   Working revision: 1.87
   Repository revision:
1.87  /var/cvs/SimGear-0.3/source/simgear/sound/soundmgr_openal.cxx,v
   Sticky Tag:    (none)
   Sticky Date:      (none)
   Sticky Options:   (none)

And that contains the code, in function SGSoundMgr::load()
...
#if defined(ALUT_API_MAJOR_VERSION) && ALUT_API_MAJOR_VERSION >= 1
    ALfloat freqf;
    data = alutLoadMemoryFromFile(samplepath.c_str(), &format, &size,
&freqf );
    freq = (ALsizei)freqf;
    int error = alutGetError();
    if (data == NULL || error != ALUT_ERROR_NO_ERROR) {
        string msg = "Failed to load wav file: ";
        msg.append(alutGetErrorString(error));
        throw sg_io_exception(msg.c_str(), sg_location(samplepath));
        return false;
    }

#else

You mean ALUT_API_MAJOR_VERSION should NOT be defined,
or be less than 1???

The included file, through #include <AL/alut.h>, which in
my case is in /usr/include/AL/alut.h, contains :-
#define ALUT_API_MAJOR_VERSION                 1
#define ALUT_API_MINOR_VERSION                 1

Is this the WRONG alut.h??? But it all works fine 
with the simple 'hello world' OpenAL sample code...
And doing 'make check' in SG/sound, openal_test1,
2, and 3, each seem to run ok...

And when I tried a compile using the 'alternative'
coded alutLoadWAVFile() I get a warning that this is
'depreciated', and get the SAME error exit
anyway... and the code changes, checking that
alutGetErrorString(error) returns a value is
only in this 'alternate' code...

As stated, getting confused... Is there anything
else I can try, check, install? As advised, it all
ran fine a week or so ago...

Regards,

Geoff.

gdb debug text: http://geoffair.net/tmp/gdb-02.txt




------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to