The most common situation in which one PEXlib client can adversely
affect another occurs when a client passes bad values in its data.
This may cause a server to dump core, thus affecting all the clients
connected to that server. However, the effects of this vary according
the connection method of the PEXlib client — whether DHA,
PEX, or X.
In the PEX method, a client can send bad floating-point data
values to the PEX server, causing it to abort and affecting all
other PEX clients. The HP PEX server supplies reasonable default
values as results for operations involving bad data. The resulting
images may not appear as you expected them, but the server will
not fail. The effects of bad data on non-HP servers is unknown.
For clients using the X protocol method to render to a non-PEX-capable
server, an abort will normally occur only on the client side —
without affecting any other X or PEX clients. However, if for some
reason the client aborts the X server itself, all other X/PEX clients
also abort just as if any other X client aborts the X server.
Benefits gained by operating clients in the DHA protocol method
are speed, isolation from other clients, and if a DHA client aborts,
it is not likely to affect other PEXlib clients.
The following table describes the most common data values
causing these problems and should be avoided:
Table 3-4 Data Values That Cause Problems
NaN
("Not a Number") | There is a reserved value in floating-point
bit space that is called NaN.
It is generated, for example, when 0/0 is evaluated. |
+Infinity | There is a reserved value in floating-point
bit space for positive infinity. |
-Infinity | There is a reserved value in floating-point
bit space for negative infinity. |
It is important to know of these three conditions because
many applications generate their graphics data as part of some application-specific
calculations — and generated data is prone to producing
these "toxic numbers." If this occurs, your displayed images can
appear with unexpected results. To avoid this situation, your application
must not generate these three conditions or must filter these conditions
from their data.