Jump to content


OpenAL + Ogg seg fault


3 replies to this topic

#1 ryutenchi

    New Member

  • Members
  • Pip
  • 4 posts

Posted 24 March 2008 - 01:42 AM

When following this tutorial:
http://www.devmaster...als/lesson8.php
I changed some names but for the most part it the same, but on exit the unloading of the ogg file segfaults in linux. here is the backtrace:
[Thread 0x40800950 (LWP 7358) exited]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x2b84fcef47f0 (LWP 7355)]
0x00002b84fcce02d3 in pthread_mutex_lock () from /lib/libpthread.so.0
(gdb) bt
#0 0x00002b84fcce02d3 in pthread_mutex_lock () from /lib/libpthread.so.0
#1 0x00002b84fb3adf42 in alSourceUnqueueBuffers ()
from /usr/lib/libopenal.so.0
#2 0x0000000000402824 in ~SSource (this=0x7fffafb2b9b0) at ssource.h:91
#3 0x0000000000402e3f in main (argc=1, argv=0x7fffafb2c318)
at testALwrapper.cpp:93

Any ideas? I put the empty/release code in the deconstructor. I see that it is flipping out on the alSourceUnqueueBuffers() because of some issue with pthreads but honestly I have no clue why or how to fix it. The program this is going to be used for will need to load and unload OGG files at well so this is really giving me issues. OH and last but not lease if you notice the update() code also calls UnquequeBuffers without a fault so... that just makes me that much more lost.

-Ryu

#2 Kenneth Gorking

    Senior Member

  • Members
  • PipPipPipPip
  • 939 posts

Posted 24 March 2008 - 02:00 PM

My immediate guess would be that your have accidentally deleted the source and/or buffer before the call to alSourceUnqueueBuffers.
"Stupid bug! You go squish now!!" - Homer Simpson

#3 ryutenchi

    New Member

  • Members
  • Pip
  • 4 posts

Posted 25 March 2008 - 03:12 AM

well I found the problem.

the following code is returning this "in ogg decon
# of buffers queued 6312384"

std::cout<<"in ogg decon "<<std::endl;
ALint temp;
alGetSourcei(source,AL_BUFFERS_QUEUED, &temp);
std::cout<<"# of buffers queued "<<temp<<std::endl;

so the GET is returning the wrong # of buffers that are queued.... any ideas?

#4 ryutenchi

    New Member

  • Members
  • Pip
  • 4 posts

Posted 27 April 2008 - 10:42 AM

sorry to double post, but I finally fixed it.
I wasn't killing the ogg before calling alutExit(); [didn't delete the object before running it]

thanks anyways^^;





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users