issue allocating more memory for the image

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

issue allocating more memory for the image

Chris Muller-3
Using latest Cog image 4.0-2776 in Linux, whenever I've had a
memory-intensive operation to run, I would simply start up with 2G
allocation:

  squeak -mmap 2000m trunk.image &

But, for some reason, when I do this today, I'm getting a message on stdout:

    sound: /dev/dsp: No such file or directory
    sound: /dev/dsp: No such file or directory

AND, if I simply do it in a workspace

    self halt

and click Proceed in the debugger, I'm getting a pop-up that warns me:

 'WARNING: There is not enough space to start the low space watcher.
If you proceed, you will not be warned again, and the system may
run out of memory and crash. If you do proceed, you can start the
low space notifier when more space becomes available simply by
opening and then closing a debugger (e.g., by hitting Cmd-period.)
Do you want to proceed?'

This happens in a standard trunk image.  I've never had this issue
before, does anyone know why its happening?

Thanks.

Reply | Threaded
Open this post in threaded view
|

Re: issue allocating more memory for the image

timrowledge
Not a lot I can offer on this but -
On 22-05-2014, at 8:58 AM, Chris Muller <[hidden email]> wrote:
>
>
>    sound: /dev/dsp: No such file or directory
>    sound: /dev/dsp: No such file or directory

That tends to be output when the system tries to start the sound player (duh) and finds it missing. It’s been happening to me on the Pi as I try to work out why the ALSA sound stuff wouldn’t build (because I hadn’t installed the libasound2-dev package, apparently, discovered eventually by poring over the config.log in desperation) and the vm defaults to some other sound player module. The fact that you are getting that message when you used not to, implies to me that you are somehow starting up the vm in a different way and the ‘proper’ sound setup is not being done.

Sorry it’s rather vague and waffly.

tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
When flying inverted, remember that down is up and up is expensive



Reply | Threaded
Open this post in threaded view
|

Re: issue allocating more memory for the image

David T. Lewis
Usually on a unix system, a "No such file or directory" error means
exactly what it says. A file named "/dev/dsp" is a device file in the /dev
pseudo-file system, which presumably is not present. Various flavors of
Linux or Unix might have different sound systems active, and might have
different naming conventions for device files.

I can't think of any reason why this should have an interaction with
object memory allocation. If it seems to be VM related, try running with
an interpreter VM or a different version of Cog and see if the symptoms
change.

Dave


> Not a lot I can offer on this but -
> On 22-05-2014, at 8:58 AM, Chris Muller <[hidden email]> wrote:
>>
>>
>>    sound: /dev/dsp: No such file or directory
>>    sound: /dev/dsp: No such file or directory
>
> That tends to be output when the system tries to start the sound player
> (duh) and finds it missing. It’s been happening to me on the Pi as I try
> to work out why the ALSA sound stuff wouldn’t build (because I hadn’t
> installed the libasound2-dev package, apparently, discovered eventually by
> poring over the config.log in desperation) and the vm defaults to some
> other sound player module. The fact that you are getting that message when
> you used not to, implies to me that you are somehow starting up the vm in
> a different way and the ‘proper’ sound setup is not being done.
>
> Sorry it’s rather vague and waffly.
>
> tim
> --
> tim Rowledge; [hidden email]; http://www.rowledge.org/tim
> When flying inverted, remember that down is up and up is expensive
>
>
>



Reply | Threaded
Open this post in threaded view
|

Re: issue allocating more memory for the image

Chris Muller-3
On Thu, May 22, 2014 at 1:00 PM, David T. Lewis <[hidden email]> wrote:

> Usually on a unix system, a "No such file or directory" error means
> exactly what it says. A file named "/dev/dsp" is a device file in the /dev
> pseudo-file system, which presumably is not present. Various flavors of
> Linux or Unix might have different sound systems active, and might have
> different naming conventions for device files.
>
> I can't think of any reason why this should have an interaction with
> object memory allocation. If it seems to be VM related, try running with
> an interpreter VM or a different version of Cog and see if the symptoms
> change.

