Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 72970 - aterm-0.4.2-r11 segfaults with tiny geometry
Summary: aterm-0.4.2-r11 segfaults with tiny geometry
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Michal Januszewski (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-30 14:45 UTC by robs
Modified: 2005-01-18 05:53 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description robs 2004-11-30 14:45:47 UTC
i updated aterm from 0.4.2-r9 to 0.4.2-r11. if i start it with a tiny geometry it'll segfault. the problems lies in the aterm-0.4.2-internal-border.patch file. the internal border width is set wrong if e.g. the geometry is 50x1+0-0

you can fix it by specifying the internal border explicitly:
aterm -geometry 50x1+0-0 -ib N
with N a number, but not 1

Reproducible: Always
Steps to Reproduce:
1. aterm -geometry 50x1+0-0 -e echo hello

it's important that the y-axis is equal to 1 and the 4th parameter negativ.
Actual Results:  
aterm: XError: Request: 12 . 0, Error: 2
Segmentation fault
Comment 1 Karl Trygve Kalleberg (RETIRED) gentoo-dev 2004-12-01 07:26:09 UTC
Do I have big, vulcan ears? Is my logic impeccable? Have I featured in *any* Star Trek episodes?

Is my e-mail in x11-terms/aterm/metadata.xml?

Or is that spock@gentoo.org?

:D
Comment 2 Michal Januszewski (RETIRED) gentoo-dev 2004-12-05 09:47:36 UTC
I don't seem to be able to reproduce the problem. I also don't see how the internal-border patch could cause it.. Are you using the internalBorder resource? If yes, to what value have you set it? What other X aterm resources are you using (if any)? What X server are you using?
Comment 3 robs 2004-12-06 04:26:36 UTC
hmm i only noticed that if i comment the internalborder patch, it's working properly.
i'm using xorg-x11-6.8.0-r3, afair it also segfaults with earlier versions

my Xresources:
Aterm*background: black
Aterm*foreground: #aaaaaa
Aterm*transparent:  true
#Aterm*fading: 1000
Aterm*shading: 35
Aterm*scrollBar:  false
Aterm*saveLines:  32767
Aterm*borderLess: true
Aterm*font: -misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso10646-1
Aterm*autoWrap: true

hmm am i the only one getting this error? :)
Comment 4 Michal Januszewski (RETIRED) gentoo-dev 2004-12-06 06:38:52 UTC
Still no luck with reproducing it. Could you post your `emerge info`?
Comment 6 Emil Beinroth 2005-01-17 15:05:59 UTC
I can reproduce this with aterm -geometry Nx1+X-Y -ib 3 (N, X and Y are any values).
Comment 7 Emil Beinroth 2005-01-17 15:52:36 UTC
I found a problem in src/main.c around line 841 (function resize_subwindows):
--
XMoveResizeWindow(Xdisplay, TermWin.vt, x, y, width, height + 1);
--
If the internalBorder is set to 3, height gets somehow calculated to be 65535 the first time. The call adds 1 .. so it's 65536. Every other value is fine for the call .. but not 65536. I don't exactly know why .. I think because, if
interpreted as unsigned short int (16 bit), it's 0 (width and height are not allowed to be 0). (I suspect this because I found similar things                                                                                                 http://cvs.gnome.org/viewcvs/gtk+/gdk/x11/gdkgeometry-x11.c?rev=1.24 -- look                                                   for compute_intermediate_position)
Comment 8 Michal Januszewski (RETIRED) gentoo-dev 2005-01-18 05:53:30 UTC
Thanks for the additional info. I've just added a simple fix to CVS. Remerge x11-terms/aterm to get your aterm fixed :)