Bug#423141: P.S.

2007-07-01 Thread Bernhard R. Link
* H. S. Teoh [EMAIL PROTECTED] [070630 20:06]:
  Could you try the attached program, if it also causes the crash?
  (Needs libx11-dev installed and compile with
   gcc xfakewindow.c -o xfakewindow -lX11)
 [...]
 Did you forget the attachment?

Second attempt...

Hochachtungsvoll,
Bernhard R. Link
#include assert.h
#include stdio.h
#include stdbool.h
#include stdlib.h
#include unistd.h

#include X11/X.h
#include X11/Xatom.h
#include X11/Xutil.h

int main(int argc, char *argv[]) {
	Display *display;
	int screen;
	Visual *visual;
	Window w;
	XSetWindowAttributes attributes = {
		.background_pixel= 0,
		.event_mask = KeyPressMask,
	};
	Status s;
	char *names[] = { Intel\302\256 Motherboards - Opera};
	XTextProperty text,tt;
	XEvent event;
	struct {
		const char *name;
		XICCEncodingStyle style;
		char *list[2]; int nlist;
		Atom atom;
	} properties[] = {
		{WM_CLIENT_MACHINE, XStringStyle, {crystal}, 1},
		{WM_LOCALE_NAME, XStringStyle, {en_US.UTF-8},1},
		{WM_WINDOW_ROLE, XStringStyle, {opera-mainwindow#1},1},
		{OPERA_VERSION, XStringStyle, {Opera 9.21},1},
		{OPERA_USER, XStringStyle, {1000},1},
		{OPERA_PREFERENCE, XStringStyle, {/home/hsteoh/.opera},1},
		{_NET_WM_NAME, XUTF8StringStyle,
			{Intel\302\256 Motherboards - Opera},
		1}
	};
	XClassHint classhint = {opera, Opera};
	Atom _NET_WM_PID;
	long pid = getpid();
	int i;

	display = XOpenDisplay(getenv(DISPLAY));
	if( display == NULL )
		return 1;
	screen = DefaultScreen(display);
	visual = DefaultVisual(display,screen);

	for( i = 0 ; i  sizeof(properties)/sizeof(properties[0]) ; i++ ) {
		properties[i].atom = XInternAtom(display, properties[i].name, False);
	}
	_NET_WM_PID = XInternAtom(display, _NET_WM_PID, False);

	w = XCreateWindow(display, RootWindow(display,screen), 0, 0, 100, 100, 1,
			DefaultDepth(display,screen), InputOutput,
			visual, CWBackPixel|CWEventMask, attributes);
	s = Xutf8TextListToTextProperty(display, names, 1, XStringStyle, text);
	XSetClassHint(display, w, classhint);
	XSetWMName(display, w, text);
	for( i = 0 ; i  sizeof(properties)/sizeof(properties[0]) ; i++ ) {
		properties[i].atom = XInternAtom(display, properties[i].name, False);
		s = Xutf8TextListToTextProperty(display,
properties[i].list,
properties[i].nlist,
properties[i].style, tt);
		assert( s == 0 );
		XSetTextProperty(display, w, tt, properties[i].atom);
	}
	XChangeProperty(display, w, _NET_WM_PID, XA_CARDINAL, 32,
			PropModeReplace, (unsigned char*)pid, 1);
	XMapWindow(display, w);
	XSync(display, False);
	for( i = 0 ; i  1000 ; i++ ) {
		XSetWMName(display, w, text);
		XSync(display, False);
	}
	while( XNextEvent(display,event) ) {
		if( event.type == KeyPress )
			break;
	}
	XUnmapWindow(display, w);
	XDestroyWindow(display, w);
	XSync(display, False);
	return 0;
}


Bug#423141: P.S.

2007-07-01 Thread H. S. Teoh
On Sun, Jul 01, 2007 at 11:59:59AM +0200, Bernhard R. Link wrote:
 * H. S. Teoh [EMAIL PROTECTED] [070630 20:06]:
   Could you try the attached program, if it also causes the crash?
   (Needs libx11-dev installed and compile with
gcc xfakewindow.c -o xfakewindow -lX11)
  [...]
  Did you forget the attachment?
 
 Second attempt...
[...]

Yep, it crashes. Although, the way the program is written is rather
tricky to test, since it exits on keystrokes, so I have to hit C-t w
before starting it. :-) I guess this also has a side benefit of testing
an alternate code path in ratpoison that leads to the same crash
(updating of window list rather than just displaying it).


T

-- 
Never ascribe to malice that which is adequately explained by
incompetence. -- Napoleon Bonaparte


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#423141: P.S.

2007-07-01 Thread Bernhard R. Link
* H. S. Teoh [EMAIL PROTECTED] [070701 15:40]:
 Yep, it crashes. Although, the way the program is written is rather
 tricky to test, since it exits on keystrokes, so I have to hit C-t w
 before starting it. :-)