It's because there's a System beep somewhere in there and I was just
interjecting the question-- why the heck do we have System beep(s)
embedded in the system?

But let's please not focus on that right now.  I really want to ask
the more important question whether there's a problem with Cog.

None of the symptoms happen with the Interpreter VM (2357).

You can easily reproduce it yourself with Cog.  Just start the base
Squeak4.5 image with the -mmap 2000m argument.

Then, in a workspace:

   self halt.

Do It, then press Proceed on the debugger that appears.

Does the problem occur for you too?  It's related to amount reclaimed
by the garbage-collector, but clearly we're not out of memory....

Reply | Threaded
Open this post in threaded view
|

Re: issue allocating more memory for the image

Chris Muller-3
I try with the -memory parameter instead of -mmap, then Cog crashes
immediately with -memory 2200m when launching the stock 4.5 image..

On Thu, May 22, 2014 at 1:44 PM, Chris Muller <[hidden email]> wrote:

> On Thu, May 22, 2014 at 1:00 PM, David T. Lewis <[hidden email]> wrote:
>> Usually on a unix system, a "No such file or directory" error means
>> exactly what it says. A file named "/dev/dsp" is a device file in the /dev
>> pseudo-file system, which presumably is not present. Various flavors of
>> Linux or Unix might have different sound systems active, and might have
>> different naming conventions for device files.
>>
>> I can't think of any reason why this should have an interaction with
>> object memory allocation. If it seems to be VM related, try running with
>> an interpreter VM or a different version of Cog and see if the symptoms
>> change.
>
> It's because there's a System beep somewhere in there and I was just
> interjecting the question-- why the heck do we have System beep(s)
> embedded in the system?
>
> But let's please not focus on that right now.  I really want to ask
> the more important question whether there's a problem with Cog.
>
> None of the symptoms happen with the Interpreter VM (2357).
>
> You can easily reproduce it yourself with Cog.  Just start the base
> Squeak4.5 image with the -mmap 2000m argument.
>
> Then, in a workspace:
>
>    self halt.
>
> Do It, then press Proceed on the debugger that appears.
>
> Does the problem occur for you too?  It's related to amount reclaimed
> by the garbage-collector, but clearly we're not out of memory....

Reply | Threaded
Open this post in threaded view
|

Re: issue allocating more memory for the image

Eliot Miranda-2
In reply to this post by Chris Muller-3



On Thu, May 22, 2014 at 11:44 AM, Chris Muller <[hidden email]> wrote:
On Thu, May 22, 2014 at 1:00 PM, David T. Lewis <[hidden email]> wrote:
> Usually on a unix system, a "No such file or directory" error means
> exactly what it says. A file named "/dev/dsp" is a device file in the /dev
> pseudo-file system, which presumably is not present. Various flavors of
> Linux or Unix might have different sound systems active, and might have
> different naming conventions for device files.
>
> I can't think of any reason why this should have an interaction with
> object memory allocation. If it seems to be VM related, try running with
> an interpreter VM or a different version of Cog and see if the symptoms
> change.

It's because there's a System beep somewhere in there and I was just
interjecting the question-- why the heck do we have System beep(s)
embedded in the system?

But let's please not focus on that right now.  I really want to ask
the more important question whether there's a problem with Cog.

Looks like sound support is broken in Cog.  I had hacked in ALSA support for linux at Qwaq/Teleplace and it appeared to be working properly there.  But perhaps something is broken.  Certainly ALSA support looked pretty poor, and recent;y Tim has found that at least on RPi one needs to compile the VM with the threaded heartbeat, /not/ the signalling itimer heartbeat for ALSA not to crash.  So Chris, are you using the threaded or the itimer heartbeat?  You can tell using the -version switch, at least on current VMs.  Somewhere in the version output it'll say ITHB if its a VM with the itimer heartbeat.


None of the symptoms happen with the Interpreter VM (2357).

