Project

General

Profile

Bug #3570

Web client beeping

Added by Sergey Ivanovskiy about 6 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
High
Target version:
-
Start date:
Due date:
% Done:

100%

billable:
No
vendor_id:
GCD
case_num:
version:

History

#1 Updated by Sergey Ivanovskiy about 6 years ago

It seems that the root cause of unusual beeping is p2j.screen.js

/**
 * Display an error message.
 *
 * @param    {string} text
 *           The error text to display.
*/
me.error = function(text) {
console.error(text);
p2j.sound.beep();
};

in this usage

   /**
    * Draw the given list of operations in the specified window. This is a completely different
    * implementation than for ChUI, but we are re-using the message type.
    *
    * @param    {byte[]} message
    *           The encoded list of drawing operations.
    */
   me.drawRectangles = function(message)
   {
........................................................
      if (!isExistingWindowId(wid))
      {
         me.error("Cannot draw non-existent window with id " + wid.toString());
         return;
      }
..........................................................

   }

There are another cases of p2j.screen.error in p2j.screen.js (28 matches)

2,108: me.error("Unknown operation " + type.toString() + "!");
2,112: me.error("Your session is corrupted buddy!");
2,508: me.error("Missing window " + wid.toString() + " in z-order list.");
2,551: // error was already raised
2,752: console.error(e);
3,041: * @return   The created window instance or null on any error.
3,059: * return The created window instance or on any error.
3,065: me.error("Window ids must be non-positive integers.");
3,071: me.error("Cannot create window with id " + wid.toString() + " because it already exists.");
3,127: * @return The created window instance or null on any error.
3,133: me.error("Owner window ids must be non-positive integers.");
3,139: me.error("Owner window with id " + wid.toString() + " must already exist.");
3,178: me.error("Cannot destroy window for id that is not a non-positive integer.");
3,184: me.error("Cannot destroy window with id " + wid.toString() + " because it doesn't exist.");
3,228: me.error("Cannot change sensitivity for window for id that is invalid.");
3,234: me.error("Cannot change sensitivity for non-existent window with id " + wid.toString());
3,256: me.error("Cannot change visibility for window for id that is invalid.");
3,262: me.error("Cannot change visibility for non-existent window with id " + wid.toString());
3,441: me.error("Element " + j.toString() + " in restacking list is invalid!");
3,553: * Display an error message.
3,556: * The error text to display.
3,558: me.error = function(text)
3,560: console.error(text);
3,743: me.error("setCursorPosition() should not be used in GUI!");
3,751: me.error("setCursorStatus() should not be used in GUI!");
3,801: me.error("clear() should not be used in GUI!");
3,854: me.error("Cannot draw window for id that is invalid.");
3,860: me.error("Cannot draw non-existent window with id " + wid.toString());

And p2j.logger.js defines this function
   /**
    * Log an error message.
    *
    * @param    {string} text
    *           The error text to display.
    */
   me.error = function(text)
   {
      save(text);
      console.error(text);
      if (p2j.sound)
      {
         p2j.sound.beep();
      }
   };

that is used by @p2j.canvas_renderer.js (11 matches)
206: p2j.logger.error("parseColor() spec must be a string");
212: p2j.logger.error("parseColor() spec must have length of 7");
218: p2j.logger.error("parseColor() spec must start with #");
482: p2j.screen.error("Trying to draw unknown cached image for md5 " + md5 + "!");
760: this.logger.error("Invalid array form of color specification.");
775: this.logger.error("Invalid string form of color specification.");
1,540: this.logger.error("Invalid array form of color specification.");
1,555: this.logger.error("Invalid string form of color specification.");
1,959: * the previously saved context state.  It will error out if some sanity checks don't pass.
1,983: this.logger.error("Mismatching translate pop values, expected (" +
1,990: this.logger.error("Out of order translate pop!"); 

#2 Updated by Eric Faulhaber almost 6 years ago

  • Priority changed from Normal to High
  • Assignee set to Sergey Ivanovskiy

Please remove the beeping from all errors EXCEPT those that are fatal to the client process.

#3 Updated by Sergey Ivanovskiy almost 6 years ago

I would like to remove beep consistently and to leave them only for business logic. The beeping means nothing for the client if it fails accidentally, but error logs are valuable.
What is the branch for these changes?

#4 Updated by Greg Shah almost 6 years ago

Why not put it in 3565b?

#5 Updated by Greg Shah almost 6 years ago

  • Project changed from Bugs to User Interface
  • Start date deleted (05/15/2018)
  • Status changed from New to WIP

#6 Updated by Sergey Ivanovskiy almost 6 years ago

OK. Committed revision 11267 (3565b) removed beep consistently.

#7 Updated by Eric Faulhaber almost 6 years ago

  • % Done changed from 0 to 100
  • Status changed from WIP to Closed

Just tested with this and it is a soothing change :-)

Also available in: Atom PDF