Category: WSERV

The window server runs continuously and brings the machine down if it crashes, so it cannot panic its own thread when it detects an error in one of its client’s requests. Instead it panics the client’s thread using CSession::Panic(). These panics have a category of WSERV.

Note that some panics are raised in debug builds only.


Out of range opcode.

The client has sent a request opcode that was not recognized. Each server-side object can only handle some of the requests defined in the window server, and if the request isn’t recognized, this panic is raised.

Clients would normally only get this is if they bypass the normal Window Server API.


Invalid command buffer.

A corrupt buffer of requests was discovered by the server. This is raised when the buffer itself is noticeably broken, and not when the commands in it are wrong.


Invalid handle.

The server couldn’t find the target object for a request in the handle index. This can be raised when a command is sent to the handle for a window that has been closed, for example.



A handle whose value was NULL was detected.

For example, when Constructing one of the subclasses of the client-side RWindowBase with a client handle argument of NULL.

On the server side, a TWsClCmdCreateWindow with a client handle field of NULL passed as argument to CWsClientWindow::ConstructL() will raise this error.


A single drawing command was too big to fit into the client-side buffer.

The size of the buffer may be increased. See RWsSession::SetBufferSizeL() and RWsSession::SetMaxBufferSizeL().


Invalid window handle.

A handle which should have referred to a window of a particular type referred to a window of another type, or the object index did not recognize the handle.

On the server side, this panic is ultimately raised by CWsClient::HandleToWindow() and CWsClient::HandleToClientWindow() during handle conversions.


Invalid bitmap handle.

A corrupt bitmap handle was encountered. This is a common panic uncovered when a bitmap handle refers to nothing, or to a server-side object that isn’t a bitmap.


  • In response to an EWsGcOpUseBrushPattern request if the bitmap parameter couldn’t be used. On the client side, CWindowGc::UseBrushPattern() sends this request.

  • In response to an EWsSpriteOpAppendMember request when the bitmaps for the sprite member can't be created on the server side. On the client side, RWsSpriteBase::AppendMember() sends this request.

  • Any failed attempt to duplicate a supplied bitmap.


Event read already outstanding.

RWsSession::EventReady(), RWsSession::RedrawReady(), or RWsSession::PriorityKeyReady() was called again when an event read was already outstanding, when an event was waiting to be delivered by the window server.


Attempted to use a non-active graphics context.

A drawing request was sent to a graphics context when the context was not active.

On the server side, this panic is raised by CWsGc::CommandL() on all requests received when the context isn’t active except EWsGcOpActivate, EWsGcOpDeactivate, EWsGcOpFree, and EWsGcOpTestInvariant.


Attempted to activate an already active graphics context.

On the server side, this is raised by CWsGc::Activate() as a response to a EWsGcOpActivate request.

The request is sent by the client-side method CWindowGc::Activate().


Window already active.

An attempt was made to reactivate an active window. The request is sent by the client-side method RWindowBase::Activate().

On the server side, this panic is raised by CWsClientWindow::Activate() in response to an EWsWinOpActivate request.


Already inside a begin/end redraw pair.

A begin-redraw window request was made when the window had already begun redrawing. Begin-redraw messages are paired with end-redraw messages, and ordering is important. Invoking RWindow::BeginRedraw(), then RWindow::BeginRedraw() again before the corresponding RWindow::EndRedraw() raises this panic.

On the server side, this panic is raised if an EWsWinOpBeginRedraw request is sent twice before the closing EWsWinOpEndRedraw.


Invalid font handle.

On the client-side is raised if CWindowGc::UseFont() is called with an invalid font handle.

On the server side, CWsGc::SetGcAttribute() raises this error in response to an EWsGcOpUseFont request.


Printing with no active font.

A command to draw text to a window was sent to a graphics context when no font was set. Any of the overloads of CWindowGc::DrawTextVertical() or CWindowGc::DrawText() might cause the panic to be raised; the font should be set using CWindowGc::UseFont() first.

On the server side, this panic is raised by CWsGc::DoDrawCommand() in response to any of the requests to display text defined in TWsGcOpcodes.


Attempted to set an invalid text cursor type, see RWindowGroup::SetTextCursor().

Valid types are defined in the TTextCursor struct.


A drawing command was sent to a graphics context active on a group window.


Not used.


Not used.


Attempted to use a patterned brush when the pattern bitmap has not yet been set UseBrushPattern().


Not used.


Attempted to do a client destroy function on an illegal handle.