You can easily reproduce it yourself with Cog.  Just start the base
Squeak4.5 image with the -mmap 2000m argument.

Then, in a workspace:

   self halt.

Do It, then press Proceed on the debugger that appears.

Does the problem occur for you too?  It's related to amount reclaimed
by the garbage-collector, but clearly we're not out of memory....



--
best,
Eliot


Reply | Threaded
Open this post in threaded view
|

Re: issue allocating more memory for the image

Eliot Miranda-2
In reply to this post by Chris Muller-3
Hi Chris,


On Thu, May 22, 2014 at 11:54 AM, Chris Muller <[hidden email]> wrote:
I try with the -memory parameter instead of -mmap, then Cog crashes
immediately with -memory 2200m when launching the stock 4.5 image..

Yes, that's your limit with X11.  32-bit linux reserves the top 1Gb for kernel space, leaving 3Gb for user processes.  Once you factor in space taken for the VM and the X11 libraries (plus sundries) 2200mb is simply too much memory and the system crashes in X11 startup.  So for the moment you'll need to peg things at 2100mb or 2000mb.
 

On Thu, May 22, 2014 at 1:44 PM, Chris Muller <[hidden email]> wrote:
> On Thu, May 22, 2014 at 1:00 PM, David T. Lewis <[hidden email]> wrote:
>> Usually on a unix system, a "No such file or directory" error means
>> exactly what it says. A file named "/dev/dsp" is a device file in the /dev
>> pseudo-file system, which presumably is not present. Various flavors of
>> Linux or Unix might have different sound systems active, and might have
>> different naming conventions for device files.
>>
>> I can't think of any reason why this should have an interaction with
>> object memory allocation. If it seems to be VM related, try running with
>> an interpreter VM or a different version of Cog and see if the symptoms
>> change.
>
> It's because there's a System beep somewhere in there and I was just
> interjecting the question-- why the heck do we have System beep(s)
> embedded in the system?
>
> But let's please not focus on that right now.  I really want to ask
> the more important question whether there's a problem with Cog.
>
> None of the symptoms happen with the Interpreter VM (2357).
>
> You can easily reproduce it yourself with Cog.  Just start the base
> Squeak4.5 image with the -mmap 2000m argument.
>
> Then, in a workspace:
>
>    self halt.
>
> Do It, then press Proceed on the debugger that appears.
>
> Does the problem occur for you too?  It's related to amount reclaimed
> by the garbage-collector, but clearly we're not out of memory....




--
best,
Eliot


Reply | Threaded
Open this post in threaded view
|

Re: issue allocating more memory for the image

Chris Muller-4
Is the threaded one coglinuxht?  I'm 99% sure I'm using that because I
want to take advantage of any extra processing-cores if I can.  Here's
my -version output just FYI:

4.0-2776 #1 Thu Aug 22 10:36:42 PDT 2013 gcc 4.1.2 [Production VM]
CoInterpreter VMMaker.oscog-eem.331 uuid:
37d2e4b0-2f37-4e2d-8313-c63637785e59 Aug 22 2013
StackToRegisterMappingCogit VMMaker.oscog-eem.333 uuid:
84da9cb8-7f30-4cb7-b4fb-239a11f63b54 Aug 22 2013
VM: r2776 http://www.squeakvm.org/svn/squeak/branches/Cog
Plugins: r2545 http://squeakvm.org/svn/squeak/trunk/platforms/Cross/plugins
Linux mcqfes 2.6.18-128.el5 #1 SMP Wed Jan 21 10:44:23 EST 2009 i686
i686 i386 GNU/Linux

>> I try with the -memory parameter instead of -mmap, then Cog crashes
>> immediately with -memory 2200m when launching the stock 4.5 image..
>
> Yes, that's your limit with X11.  32-bit linux reserves the top 1Gb for
> kernel space, leaving 3Gb for user processes.  Once you factor in space
> taken for the VM and the X11 libraries (plus sundries) 2200mb is simply too
> much memory and the system crashes in X11 startup.  So for the moment you'll
> need to peg things at 2100mb or 2000mb.