oh, sorry. I don't have any modifiers in my escape key. I guess that's
why that was no problem for me.

 I guess this also has a side benefit of testing
 an alternate code path in ratpoison that leads to the same crash
 (updating of window list rather than just displaying it).

Thanks for testing this. Now I 'only' have to find out why it crashes for
you but not for me. (Though I have not yet tested with your fonts or
with a real X server (opposed to Xephyr) or the same libs (except
libx11)).
That may need some days before I can tell more. (Or have ideas for new 
testcases...)

Hochachtungsvoll,
Bernhard R. Link


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#423141: P.S.

2007-06-30 Thread Bernhard R. Link
* H. S. Teoh [EMAIL PROTECTED] [070630 06:45]:
 Also, I might add, this only happens with Opera window titles. I tried
 to set my rxvt title to a string containing the reg; character, but it
 displayed correctly. I'm not sure if this could be a bug in Opera (maybe
 it's not encoding the window title properly---I'm not sure how to check
 since ratpoison crashes outright trying to display it). But in any case,
 ratpoison shouldn't crash.

Could you send me the output of xprop on that window when it displays
that character? That would make it easier to try to reproduce it.

Especially as ratpoison is not doing much with the content, it might
also be a problem within xlibs. Could you mail me the versions
of ratpoison and its dependencies?
(For example the output of dpkg -s ratpoison libx11-6 libxext6 | grep Version)

Hochachtungsvoll,
Bernhard R. Link


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#423141: P.S.

2007-06-30 Thread H. S. Teoh
On Sat, Jun 30, 2007 at 11:11:25AM +0200, Bernhard R. Link wrote:
 * H. S. Teoh [EMAIL PROTECTED] [070630 06:45]:
  Also, I might add, this only happens with Opera window titles. I
  tried to set my rxvt title to a string containing the reg;
  character, but it displayed correctly. I'm not sure if this could be
  a bug in Opera (maybe it's not encoding the window title
  properly---I'm not sure how to check since ratpoison crashes
  outright trying to display it). But in any case, ratpoison shouldn't
  crash.
 
 Could you send me the output of xprop on that window when it displays
 that character? That would make it easier to try to reproduce it.

Ah, so *that's* how I can get info out of the window without a WM. :-)
The output is attached.


 Especially as ratpoison is not doing much with the content, it might
 also be a problem within xlibs. Could you mail me the versions
 of ratpoison and its dependencies?
[...]

ii  libc6  2.5-9+b1   GNU C Library: Shared libraries
ii  libreadline5   5.2-3  GNU readline and history libraries, run-time
ii  libx11-6   2:1.0.3-7  X11 client-side library
ii  libxext6   1:1.0.3-2  X11 miscellaneous extension library
ii  libxinerama1   1:1.0.2-1  X11 Xinerama extension library
ii  libxtst6   1:1.0.1-5  X11 Testing -- Resource extension library
ii  ratpoison  1.4.1-4keyboard-only window manager


