This service will be undergoing non-disruptive maintenance at 07:20 UTC, 2018-12-14. It is expected to last approximately 30 minutes
Bug 10387 - 'distort' dumps core (With bugfix attached)
Summary: 'distort' dumps core (With bugfix attached)
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: xscreensaver (Show other bugs)
(Show other bugs)
Version: 8.0
Hardware: All Linux
medium
medium
Target Milestone: ---
Assignee: Ray Strode [halfline]
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-03-28 15:12 UTC by Brian Ryner
Modified: 2007-04-18 16:26 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-06-15 14:55:57 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
coredump from distort suplied with xscreensaver-4.05-2 from rawhide (8.34 MB, application/octet-stream)
2002-08-10 16:07 UTC, David Juran
no flags Details

Description Brian Ryner 2000-03-28 15:12:54 UTC
After letting the screensaver run overnight (set to Random), I noticed
there was a core file in my home directory, which was dumped by 'distort
-root'.  I am running the SVGA X server, on a Riva128 card.  I just ran
"distort" manually and did not see the coredump, so I'm wondering if this
is something that can happen after it's been running for awhile.

Comment 1 Bill Nottingham 2000-03-28 20:22:59 UTC
It's been running for about 5 hours here with no segfaults so far.

Comment 2 Brian Ryner 2000-03-28 20:32:59 UTC
I'll run it some more on my machine and see what happens.  Unfortunately, I
deleted the core file, otherwise I would at least have a backtrace.

Comment 3 Brian Ryner 2000-03-28 23:30:59 UTC
The coredump happened again, here is a backtrace:

#0  0x400b8ffa in _XGetPixel32 () from /usr/X11R6/lib/libX11.so.6
#1  0x804ada7 in XMapRaised ()
#2  0x804b360 in XMapRaised ()
#3  0x804c239 in XMapRaised ()
#4  0x4017e9cb in __libc_start_main (main=0x804ba90 <XMapRaised+8148>, argc=2,
    argv=0xbffffa04, init=0x80494bc <_init>, fini=0x804fcac <_fini>,
    rtld_fini=0x4000ae60 <_dl_fini>, stack_end=0xbffff9fc)
    at ../sysdeps/generic/libc-start.c:92

I'll admit this probably isn't all that helpful.  Maybe I'll compile an
xscreensaver RPM with debugging symbols.

Comment 4 Bill Nottingham 2000-04-10 18:36:59 UTC
Yeah, unfortunately, unless we know where in distort
it core dumped, it's *really* hard to track down.

Comment 5 Brian Ryner 2000-04-11 15:45:59 UTC
Ok, here's the backtrace gdb gives me with a debug version of xscreensaver:

(gdb) bt
#0  0x400b8ffa in _XGetPixel32 () from /usr/X11R6/lib/libX11.so.6
#1  0x804add7 in reflect_draw (k=3) at distort.c:584
#2  0x804b2a0 in screenhack (dpy=0x8058ad0, window=79691784) at distort.c:739
#3  0x804c0b5 in main (argc=1, argv=0xbffff9c4) at screenhack.c:574

Does this help at all?

Comment 6 Bill Nottingham 2000-04-11 15:50:59 UTC
Hm, will check ; you're running at 32bpp, correct?

Comment 7 Brian Ryner 2000-04-11 15:55:59 UTC
Yes, and 800x600.

Comment 8 Bill Nottingham 2000-04-11 15:56:59 UTC
What does xdpyinfo say under 'supported pixmap formats'?

Comment 9 Brian Ryner 2000-04-11 15:57:59 UTC
supported pixmap formats:
    depth 1, bits_per_pixel 1, scanline_pad 32
    depth 24, bits_per_pixel 32, scanline_pad 32

Comment 10 Brian Brock 2000-10-04 16:10:08 UTC
I'm experiencing an identical problem with distort, I've not traced it yet. 
Please let me know if I can supply additional details.

Comment 11 Jamie Zawinski 2002-07-27 05:57:39 UTC
Does this still happen with the version of distort included with xscreensaver 4.05?

If so:

Does it happen every time?

When it does happen, what are the values of these variables:
radius, number, speed, vortex, magnify, blackhole, effect;

What are all the local vars inside the function (reflect_draw, probably)
where it crashed?

What are the contents of the orig_map structure?

Thanks...


Comment 12 David Juran 2002-08-10 15:58:07 UTC
Yes, distort that comes with xscreensaver-4.0.5 crashes as well )-:
and yes, I think it happens every time (at least when you run it with the -root
option) although it might take a while...

let's see here, the variables...
radius=80
number=1
speed=2
vortex=0
magnify=0
blackhole=0
effect=(void (*)()) 0x804b630 <move_lense>

yes, It did crash in reflect_draw, on hte line 

XPutPixel( buffer_map, j, i,XGetPixel( orig_map, xy_coo[k].x + j, ny ));

to be specific

Why don't I just attach the core file from the crash of the debug-build I've done

Tell me if you need any more info (-:


Comment 13 David Juran 2002-08-10 16:07:10 UTC
Created attachment 69850 [details]
coredump from distort suplied with xscreensaver-4.05-2 from rawhide

Comment 14 Jamie Zawinski 2002-09-23 00:32:34 UTC
I think I've fixed it -- can you try this patch and let me know how it works for
you?

diff -u -2 -r1.15 distort.c
--- distort.c	24 Nov 2001 03:38:08 -0000	1.15
+++ distort.c	23 Sep 2002 00:31:41 -0000
@@ -569,4 +569,5 @@
 		lysq = ly * ly;
 		ny = xy_coo[k].y + i;
+		if (ny >= orig_map->height) ny = orig_map->height-1;
 		for(j = 0 ; j < 2*radius+speed+2 ; j++) {
 			lx = j - cx;


Comment 15 David Juran 2002-10-13 08:44:10 UTC
Seems to work now (-:


Note You need to log in before you can comment on or make changes to this bug.