Ok, but what about the reproducible case I documented?

>> > You can easily reproduce it yourself with Cog.  Just start the base
>> > Squeak4.5 image with the -mmap 2000m argument.
>> >
>> > Then, in a workspace:
>> >
>> >    self halt.
>> >
>> > Do It, then press Proceed on the debugger that appears.
>> > Does the problem occur for you too?  It's related to amount reclaimed
>> > by the garbage-collector, but clearly we're not out of memory....

Is this a problem?

Thanks.

Reply | Threaded
Open this post in threaded view
|

Beep strangenesses ( was Re: [squeak-dev] issue allocating more memory for the image)

timrowledge
In reply to this post by Chris Muller-3

On 22-05-2014, at 11:44 AM, Chris Muller <[hidden email]> wrote:

>
> It's because there's a System beep somewhere in there and I was just
> interjecting the question-- why the heck do we have System beep(s)
> embedded in the system?

For some reason the halt causes a beep. And for some reason the beep wants to put up a menu to choose which beep supporting class you want to use. That doesn’t seem like a good idea to me. And I see the lowspace watcher uses beep too, which is an even worse place to be opening menus and asking the user to choose their favourite sound maker class.

Perhaps worse, you can’t do a cmd-. while them menu is open in order to try to debug this.

It’s something to do with SoundService default etc. Looks like the default was nil and thus #askForDefault is used. Perhaps it got nilled during some cleanup or install ?


tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
fibula: noun, 'a small lie'



Reply | Threaded
Open this post in threaded view
|

Re: Beep strangenesses ( was Re: [squeak-dev] issue allocating more memory for the image)

David T. Lewis
On Thu, May 22, 2014 at 03:47:51PM -0700, tim Rowledge wrote:

>
> On 22-05-2014, at 11:44 AM, Chris Muller <[hidden email]> wrote:
>
> >
> > It's because there's a System beep somewhere in there and I was just
> > interjecting the question-- why the heck do we have System beep(s)
> > embedded in the system?
>
> For some reason the halt causes a beep. And for some reason the beep wants to put up a menu to choose which beep supporting class you want to use. That doesn?t seem like a good idea to me. And I see the lowspace watcher uses beep too, which is an even worse place to be opening menus and asking the user to choose their favourite sound maker class.
>
> Perhaps worse, you can?t do a cmd-. while them menu is open in order to try to debug this.
>
> It?s something to do with SoundService default etc. Looks like the default was nil and thus #askForDefault is used. Perhaps it got nilled during some cleanup or install ?
>

Wow. The low space watcher is invoking memory-intensive activity complete
with sound effects, fireworks, and 3D animations. What could possibly go
wrong with a design like that? While we're at it we may as well open a
connection to a relational database and log some diagnostic information,
then send some emails to the support organization to inform them that an
investigation should be mounted some time next week.

We should certainly fix this for the low space watcher.

Dave
 

Reply | Threaded
Open this post in threaded view
|

Re: Beep strangenesses ( was Re: [squeak-dev] issue allocating more memory for the image)

timrowledge
In reply to this post by timrowledge

On 22-05-2014, at 3:47 PM, tim Rowledge <[hidden email]> wrote:
> It’s something to do with SoundService default etc.

I’m still trying to puzzle out why on earth we ended up with the system beep being involved in a complex services regime. The beep is supposed to be a trivially simple way to get a noise out of the system when you need to have some alert that doesn’t rely upon anything complex. That’s why it is a primitive; that way if you need something more complex because a noise isn’t appropriate (or possible?) you can make it flash a light or set off some dynamite, or (rather mundanely) write to a console.

Did anyone come up with an especially good reason for the complication? I’m willing to be persuaded if there is a good argument.

tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Strange OpCodes: FSE: Fake Serious Error



Reply | Threaded
Open this post in threaded view
|

