Normally I run Squeak from a little icon in Kde. Kde just executes "squeak -memory 60mk" (about as much as I can manage in Kde without squeezing everything else to death).
Now, doing it this way, opening up the MPEGPlayer Morph and pointing it at AlienSong.mpg (which everyone seems to use as a test) brings up the debuger: error: a primitive has failed.
Running squeak from the command line, I can run the mpeg, but find, on inspecting the Xterm:
john@molehole:~ > squeak ioLoadModule(./Mpeg3Plugin.so): ./Mpeg3Plugin.so: undefined symbol: mpeg3_total_astreams /dev/dsp: No such device /dev/dsp: No such device /dev/dsp: No such device /dev/dsp: No such device /dev/dsp: No such device /dev/dsp: No such device
Any ideas? I don't know what either error message means (I've always had the dev/dsp error and it seems not to affect anything). And it seems that Squeak needs to spit out the error message in order to be able to run the mpeg. -- Just a thought: this might have been responsible for my not being able to get mpegs to run when I "hand bodged" the mpeg plugin.
BTW, I don't have a sound card fitted (or rather, I do, but it's one of those really nasty cheap ones that Linux doesn't recognise).
Cheers
John
On Tue, 10 Jul 2001, John Hinsley wrote:
Normally I run Squeak from a little icon in Kde. Kde just executes "squeak -memory 60mk" (about as much as I can manage in Kde without squeezing everything else to death).
That would be "60m", right?
Now, doing it this way, opening up the MPEGPlayer Morph and pointing it at AlienSong.mpg (which everyone seems to use as a test) brings up the debuger: error: a primitive has failed.
Running squeak from the command line, I can run the mpeg,
You have the Mpeg plugin in the current directory, so it works. If you run Squeak from KDE, the current directory is probably somewhere else, so the plugin is not found. You can set LD_LIBRARY_PATH to point to the plugin directory.
but find, on inspecting the Xterm:
john@molehole:~ > squeak ioLoadModule(./Mpeg3Plugin.so): ./Mpeg3Plugin.so: undefined symbol: mpeg3_total_astreams
Maybe you did not use the latest plugin sources?
/dev/dsp: No such device
You should disable sound in the preferences, because you don't have sound.
-- Bert
Bert Freudenberg wrote:
On Tue, 10 Jul 2001, John Hinsley wrote:
Normally I run Squeak from a little icon in Kde. Kde just executes "squeak -memory 60mk" (about as much as I can manage in Kde without squeezing everything else to death).
That would be "60m", right?
Yes, but (from squeak -h):
-memory <size>[mk] set initial memory size (default: 20m) :-)
I've always found that completely counter-intuitive: I guess it should read [m/k]!
Now, doing it this way, opening up the MPEGPlayer Morph and pointing it at AlienSong.mpg (which everyone seems to use as a test) brings up the debuger: error: a primitive has failed.
Running squeak from the command line, I can run the mpeg,
You have the Mpeg plugin in the current directory, so it works. If you run Squeak from KDE, the current directory is probably somewhere else, so the plugin is not found. You can set LD_LIBRARY_PATH to point to the plugin directory.
Stuffing it in my /usr/local/lib/squeak/3.0/ (in my /etc/ld.so/conf) it now works from the icon. But I get a primitive has failed error on Squeak opening. If I dismiss this, it works. This error may just relate to the sound: the thought occurs that if I were running a Mac, I'd be worried if sound was'nt there. If I was running a *nix, however, I'd quite expect it not to be.
but find, on inspecting the Xterm:
john@molehole:~ > squeak ioLoadModule(./Mpeg3Plugin.so): ./Mpeg3Plugin.so: undefined symbol: mpeg3_total_astreams
Maybe you did not use the latest plugin sources?
It's the latest Lex compilation, which looks like the latest *nix stuff.
/dev/dsp: No such device
You should disable sound in the preferences, because you don't have sound.
I'll go and buy a soundblaster this weekend. (With a money back if Linux loaths it guarantee.)
Thanks Bert. I've now got this pretty much as I want it.
Cheers
John
Stuffing it in my /usr/local/lib/squeak/3.0/ (in my /etc/ld.so/conf) it now works from the icon. But I get a primitive has failed error on Squeak opening. If I dismiss this, it works. This error may just relate to the sound: the thought occurs that if I were running a Mac, I'd be worried if sound was'nt there. If I was running a *nix, however, I'd quite expect it not to be.
Glad to hear you got the MPEG working!
What primitive is failing? You can look a line or two down in the debugger to see which one...
Nhe /dev/dsp messages should probably be removed, or at least toned down somehow. It is precisely because you don't have a sound card that it happens. Also, the retries really are worthwhile -- for many drivers, only one guy can use the soundcard at a time, and so a retry might manage to open the device when a previous try failed!
-Lex
Lex Spoon wrote:
Stuffing it in my /usr/local/lib/squeak/3.0/ (in my /etc/ld.so/conf) it now works from the icon. But I get a primitive has failed error on Squeak opening. If I dismiss this, it works. This error may just relate to the sound: the thought occurs that if I were running a Mac, I'd be worried if sound was'nt there. If I was running a *nix, however, I'd quite expect it not to be.
Glad to hear you got the MPEG working!
Me too! Although I've yet to try the sound ;-) the quality seems to be better than the "native" mpeg players on my (admitedly 18 months out of date) system: this is extraordinary as, presumably, they're using the same libraries. I especially like the file selection dialogue in the MPEG Player Morph: when I've got some spare time I'll try and snag that for some of the other file dialogues.
What primitive is failing? You can look a line or two down in the debugger to see which one...
Let's see.... I get:
MPEGFile(Object)>>error: MPEGFile(Object)>>primitiveFailed MPEGFile>>primHasVideo (interestingly pathToFile on this seems to be set to the last Mpeg I'd had opened before I quit and saved, although I did remove the morph) MPEGFile>>hasVideo [] in MPEGPlayer2>>playAudio: [] in BlockContext>>newProcess
which seems to confirm everything about the sound and the retries.
Nhe /dev/dsp messages should probably be removed, or at least toned down somehow. It is precisely because you don't have a sound card that it happens. Also, the retries really are worthwhile -- for many drivers, only one guy can use the soundcard at a time, and so a retry might manage to open the device when a previous try failed!
There's so much I don't know about sound (in general and in Linux) and graphic file types!
Thanks again
Cheers
John
MPEGFile(Object)>>error: MPEGFile(Object)>>primitiveFailed MPEGFile>>primHasVideo (interestingly pathToFile on this seems to be set to the last Mpeg I'd had opened before I quit and saved, although I did remove the morph) MPEGFile>>hasVideo [] in MPEGPlayer2>>playAudio: [] in BlockContext>>newProcess
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?
-Lex
Lex Spoon wrote:
MPEGFile(Object)>>error: MPEGFile(Object)>>primitiveFailed MPEGFile>>primHasVideo (interestingly pathToFile on this seems to be set to the last Mpeg I'd had opened before I quit and saved, although I did remove the morph) MPEGFile>>hasVideo [] in MPEGPlayer2>>playAudio: [] in BlockContext>>newProcess
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.
Cheers
John
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.)
Have you ever seen this error *except* across a snapshot/restart sequence?
Lex Spoon
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
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. Use the X halo to collapse the morph. Save and quit. Re-start Squeak. 8 times out of 10, the debugger pops up. (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.
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.
Cheers
John (still saving for a new soundcard ;-)
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)?
Use the X halo to collapse the morph.
The X handle (halo) that deletes the morph ?
Save and quit. Re-start Squeak. 8 times out of 10, the debugger pops up.
Whats in the debugger ? 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...
(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.
Karl
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
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
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! !
squeak-dev@lists.squeakfoundation.org