[MPlayer-cygwin] Re: Segmentation Fault

Andy Burgess andyburgess at argonet.co.uk
Wed May 17 21:42:55 CEST 2006


Hi,

> >       7 [main] mplay 180 _cygtls::handle_exceptions: Error 
while dumping state (
> > probably corrupted stack)
> > Segmentation fault (core dumped)

I've just recently had *exactly* the same error and the fix is quite simple:

What I had in mine was a variable called buffer of size 80 - i.e. 

   char buffer[80]="";

I then added a new file to read with larger records than the original 
80 characters and issued a 

   fgets(file,500,buffer)

My file had about 90 records in it.

Having just today looked up about Corrupted Stacks at 

http://www.awprofessional.com/articles/article.asp?p=430402&seqNum=5&rl=1

I realised that what was happening was: that because of my over-running, 
the data I was putting into my "buffer" field was so great I was now 
corrupting my program stack (where it keeps details of all the addresses of
subroutines etc - so I understand). 

Hence the program was lost when it ended - it couldn't clean up properly!

You'll probably need to compare both programs and see which variable 
you're exceeding the size of.

HTH

Andy Burgess






More information about the MPlayer-cygwin mailing list