Re: Beep strangenesses ( was Re: [squeak-dev] issue allocating more memory for the image)

Eliot Miranda-2



On Sat, May 24, 2014 at 1:38 PM, tim Rowledge <[hidden email]> wrote:

On 22-05-2014, at 3:47 PM, tim Rowledge <[hidden email]> wrote:
> It’s something to do with SoundService default etc.

I’m still trying to puzzle out why on earth we ended up with the system beep being involved in a complex services regime. The beep is supposed to be a trivially simple way to get a noise out of the system when you need to have some alert that doesn’t rely upon anything complex. That’s why it is a primitive; that way if you need something more complex because a noise isn’t appropriate (or possible?) you can make it flash a light or set off some dynamite, or (rather mundanely) write to a console.

Did anyone come up with an especially good reason for the complication? I’m willing to be persuaded if there is a good argument.

However it happened, and I can imagine that some well-meaning soul thought that an audio notification of a bug would be useful, I think we need to at the very least make it an option that is disabled by default.  It is incredibly annoying to be prompted for a sound system selection while running the tests.  It is worse that images crash when they raise notifiers.


Strange OpCodes: FSE: Fake Serious Error






--
best,
Eliot


Reply | Threaded
Open this post in threaded view
|

Re: Beep strangenesses ( was Re: [squeak-dev] issue allocating more memory for the image)

Chris Muller-3
In reply to this post by timrowledge
Let's bloviate about the characteristics of this sort of UI element, a
beep, and see if we can identify anything interesting:

  - Beep is a way to get the users attention assuming their speakers
are turned on and not muted.
  - Beep accesses a different sense than the screen so, for example,
if you want to be elsewhere in the same room, not actively looking at
the screen, but want software to pre-empt your attention ASAP.  But I
think this should be application-specific, not deep in the system.
  - Beep does not need any particular graphical or framework
dependency.  That's nice.
  - Beeps are not informative, but are "irregular" which, to me, would
be an indication of something _wrong_, something negative not
positive.
  - Beeps can be less-intrusive than a modal pop-up, because while it
may cause the user to pause and wonder what the beep is about, it
doesn't require any action to get rid of it like modal pops do -- the
sound is just there and gone.
  - However, it's VERY intrusive, IMO, to arbitrarily introduce
noise-pollution into the users environment.  Unacceptably so.

So, overall, I can't think of any good reason base Squeak should ever
beep at the user.  If it were anything, it would be something related
to mis-use of low-level gestures -- like a key combination that's
common in the outside world but different or not accepted in Squeak.


On Sat, May 24, 2014 at 3:38 PM, tim Rowledge <[hidden email]> wrote:

>
> On 22-05-2014, at 3:47 PM, tim Rowledge <[hidden email]> wrote:
>> It’s something to do with SoundService default etc.
>
> I’m still trying to puzzle out why on earth we ended up with the system beep being involved in a complex services regime. The beep is supposed to be a trivially simple way to get a noise out of the system when you need to have some alert that doesn’t rely upon anything complex. That’s why it is a primitive; that way if you need something more complex because a noise isn’t appropriate (or possible?) you can make it flash a light or set off some dynamite, or (rather mundanely) write to a console.
>
> Did anyone come up with an especially good reason for the complication? I’m willing to be persuaded if there is a good argument.
>
> tim
> --
> tim Rowledge; [hidden email]; http://www.rowledge.org/tim
> Strange OpCodes: FSE: Fake Serious Error
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Beep strangenesses ( was Re: [squeak-dev] issue allocating more memory for the image)

Eliot Miranda-2



On Sat, May 24, 2014 at 3:10 PM, Chris Muller <[hidden email]> wrote:
Let's bloviate about the characteristics of this sort of UI element, a
beep, and see if we can identify anything interesting:

  - Beep is a way to get the users attention assuming their speakers
are turned on and not muted.

and they're sittign at their machine, not elsewhere doing something different
 
  - Beep accesses a different sense than the screen so, for example,
