xPhoton and phindows cache

I didn’t pay attention to it before but it seems that when we run X
application, phindows caches the screen at every redraw. We can see a
SAVED … message on the phindows title bar.
The problem is that when the X application redraws its window quickly,
phindows ends to crashe.

Alain.

In article <3A3DDC21.AE199A10@icbt.com>,
Alain Bonnefoy <alain.bonnefoy@icbt.com> wrote:

I didn’t pay attention to it before but it seems that when we run X
application, phindows caches the screen at every redraw. We can see a
SAVED … message on the phindows title bar.

What is the X program drawing? text,images,…
In any event, a lot of X drawing is done to pixmaps which
Xphoton tries to allocate in shared memory (to minimize
bandwidth to the grafx driver) Shared memory images are
candidates for phrelay/phditto/phindows caching…

The problem is that when the X application redraws its window quickly,
phindows ends to crashe.

There was a recent fix to phrelay regarding shared memory images
that would cause such a crash and possibly the repeated caching
of the same image (I can’t tell from your description)


Garry Turcotte (R&D)
QNX Software Systems, Ltd.

Garry Turcotte a écrit :

In article <> 3A3DDC21.AE199A10@icbt.com> >,
Alain Bonnefoy <> alain.bonnefoy@icbt.com> > wrote:
I didn’t pay attention to it before but it seems that when we run X
application, phindows caches the screen at every redraw. We can see a
SAVED … message on the phindows title bar.

What is the X program drawing? text,images,…
In any event, a lot of X drawing is done to pixmaps which
Xphoton tries to allocate in shared memory (to minimize
bandwidth to the grafx driver) Shared memory images are
candidates for phrelay/phditto/phindows caching…

Both, but not really complex graphics redraw, only buttons, checkboxs,
(now, but soon bargraph, curves).
In fact it’s tcl/tk application. you can see these windows in the joined
files.


The problem is that when the X application redraws its window quickly,
phindows ends to crashe.

There was a recent fix to phrelay regarding shared memory images
that would cause such a crash and possibly the repeated caching
of the same image (I can’t tell from your description)

Ok but what means ‘the same image’. In our case, the image window often
changes, maybe just for a check box or a counter value.
It seems that photon and xphoton windows are not cached in the same way by
phindows.

Alain.

In article <3A3F561E.398FBBC8@icbt.com>,
Alain Bonnefoy <alain.bonnefoy@icbt.com> wrote:

-=-=-=-=-=-

Garry Turcotte a écrit :

In article <> 3A3DDC21.AE199A10@icbt.com> >,
Alain Bonnefoy <> alain.bonnefoy@icbt.com> > wrote:
I didn’t pay attention to it before but it seems that when we run X
application, phindows caches the screen at every redraw. We can see a
SAVED … message on the phindows title bar.

What is the X program drawing? text,images,…
In any event, a lot of X drawing is done to pixmaps which
Xphoton tries to allocate in shared memory (to minimize
bandwidth to the grafx driver) Shared memory images are
candidates for phrelay/phditto/phindows caching…


Both, but not really complex graphics redraw, only buttons, checkboxs,
(now, but soon bargraph, curves).
In fact it’s tcl/tk application. you can see these windows in the joined
files.

tk probably does most of its drawing to pixmaps then blits them
to the screen. So drawing lines/rectangles/etc get rendered by
Xphoton into memory(pixmap) and drawn to Photon as a complete image(blit).
I’m just guessing at what tk is doing but depending on the raster
operation required (and a lot of other things) in X, Xphoton will
use standard X server code to render to memory before drawing in Photon.
As much as possible, Xphoton will translate X draw commands directly
to the comparable Photon draw command. However, even some simple
draws must be done to memory to ensure proper rendering, resulting
in an image being drawn in Photon…

The problem is that when the X application redraws its window quickly,
phindows ends to crashe.

There was a recent fix to phrelay regarding shared memory images
that would cause such a crash and possibly the repeated caching
of the same image (I can’t tell from your description)


Ok but what means ‘the same image’. In our case, the image window often
changes, maybe just for a check box or a counter value.
It seems that photon and xphoton windows are not cached in the same way by
phindows.

From a pessimistic point of view :slight_smile: you can consider the entire
X window may be an image and will be cached by phindows


Garry Turcotte (R&D)
QNX Software Systems, Ltd.

Garry Turcotte a écrit :

In article <> 3A3F561E.398FBBC8@icbt.com> >,
Alain Bonnefoy <> alain.bonnefoy@icbt.com> > wrote:
-=-=-=-=-=-

Garry Turcotte a écrit :

In article <> 3A3DDC21.AE199A10@icbt.com> >,
Alain Bonnefoy <> alain.bonnefoy@icbt.com> > wrote:
I didn’t pay attention to it before but it seems that when we run X
application, phindows caches the screen at every redraw. We can see a
SAVED … message on the phindows title bar.

What is the X program drawing? text,images,…
In any event, a lot of X drawing is done to pixmaps which
Xphoton tries to allocate in shared memory (to minimize
bandwidth to the grafx driver) Shared memory images are
candidates for phrelay/phditto/phindows caching…


Both, but not really complex graphics redraw, only buttons, checkboxs,
(now, but soon bargraph, curves).
In fact it’s tcl/tk application. you can see these windows in the joined
files.