A client tried to destroy or cancel a server-side object by its handle on an unrecognised handle, or on a handle of the wrong type for the operation.

This panic may be caused by the RWindowGroup::CancelCaptureKeyUpAndDowns() or RWindowGroup::CancelCaptureKey() methods. These correspond to the EWsWinOpCancelCaptureKeyUpsAndDowns and EWsWinOpCancelCaptureKey server requests. In this case, the panic means that there is no such capture key object in existence in the target window group.


Panic from the Anim DLL.

An animation DLL tried either changing its default or next timing interval when its timing mode was set to ESyncNone, or activating a graphics context when the context was already activated.

There are a variety of other reasons why this panic might be raised, all which are Anim DLL related. The Animation writer can also cause functions raise this panic.


Invalid Anim object handle.

A null animation handle was detected in the server on receipt of an animation command, possibly because the relevant animation has been deleted. This panic may be raised by a subclass of RAnim calling RAnim::Command() or RAnim::CommandReply().

On the server side, the EWsAnimDllOpCommandReply and EWsAnimDllOpCommand requests can raise this panic in CWsAnimDll.


Leave from a non-leaving animation function.

Code in an animated DLL called by the server invoked Leave(). Animated DLL code is provided by the client and run by the server, so non-handled leaves are trapped and the notification is passed on as a client panic.


Not used.


Not used.


Not used.


Inconsistent polygon or polyline data was supplied. For example when restarting without finishing an old polygon.


A client attempted to set a negative shadow height.

This panic is caused by a call to RWindowBase::SetShadowHeight() with a negative argument.

On the server side, CWsClientWindow::CommandL() raises the panic in response to an invalid EWsWinOpSetShadowHeight request.


Not used.


The client tried to construct a window with an invalid redraw type. The valid redraw types defined in the enumeration TWinTypes of w32cmd.h.

On the server side, this panic is raised by CWsClientWindow::ConstructL() in response to an initialisation message containing an invalid redraw type.


A server-side redraw region is almost certainly corrupt.

This panic is raised when an EWsWinOpGetInvalidRegion is received by a CWsRedrawMsgWindow with a TInt parameter of zero or less.


The client failed to provide a reply buffer to a server-side function when one was needed.

All server-side functions that need more space for their reply than a TInt use the client’s reply buffer. If the client fails to provide space for such replies, this panic will be emitted.

This panic is raised by CWsClient::ReplyBuf() when CWsClient ’s reply buffer is null.


Not used.


A client passed an invalid or unrecognized corner type or flag.

This panic is raised in response to a client call to RWindowBase::SetCornerType() when specifying inconsistent or non-existent flags.

Valid flags are masked by ECornerTypeMask, and recognised types are defined in TCornerType. These are all defined in w32std.h.

The server raises this panic as a response to EWsWinOpSetCornerType request with an undefined corner type or an unrecognised flag in its parameters.


The server was asked to update a region of a backed-up window which has not had MaintainBackup called on it.

A client-side call to either form of RBackedUpWindow::UpdateScreen() may raise this panic.

On the server side, the panic is raised in response to an EWsWinOpUpdateScreenRegion or EWsWinOpUpdateScreen request when not maintaining a full backup of a backed-up window.


Panic raised when it was not possible to read or write data to the client thread. The data is usually contained in a descriptor.


The client attempted to access a sprite after the sprite's window was destroyed. Note that pointer cursors are implemented as sprites.


A client requested event data without having received an event telling it that the data was ready.


The mask for a sprite is smaller than the sprite’s bitmap. A mask is permitted to be larger than its bitmap.


Bad sprite handle.

A null sprite handle was encountered, or a handle which was supposed to refer to a sprite referred to something else.

The client-side methods RWindowTreeNode::SetCustomPointerCursor() and RWsSession::SetSystemPointerCursor(), amongst others, can cause this panic to be raised; they correspond to the server requests EWsWinOpSetCustomPointerCursor and EWsClOpSetSystemPointerCursor.


A client attempted to set or clear a system pointer cursor without first owning the list of system pointer cursors.

RWsSession::SetSystemPointerCursor() and RWsSession::ClearSystemPointerCursor() can raise this panic. See also RWsSession::ClaimSystemPointerCursorList() and RWsSession::FreeSystemPointerCursorList().

The server requests which can raise this panic are EWsClOpSetSystemPointerCursor and EWsClOpClearSystemPointerCursor.


A client attempted to enable a pointer move buffer when none was allocated.