if you want to be elsewhere in the same room, not actively looking at
the screen, but want software to pre-empt your attention ASAP.  But I
think this should be application-specific, not deep in the system.

I find a notifier in a bright colour quite informative enough.
 
  - Beep does not need any particular graphical or framework
dependency.  That's nice.

But a dependency on system sound, as we've seen, is problematic.
 
  - Beeps are not informative, but are "irregular" which, to me, would
be an indication of something _wrong_, something negative not
positive.

Um, Skype and FB beep me all the time as part of their normal notification process.  Not indicating anything wrong.
 
  - Beeps can be less-intrusive than a modal pop-up, because while it
may cause the user to pause and wonder what the beep is about, it
doesn't require any action to get rid of it like modal pops do -- the
sound is just there and gone.

We're not talking about a modal pop-up.  We're talking about augmenting (as some of us are arguing, unnecessarily) the opening of a notifier.
 
  - However, it's VERY intrusive, IMO, to arbitrarily introduce
noise-pollution into the users environment.  Unacceptably so.

So, overall, I can't think of any good reason base Squeak should ever
beep at the user.  If it were anything, it would be something related
to mis-use of low-level gestures -- like a key combination that's
common in the outside world but different or not accepted in Squeak.

I can't tell if you're being sarcastic or not.
 


On Sat, May 24, 2014 at 3:38 PM, tim Rowledge <[hidden email]> wrote:
>
> On 22-05-2014, at 3:47 PM, tim Rowledge <[hidden email]> wrote:
>> It’s something to do with SoundService default etc.
>
> I’m still trying to puzzle out why on earth we ended up with the system beep being involved in a complex services regime. The beep is supposed to be a trivially simple way to get a noise out of the system when you need to have some alert that doesn’t rely upon anything complex. That’s why it is a primitive; that way if you need something more complex because a noise isn’t appropriate (or possible?) you can make it flash a light or set off some dynamite, or (rather mundanely) write to a console.
>
> Did anyone come up with an especially good reason for the complication? I’m willing to be persuaded if there is a good argument.
>
> tim
> --
> tim Rowledge; [hidden email]; http://www.rowledge.org/tim
> Strange OpCodes: FSE: Fake Serious Error
>
>
>




--
best,
Eliot


Reply | Threaded
Open this post in threaded view
|

Re: Beep strangenesses ( was Re: [squeak-dev] issue allocating more memory for the image)

Chris Muller-3
You don't need to defend No-Beep, I'm already in your camp.  But for
my interest in man-machine interfacing, I was just trying to "explore"
some characteristics of beeps, whether potentially positive or
negative, to see if there are any interesting uses for them at the
level we're talking about.  They are not advocacy, just thinking and
learning.    :)

Obviously _sound_ has a place in applications (like Skype), but the
explorations didn't really come up with anything useful about a _beep_
at this low a level.

Some quick responses, below:

>> Let's bloviate about the characteristics of this sort of UI element, a
>> beep, and see if we can identify anything interesting:
>>
>>   - Beep is a way to get the users attention assuming their speakers
>> are turned on and not muted.
>
> and they're sittign at their machine, not elsewhere doing something
> different

Of course, one would need to be within earshot.

>>   - Beep accesses a different sense than the screen so, for example,
>> if you want to be elsewhere in the same room, not actively looking at
>> the screen, but want software to pre-empt your attention ASAP.  But I
>> think this should be application-specific, not deep in the system.
>
> I find a notifier in a bright colour quite informative enough.

I was trying to explore the use of a different sense.  Auditory cues
afford use-cases a visual ones do not.  Some other examples:

  - I might wish to have my laptop lid closed to save power while
running test cases.
  - Maybe I'm at the sink doing the dishes with the laptop on the
table behind me, but I need to know when "something" happens.
  - Maybe I'm color-blind or blind, and like auditory cues.