tk probably does most of its drawing to pixmaps then blits them
to the screen. So drawing lines/rectangles/etc get rendered by
Xphoton into memory(pixmap) and drawn to Photon as a complete image(blit).
I’m just guessing at what tk is doing but depending on the raster
operation required (and a lot of other things) in X, Xphoton will
use standard X server code to render to memory before drawing in Photon.
As much as possible, Xphoton will translate X draw commands directly
to the comparable Photon draw command. However, even some simple
draws must be done to memory to ensure proper rendering, resulting
in an image being drawn in Photon…




The problem is that when the X application redraws its window quickly,
phindows ends to crashe.

There was a recent fix to phrelay regarding shared memory images
that would cause such a crash and possibly the repeated caching
of the same image (I can’t tell from your description)


Ok but what means ‘the same image’. In our case, the image window often
changes, maybe just for a check box or a counter value.
It seems that photon and xphoton windows are not cached in the same way by
phindows.

From a pessimistic point of view > :slight_smile: > you can consider the entire
X window may be an image and will be cached by phindows


Garry Turcotte (R&D)
QNX Software Systems, Ltd.

After some tests, it’s clear that the problem doesn’t come from
phrelay/phindows. If we execute the same applications on a ‘slow machine’
(P90), with a quick redraw, the XPhoton server crashes with ‘X connection to
display 127.1:0.0 broken (explicit kill or server shutdown)’ message. Same
problem if we drag these windows in full dragging mode.
It seems that there is no problem with some x apps like ddd for example.
So the problem is in the way that Tcl use the X server, maybe not very well
supported by XPhoton/Photon.

Alain.

In article <3A430128.58AB19E7@icbt.com>,
Alain Bonnefoy <alain.bonnefoy@icbt.com> wrote:

After some tests, it’s clear that the problem doesn’t come from
phrelay/phindows. If we execute the same applications on a ‘slow machine’
(P90), with a quick redraw, the XPhoton server crashes with ‘X connection to
display 127.1:0.0 broken (explicit kill or server shutdown)’ message. Same
problem if we drag these windows in full dragging mode.
It seems that there is no problem with some x apps like ddd for example.
So the problem is in the way that Tcl use the X server, maybe not very well
supported by XPhoton/Photon.

Are you sure the server is crashing? The message sounds
like it just didn’t like something the app did, and it
broke the connection.
In any event, it sounds like a bug somewhere. Can you get
a dump file or give me a small example program?


Garry Turcotte (R&D)
QNX Software Systems, Ltd.

Garry Turcotte a écrit :

In article <> 3A430128.58AB19E7@icbt.com> >,
Alain Bonnefoy <> alain.bonnefoy@icbt.com> > wrote:

After some tests, it’s clear that the problem doesn’t come from
phrelay/phindows. If we execute the same applications on a ‘slow machine’
(P90), with a quick redraw, the XPhoton server crashes with ‘X connection to
display 127.1:0.0 broken (explicit kill or server shutdown)’ message. Same
problem if we drag these windows in full dragging mode.
It seems that there is no problem with some x apps like ddd for example.
So the problem is in the way that Tcl use the X server, maybe not very well
supported by XPhoton/Photon.

Are you sure the server is crashing? The message sounds
like it just didn’t like something the app did, and it
broke the connection.
In any event, it sounds like a bug somewhere. Can you get
a dump file or give me a small example program?


Garry Turcotte (R&D)
QNX Software Systems, Ltd.

Yes, the server is killed.
Maybe difficult to send you a sample program as it’s a tcl applic but I know that
someone has ported tcl at qnx (Colin Burgess I think).
So, I could send the tcl/tk script or the full package if you realy want.

Alain.

In article <3A5B1A91.AD9AD6B5@icbt.com>,
Alain Bonnefoy <alain.bonnefoy@icbt.com> wrote:

Garry Turcotte a écrit :

In article <> 3A430128.58AB19E7@icbt.com> >,
Alain Bonnefoy <> alain.bonnefoy@icbt.com> > wrote:

After some tests, it’s clear that the problem doesn’t come from
phrelay/phindows. If we execute the same applications on a ‘slow machine’
(P90), with a quick redraw, the XPhoton server crashes with ‘X connection to
display 127.1:0.0 broken (explicit kill or server shutdown)’ message. Same
problem if we drag these windows in full dragging mode.
It seems that there is no problem with some x apps like ddd for example.
So the problem is in the way that Tcl use the X server, maybe not very well
supported by XPhoton/Photon.

Are you sure the server is crashing? The message sounds
like it just didn’t like something the app did, and it
broke the connection.
In any event, it sounds like a bug somewhere. Can you get
a dump file or give me a small example program?


Garry Turcotte (R&D)
QNX Software Systems, Ltd.

Yes, the server is killed.

Use dumper to get a dump file, it’ll be easier…

Maybe difficult to send you a sample program as it’s a tcl applic but I
know that
someone has ported tcl at qnx (Colin Burgess I think).

A lot of things get ported, very few remain… :slight_smile:

So, I could send the tcl/tk script or the full package if you realy want.

I’d prefer the Xphoton.core file. (I may ask for the script later)


Garry Turcotte (R&D)
QNX Software Systems, Ltd.