Hope this helps to track down the problem.


T

-- 
Life is all a great joke, but only the brave ever get the point. --
Kenneth Rexroth
_NET_WM_USER_TIME(CARDINAL) = 2095353897
WM_STATE(WM_STATE):
window state: Normal
icon window: 0x0
_NET_WM_NAME(UTF8_STRING) = 0x49, 0x6e, 0x74, 0x65, 0x6c, 0xc2, 0xae, 0x20, 
0x4d, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x73, 0x20, 
0x2d, 0x20, 0x4f, 0x70, 0x65, 0x72, 0x61
XdndAware(ATOM) = ATOM
_MOTIF_DRAG_RECEIVER_INFO(_MOTIF_DRAG_RECEIVER_INFO) = 0x6c, 0x0, 0x5, 0xb7, 
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xa6, 0xb7, 0x10, 0x0, 0x0, 0x0
OPERA_PREFERENCE(STRING) = /home/hsteoh/.opera
OPERA_USER(STRING) = 1000
OPERA_VERSION(STRING) = Opera 9.21
WM_CLIENT_LEADER(WINDOW): window id # 0x82
WM_WINDOW_ROLE(STRING) = opera-mainwindow#1
_NET_WM_PID(CARDINAL) = 24299
_NET_WM_WINDOW_TYPE(ATOM) = _NET_WM_WINDOW_TYPE_NORMAL
WM_PROTOCOLS(ATOM): protocols  WM_DELETE_WINDOW, WM_TAKE_FOCUS, _NET_WM_PING, 
WM_SAVE_YOURSELF
WM_NAME(STRING) = Intel\302\256 Motherboards - Opera
WM_LOCALE_NAME(STRING) = en_US.UTF-8
WM_CLASS(STRING) = opera, Opera
WM_HINTS(WM_HINTS):
Client accepts input or input focus: True
Initial state is Normal State.
bitmap id # to use for icon: 0x8b
bitmap id # of mask for icon: 0x8d
window id # of group leader: 0x83
WM_NORMAL_HINTS(WM_SIZE_HINTS):
user specified location: 0, 0
program specified location: 0, 0
user specified size: 1022 by 766
program specified size: 1022 by 766
program specified minimum size: 1 by 154
window gravity: NorthWest
WM_CLIENT_MACHINE(STRING) = crystal


Bug#423141: P.S.

2007-06-30 Thread Bernhard R. Link
* H. S. Teoh [EMAIL PROTECTED] [070630 16:00]:
 Hope this helps to track down the problem.

Could you try the attached program, if it also causes the crash?
(Needs libx11-dev installed and compile with
 gcc xfakewindow.c -o xfakewindow -lX11)

Hochachtungsvoll,
Bernhard R. Link


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#423141: P.S.

2007-06-30 Thread H. S. Teoh
On Sat, Jun 30, 2007 at 06:57:01PM +0200, Bernhard R. Link wrote:
 * H. S. Teoh [EMAIL PROTECTED] [070630 16:00]:
  Hope this helps to track down the problem.
 
 Could you try the attached program, if it also causes the crash?
 (Needs libx11-dev installed and compile with
  gcc xfakewindow.c -o xfakewindow -lX11)
[...]

Did you forget the attachment?


T

-- 
Computers are like a jungle: they have monitor lizards, rams, mice,
c-moss, binary trees... and bugs.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#423141: P.S.

2007-06-29 Thread H. S. Teoh
Also, I might add, this only happens with Opera window titles. I tried
to set my rxvt title to a string containing the reg; character, but it
displayed correctly. I'm not sure if this could be a bug in Opera (maybe
it's not encoding the window title properly---I'm not sure how to check
since ratpoison crashes outright trying to display it). But in any case,
ratpoison shouldn't crash.


T

-- 
Let's eat some disquits while we format the biskettes.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]