(I'm NOT advocating, just exploring).

>>   - Beep does not need any particular graphical or framework
>> dependency.  That's nice.
>
>
> But a dependency on system sound, as we've seen, is problematic.

This is Squeak, sound _shouldn't_ be problematic.  But I guess that's
not reality at least in Linux..

>>   - Beeps are not informative, but are "irregular" which, to me, would
>> be an indication of something _wrong_, something negative not
>> positive.
>
> Um, Skype and FB beep me all the time as part of their normal notification
> process.  Not indicating anything wrong.

Those are not monotone _beeps_ though, are they?  Aren't they a "tune"
which is much more informative?

>>   - Beeps can be less-intrusive than a modal pop-up, because while it
>> may cause the user to pause and wonder what the beep is about, it
>> doesn't require any action to get rid of it like modal pops do -- the
>> sound is just there and gone.
>
> We're not talking about a modal pop-up.  We're talking about augmenting (as
> some of us are arguing, unnecessarily) the opening of a notifier.

Again, just exploring characteristics of auditory notification vs.
visual..  Not advocating..  :)

>>   - However, it's VERY intrusive, IMO, to arbitrarily introduce
>> noise-pollution into the users environment.  Unacceptably so.
>>
>> So, overall, I can't think of any good reason base Squeak should ever
>> beep at the user.  If it were anything, it would be something related
>> to mis-use of low-level gestures -- like a key combination that's
>> common in the outside world but different or not accepted in Squeak.
>
>
> I can't tell if you're being sarcastic or not.

Not.

Reply | Threaded
Open this post in threaded view
|

Re: Beep strangenesses ( was Re: [squeak-dev] issue allocating more memory for the image)

David T. Lewis
In reply to this post by timrowledge
On Sat, May 24, 2014 at 01:38:54PM -0700, tim Rowledge wrote:
>
> On 22-05-2014, at 3:47 PM, tim Rowledge <[hidden email]> wrote:
> > It?s something to do with SoundService default etc.
>
> I?m still trying to puzzle out why on earth we ended up with the system beep being involved in a complex services regime. The beep is supposed to be a trivially simple way to get a noise out of the system when you need to have some alert that doesn?t rely upon anything complex. That?s why it is a primitive; that way if you need something more complex because a noise isn?t appropriate (or possible?) you can make it flash a light or set off some dynamite, or (rather mundanely) write to a console.
>
> Did anyone come up with an especially good reason for the complication? I?m willing to be persuaded if there is a good argument.
>

It is certainly reasonable for Beeper to make use of higher level sound services
where available, and fall back on a simple primitiveBeep otherwise. It might or
might not be reasonable for those higher level sound services to invoke user
interaction.

What is definitely not reasonable is to have that complexity be invoked from the
low space watcher.

So we have Beeper class>>beep, which attempts to do beeping in the best possible
way, and we have Beeper class>>primitiveBeep, which just makes some noise without
all the rest of that fancy stuff.

The low space watcher calls #beep. Maybe it should just call #primitiveBeep instead?

Dave

Reply | Threaded
Open this post in threaded view
|

Re: Beep strangenesses ( was Re: [squeak-dev] issue allocating more memory for the image)

timrowledge
In reply to this post by Chris Muller-3
(mail swears this didn’t get sent but .. I dunno. (re)sending just in case)

On 24-05-2014, at 3:42 PM, Chris Muller <[hidden email]> wrote:

>>
>> But a dependency on system sound, as we've seen, is problematic.
>
> This is Squeak, sound _shouldn't_ be problematic.  But I guess that's
> not reality at least in Linux..
>

Leaving aside the insanity of linux sounds stuff (which I just spent a *lovely* week fighting), the problem in this case is witihin the image. Because the sound service wasn’t set, it triggered a very annoying UI artefact. We could fix the immediate problem by setting the default and the bigger problem by simplifying how the beep is done. I really don’t see any need for a beep to be settable to a full dolby 7.1 rendition of a hip-hop cover of Ode to Joy.

tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Strange OpCodes: RLBMI: Ruin Logic Board Multiple Indexed