[BUG] minor MPEG bug under Linux?

Karl Ramberg karl.ramberg at chello.se
Sat Aug 11 06:56:06 UTC 2001


John Hinsley wrote:
> 
> Karl Ramberg wrote:
> >
> > John Hinsley wrote:
> > >
> > > Karl Ramberg wrote:
> > > >
> > > > Lex Spoon wrote:
> > > > >
> > > > > > > Odd.  The only way I can see for primHasVideo: to fail is if the
> > > > > > > "handle" argument isn't a valid file handle.  e.g., it is nil, or it
> > > > > > > isn't a ByteArray...  I wonder how that could ever happen?
> > > > > >
> > > > > > Stranger still, it doesn't always happen: sometimes I open up Squeak and
> > > > > > there is no debugger! But this is nowt but a (very) minor annoyance:
> > > > > > I'll go buy another sound card and see what happens.
> > > > > >
> > > > >
> > > > > Whoa, open MPEG files don't survive snapshot+restart, any more than open
> > > > > FileStreams.  If you reload an image, you need to reopen your MPEG
> > > > > files, too.
> > > > >
> > > > > (Arguably, they should try to do a re-open, but currently they don't.)
> > > >
> > > > They should do... both John and I have added support for that in the
> > > > various classes.
> > > > Karl
> > >
> > > Well, I'm not sure what *should* happen ;-) But this error can generally
> > > be reproduced (on my system at least).
> > >
> > > SuSE 6.4, glibc 2.1.3, Squeak 3.1a 4173 built from Lex's sources. squeak
> > > -memory 60m
> > >
> > > Ok, open up an mpeg morph and load and play an mpeg.
> > Which of them: the crude orange one (MPEGPlayerMorph)
> > or the nicer blue one (MPEGMoviePlayerMorph)?
> 
> Let's see. So far I've used the Orange one (I like the file dialog
> better -- typically messy *nix file structure! -- although I admit that
> the blue one is much more fully fearured). I've yet to reproduce the
> problem with the blue one.
> 
> >
> > > Use the X halo to collapse the morph.
> > The X handle (halo) that deletes the morph ?
> 
> Yep
> >
> > > Save and quit. Re-start Squeak. 8 times out of 10,
> > > the debugger pops up.
> > Whats in the debugger ?
> 
> Error: a primitive has failed
> MPEGFile(Object)>>error:
> MPEGFile(Object)>>primitiveFailed
> MPEGFile>>primHasVideo:
> MPEGFile>>hasVideo
> [] in MPEGPlayer2>>playAudio:
> [] in BlockContext>>newProcess

Have you checked in the processBrowser to see if a process is still hanging
on in there after you deleted the morph ? 
Could it be that the audio process will keep on running for some strange 
reason when sound has failed somehow  ?

 but why does it not throw a debugger when the mpeg is open ?
This is strange...

The blue movie player does not do any of
the process stuff the orange player does, it uses the safer and more adequate
morphic stepping stuff. The file dialog stuff should be easy to put into
the blue
one, I'll post a change set asap.

Karl
> 
> The concatenated file outs attached.
> 
> >My first guess is that this is a bug that
> > occur on *nix because the MPEGfile path is invalid.
> > I did some hacking to force stuff to work: The MPEGPlugin chocked
> > on filenames with uppercase suffixes. So I forced lowercase because
> > HFS ignores cases. And I probably did some other hacks too...
> 
> I don't think it's that. Certainly the error always shows it pointed to
> the correct filepath of the last Mpeg opened. And almost all of my files
> have lower case suffixes. My guess is that there's something in the
> orange one that's not in the blue one... but I've no idea what!  ;-)
> 
> > > (This isn't really a problem unless you've run a
> > > few mpegs, where the debuggers sometimes seem to block the mouse -- they
> > > refuse to either close/collapse or cancel -- quitting again seems to
> > > clear this.) Killing the debuggers and running Smalltalk garbageCollect
> > > seems to result in a fully functioning system.
> >
> > I do not see any of this on my Mac system.
> > >
> > > Any tests you'd like me to try, please let me know. The Mpeg plug in
> > > itself is superb: I've yet to find anything it won't run.
> >
> > The plugin is great! It also plays MP3s so a soundcard is recomended.
> 
> Yes, I must get one -- or, rather, get one that'll work under Linux.
> What really surprised me about it is that it's so much better than the
> other Mpeg stuff on my Linux box. Terrific work!
> 
> Cheers
> 
> John
> 
> --
> ******************************************************************************
> Marx: "Why do Anarchists only drink herbal tea?"
> Proudhon: "Because all proper tea is theft."
> ******************************************************************************
> 
>   ------------------------------------------------------------------------
> 'From Squeak3.1alpha of 28 April 2001 [latest update: #4173] on 10 August 2001 at 9:21:18 pm'!
> 
> !Object methodsFor: 'error handling' stamp: 'tfei 4/12/1999 12:55'!
> error: aString
>         "Throw a generic Error exception."
> 
>         ^Error new signal: aString! !
> 
> 'From Squeak3.1alpha of 28 April 2001 [latest update: #4173] on 10 August 2001 at 9:21:33 pm'!
> 
> !Object methodsFor: 'error handling'!
> primitiveFailed
>         "Announce that a primitive has failed and there is no appropriate
>         Smalltalk code to run."
> 
>         self error: 'a primitive has failed'! !
> 
> 'From Squeak3.1alpha of 28 April 2001 [latest update: #4173] on 10 August 2001 at 9:21:42 pm'!
> 
> !MPEGFile methodsFor: 'primitives' stamp: 'JMM 9/18/2000 14:59'!
> primHasVideo: aHandle
>         <primitive: 'primitiveMPEG3HasVideo' module: 'Mpeg3Plugin'>
>         self primitiveFailed! !
> 
> 'From Squeak3.1alpha of 28 April 2001 [latest update: #4173] on 10 August 2001 at 9:21:48 pm'!
> 
> !MPEGFile methodsFor: 'video' stamp: 'JMM 9/20/2000 01:54'!
> hasVideo
>         "Returns true if file has video"
>         ^self primHasVideo: self fileHandle ! !
> 
> 'From Squeak3.1alpha of 28 April 2001 [latest update: #4173] on 10 August 2001 at 9:22 pm'!
> 
> !BlockContext methodsFor: 'scheduling' stamp: 'ar 6/5/1998 21:44'!
> newProcess
>         "Answer a Process running the code in the receiver. The process is not
>         scheduled."
>         <primitive: 19> "Simulation guard"
>         ^Process
>                 forContext:
>                         [self value.
>                         Processor terminateActive]
>                 priority: Processor activePriority! !




More information about the Squeak-dev mailing list