RWindowBase::EnablePointerMoveBuffer() can cause this panic to be emitted; the corresponding server request is EWsWinOpEnablePointerMoveBuffer.


Raised in response to commands that send a string, when the string has been incorrectly stored in the command buffer.


Not used.


An invalid call or request parameter was detected by CWsPassword. This can be caused:

  • By RWindowBase::PasswordWindow() sending an EWsWinOpPasswordWindow server request whose password mode parameter is not recognised.

  • By an attempt to cancel the password window by a client which doesn’t own the window.

  • By RWsSession::PasswordEntered() sending a EWsClOpPasswordEntered server request when no password window has been set, or when the client does not own the password window.

Valid password modes are defined in TPasswordMode of w32std.h.


An invalid compute mode was sent to the window server. On the client side, RWsSession::ComputeMode() can do this, the window server request is EWsClOpComputeMode. Valid compute modes are defined in the enumeration RWsSession::TComputeMode, which is declared in w32std.h.


A client attempted to set the display mode of a backed-up window. This can be done with RWindowBase::SetRequiredDisplayMode() or the EWsWinOpRequiredDisplayMode server request.


A client attempted to get a message when has not been signalled in the server.

This panic can be raised on a client thread calling RWindowGroup::FetchMessage() or sending the EWsWinOpGetMessageSize or EWsWinOpGetMessage messages.


A client tried to send a second initialization message, i.e. to call RWsSession::Connect() twice.


A client attempted to send a message without specifying a target window.

This can be raised, for example, in response to RWsSession::RequestOffEvents()


A client attempted to perform and operation on a window that has had its parent or ancestor deleted. An operation which might raise this panic could be setting the window size, position or extent.


A client attempted to reset a window group’s default owning window. For example, by calling the function RWindowGroup::DefaultOwningWindow() twice on the same window group.

This is only raised in debug builds.


A client attempted to perform an operation on an invalid screen mode.

For example, if the client called the functions CWsScreenDevice::GetScreenModeSizeAndRotation() or CWsScreenDevice::SetScreenMode() with an illegal index.


A client attempted to set an invalid screen enforcement mode.

The valid screen mode enforcement modes are defined in TScreenModeEnforcement.


A client specified an event type which was not a pointer event, when this is what was required by the operation. For example the RWindowGroup::SimulatePointerEvent() function.


A client attempted to specify a screen rotation or orientation that is not allowed. Each screen size mode has a list of allowed rotations.


A client attempted to call a function that can only be called on a top level client window on a lower level window. A top level client window is a window with a window group as a parent, for example the RWindowBase::MoveToGroup() function.


A client attempted to use a RDirectScreenAccess object's member functions in the wrong order.


The handle to a window server resource is already in use (debug builds only).


An attempt was made to set a custom text cursor (using RWindowGroup::SetTextCursor()) but the cursor's type was not recognized.


An attempt was made to set a custom text cursor (using RWindowGroup::SetTextCursor()) whose alignment value is invalid. For valid alignment values see the TCustomTextCursorAlignment enumeration in class RWsSession.


An attempt was made to set a custom text cursor (using RWindowGroup::SetTextCursor()) that does not have any sprite members set.


An attempt was made to set a transparency operation to a window that has not been enabled to be transparent.


An multiple screen API function was called with an illegal screen number.


An attempt was made to call an event API without specifying the SwEvent capability, such as RWsSession::SimulateKeyEvent(), RWindowGroup::SimulatePointerEvent().


A leave occurred whilst processing a command in the middle of the buffer.


An attempt was made to try to use a group window with a deleted screen device.


Redraw storing cannot be disabled for transparent window.


Bad internal state in CWsGraphic code.


An attempt was made to use an uninitialised CWsClient.


Client IPC message is NULL.


Incompatible use of window transparency and background surface or overlay.


A notification request is pending for a window so new requests cannot be added for that window.


An incorrect surface type has been used.


Attempted use of a surface configuration without any valid members.


Not used.


Illegal display mode is used.


A draw operation was performed on the CWindowGc outside an RWindow::BeginRedraw() or [[[ERROR: [NOKX000E] Unable to find definition for key reference 'RWindow']]]EndRedraw() pair.


General invalid parameter code for invariant checking.


Invalid drawable source handle.


Child applications can only be constructed on the same screen as their parent.


With screen capture disabled, an unexpected invalid request has been received.


Use of a display configuration without valid members.


Invalid use of FixNativeOrientation()