Hi,
Using the CVS version of libxnee, cnee kept segfaulting:
li...@monica [17:26]:~/src/xnee/cnee/src$ ./cnee --keyboard --record --str 5
Sleep workaround a strange RECORD/Xtest problem around 2009 (ignore it)
Workaround: Adding your device events as delivered events to get them recorded.
You can ignore this message
X info: The X.Org Foundation 1 6 5
RET: 1
[snip]
error-range 0-0
X info: The X.Org Foundation 1 6 5
RET: 1
Workaround: Creating context on data display instead of control
You can ignore this message
X info: The X.Org Foundation 1 6 5
RET: 1
Workaround: Creating context on data display instead of control
You can ignore this message
X info: The X.Org Foundation 1 6 5
RET: 1
Workaround: Disabling context on data display instead of control
You can ignore this message
Segmentation fault
anyway the offending line of code is:
xnee_record:821 else if (strstr(xd->x_vendor_name, "Sun Microsystems") )
for some reason (because the code is exiting?) this function is called
but there is nothing in xd->x_vendor_name (xd->x_vendor_name == NULL);
maybe its a weird race condition.
Attached is a patch that corrects this issue. Also attached is the
complete output of cnee before the patch.
Best wishes, Elizabeth B.
Index: xnee_record.c
===================================================================
RCS file: /sources/xnee/xnee/libxnee/src/xnee_record.c,v
retrieving revision 1.66
diff -u -r1.66 xnee_record.c
--- xnee_record.c 24 Dec 2009 09:57:36 -0000 1.66
+++ xnee_record.c 30 Dec 2009 23:38:45 -0000
@@ -806,30 +806,28 @@
xd->x_version_minor,
xd->x_version_minor_sub);
- if (xd != NULL)
- {
-
- if ( (xd->x_vendor_name != NULL ) &&
- (strstr(xd->x_vendor_name, "X.Org") ))
- {
- if ( ( xd->x_version_major == 1 ) &&
- ( xd->x_version_minor >= 4 ) )
- {
- ret_val = 1;
- }
- }
- else if (strstr(xd->x_vendor_name, "Sun Microsystems") )
+ if (xd != NULL && (xd->x_vendor_name != NULL ))
{
-
- if ( ( xd->x_version_major == 1 ) &&
- ( xd->x_version_minor >= 3 ) )
- {
- ret_val = 1;
- }
- }
- }
+ if ( strstr(xd->x_vendor_name, "X.Org"))
+ {
+ if ( ( xd->x_version_major == 1 ) &&
+ ( xd->x_version_minor >= 4 ) )
+ {
+ ret_val = 1;
+ }
+ }
+ else if (strstr(xd->x_vendor_name, "Sun Microsystems") )
+ {
+ if ( ( xd->x_version_major == 1 ) &&
+ ( xd->x_version_minor >= 3 ) )
+ {
+ ret_val = 1;
+ }
+ }
+ }
+
printf ("RET: %d\n", ret_val);
return ret_val;
}
X info: The X.Org Foundation 1 6 5
RET: 1
####################################
# System information #
####################################
# Date: 2009:12:30
# Time: 17:37:58
# Xnee program: cnee
# Xnee version: 3.05
# Xnee home: http://www.gnu.org/software/xnee/
# Xnee info mailing list: [email protected]
# Xnee bug mailing list: [email protected]
# X version: 11
# X revision: 0
# X vendor: The X.Org Foundation
# X vendor release: 10605000
# Record version major: 1
# Record version minor: 13
# OS name: Linux
# OS Release: 2.6.30-2-686
# OS Version: #1 SMP Fri Dec 4 00:53:20 UTC 2009
# Machine: i686
# Nodename: monica
# Display name: :0.0
# Dimension: 1280x800
##############################################
# Xnee application arguments #
##############################################
# ./cnee --keyboard --record --str 5
##############################################
# Displays #
##############################################
# display :0.0
# distribute
##############################################
# Files #
##############################################
# out-file stdout
# err-file stderr
##############################################
# Key Grabs #
##############################################
# stop-key 0
# pause-key 0
# resume-key 0
# insert-key 0
# exec-key 0
# exec-program-key xnee-exec-no-program
##############################################
# Recording limits etc #
##############################################
events-to-record -1
data-to-record -1
seconds-to-record 5
# first-last
# Record all (including current) clients or only future ones
all-clients
# future-clients
# Store the starting mouse position
# store-mouse-position
##############################################
# Resolution #
##############################################
# Resolution
#recorded-resolution 1280x800
#replay-resolution 1x1
#resolution-adjustment 0
##############################################
# Speed #
##############################################
# Speed
#speed-percent 100
##############################################
# Replaying limits etc #
##############################################
max-threshold 20
min-threshold 20
tot-threshold 40
##############################################
# Feedback #
##############################################
#feedback-none
#feedback-stderr
feedback-xosd
##############################################
# Various #
##############################################
# Plugin file
# Modes (currently not used)
# synchronised-replay
# Replay offset
#replay-offset 0x0
# Human printout of X11 data (instead of Xnee format)
# human-printout
# Delay before starting record/replay
# time 0
# Various
#########################################
# Record settings #
#########################################
# data_flags 7
# rState 143069768
# xids[0] 3
# xids[1] 0
# Number of Ranges 2
# RecordRange[0]
request-range 0-0
reply-range 0-0
extension-request-major-range 0-0
extension-request-minor-range 0-0
extension-reply-major-range 0-0
extension-reply-minor-range 0-0
delivered-event-range 21-21
device-event-range 2-3
error-range 0-0
# RecordRange[1]
request-range 0-0
reply-range 0-0
extension-request-major-range 0-0
extension-request-minor-range 0-0
extension-reply-major-range 0-0
extension-reply-minor-range 0-0
delivered-event-range 2-3
device-event-range 0-0
error-range 0-0
X info: The X.Org Foundation 1 6 5
RET: 1
X info: The X.Org Foundation 1 6 5
RET: 1
X info: The X.Org Foundation 1 6 5
RET: 1
_______________________________________________
Bug-xnee mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-xnee