Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 677132

Summary: x11-terms/xterm-327: 'xterm -j' produces Warning: Cannot convert string "on" to type Int
Product: Gentoo Linux Reporter: segmentation fault <segmentation-fault>
Component: Current packagesAssignee: Johannes Huber (RETIRED) <johu>
Status: RESOLVED NEEDINFO    
Severity: normal CC: slyfox
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description segmentation fault 2019-02-02 22:23:50 UTC
This is probably an upstream bug. To make sure it is not due to any configuration "remnants" in my xrdb database, I have emptied it and checked (with 'xrdb -query') that it really does not contain anything related to xterm. Then I ran a simple

xterm -j

which produced:

Warning: Cannot convert string "on" to type Int

The same Warning occurs with my XTerm and XTerm-color resource files in place.


Reason
======

Obviously, the '-j' option on the command line sets a corresponding X resource to 'on'. The man page says '-j' "corresponds to the jumpScroll resource" - but I could not find any

jumpScroll: on

in my

/usr/share/X11/app-defaults/XTerm
/usr/share/X11/app-defaults/XTerm-color

resource files - so this must be set to 'on' somewhere internally in xterm, as soon as one passes '-j' on the command line.

However, due to some change somewhere else in the code, xterm expects an integer and not an 'on' or 'off' - that's what the warning says.

Prepending 'strace' to the invocation, I can narrow it to the following:

...
openat(AT_FDCWD, "/usr/local/share/cursors/xorg-x11/jaguarx/cursors/left_ptr", O_RDONLY) = 4
fstat(4, {st_mode=S_IFREG|0644, st_size=4160, ...}) = 0
read(4, "Xcur\20\0\0\0\0\0\1\0\1\0\0\0\2\0\375\377 \0\0\0\34\0\0\0$\0\0\0"..., 4096) = 4096
lseek(4, 0, SEEK_SET)                   = 0
read(4, "Xcur\20\0\0\0\0\0\1\0\1\0\0\0\2\0\375\377 \0\0\0\34\0\0\0$\0\0\0"..., 4096) = 4096
read(4, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 4096) = 64
close(4)                                = 0
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="5 \4\0\2\0\200\6\311\1\0\0 \0 \0007r\4\0\3\0\200\6\2\0\200\6\0\0\0\0"..., iov_len=4220}, {iov_base="XFIXES", iov_len=6}, {iov_base="\0\0", iov_len=2}], 3) = 4228
poll([{fd=3, events=POLLIN}], 1, -1)    = 1 ([{fd=3, revents=POLLIN}])
recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\1\0\26\0\0\0\0\0\1\211V\212\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 32
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="\211\0\3\0\5\0\0\0\0\0\0\0", iov_len=12}, {iov_base=NULL, iov_len=0}, {iov_base="", iov_len=0}], 3) = 12
poll([{fd=3, events=POLLIN}], 1, -1)    = 1 ([{fd=3, revents=POLLIN}])
recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\1\0\27\0\0\0\0\0\5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 32
openat(AT_FDCWD, "/usr/share/X11/XtErrorDB", O_RDONLY) = -1 ENOENT (No such file or directory)
getuid()                                = 0
geteuid()                               = 0
getuid()                                = 0
write(2, "Warning: ", 9Warning: )                = 9
write(2, "Cannot convert string \"on\" to ty"..., 38Cannot convert string "on" to type Int) = 38
write(2, "\n", 1
)                       = 1
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="\211\27\5\0\5\0\200\6\10\0\0\0left_ptrb\0\6\0\17\0\200\6", iov_len=28}, {iov_base="XFree86-Bigfont", iov_len=15}, {iov_base="\0", iov_len=1}], 3) = 44


From the above, xterm succeeds in setting the X cursor to 'jaguarx', then, after some reads and polls, it tries to open /usr/share/X11/XtErrorDB, without success - and then issues the Warning "Cannot convert string "on" to type Int". Whether the absence of XtErrorDB is the cause of the Warning, or just a 'collateral' is not clear to me.


Further info
============

Portage 2.3.51 (python 3.6.5-final-0, hardened/linux/amd64, gcc-7.3.0, glibc-2.27-r6, 4.19.18-gentoo x86_64)
=================================================================
System uname: Linux-4.19.18-gentoo-x86_64-Intel-R-_Core-TM-_i7-6700HQ_CPU_@_2.60GHz-with-gentoo-2.6
KiB Mem:    40976252 total,  11375404 free
KiB Swap:   25165820 total,  25165820 free
Timestamp of repository gentoo: Thu, 13 Dec 2018 12:15:01 +0000
Head commit of repository gentoo: 057645ffcdb86bd24e7c965f6e1aa03db33abb4c
sh bash 4.4_p12
ld GNU ld (Gentoo 2.30 p5) 2.30.0
app-shells/bash:          4.4_p12::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.26.2::gentoo
dev-lang/python:          2.7.15::gentoo, 3.4.8::gentoo, 3.5.5::gentoo, 3.6.5::gentoo
dev-util/cmake:           3.12.3::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/openrc:          0.38.3-r1::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.11.6-r3::gentoo, 1.12.6::gentoo, 1.13.4-r2::gentoo, 1.14.1::gentoo, 1.15.1-r2::gentoo
sys-devel/binutils:       2.30-r4::gentoo
sys-devel/gcc:            7.3.0-r3::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r3::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 4.19::gentoo (virtual/os-headers)
sys-libs/glibc:           2.27-r6::gentoo


I hope this is enough information to narrow this down.
Comment 1 Sergei Trofimovich (RETIRED) gentoo-dev 2019-03-06 23:17:35 UTC
(In reply to segmentation fault from comment #0)
> jumpScroll: on
> 
> in my
> 
> /usr/share/X11/app-defaults/XTerm
> /usr/share/X11/app-defaults/XTerm-color

I can't reproduce the warning on either xterm-327 or xterm-337.
    $ xrdb -query | fgrep jumpScroll
    jumpScroll:     on
    $ xterm -j

Do you patch global files? Any other change we should be aware of?
Please post your full 'emerge --info'. Maybe it will get some clue.
Comment 2 Johannes Huber (RETIRED) gentoo-dev 2019-06-22 11:54:44 UTC
(In reply to Sergei Trofimovich from comment #1)
> (In reply to segmentation fault from comment #0)
> > jumpScroll: on
> > 
> > in my
> > 
> > /usr/share/X11/app-defaults/XTerm
> > /usr/share/X11/app-defaults/XTerm-color
> 
> I can't reproduce the warning on either xterm-327 or xterm-337.
>     $ xrdb -query | fgrep jumpScroll
>     jumpScroll:     on
>     $ xterm -j
> 
> Do you patch global files? Any other change we should be aware of?
> Please post your full 'emerge --info'. Maybe it will get some clue.