bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: addCDKScrollItem function in CDK


From: Fu Steve X
Subject: RE: addCDKScrollItem function in CDK
Date: Thu, 24 Mar 2005 14:44:15 -0500

Thanks for the quick response!

I checked out the latest CDK tarball and played with it. The new addCDKScrollItem did work for normal case where the initial listSize is greater than the height of the SCROLL. In this case you have to scroll up and down to view the whole list.

But when the initial listSize is less than the height of the SCROLL, you can only view the a SCROLL of effective height as the initial listSize even you already added some items and the defined height is larger. This is on RedHat9.

On Solaris8, it is a core dump as shown below.

program terminated by signal SEGV (no mapping at the fault address)
Current function is drawCDKScrollList
  732         mvwvline (scrollp->scrollbarWin, scrollp->togglePos, 0, ' ' | A_RE
VERSE, scrollp->toggleSize);
(/opt/SUNWspro/bin/../WS6/bin/sparcv9/dbx) where
  [1] __do_misaligned_ldst_instr(0xffffffff7fffe9a0, 0xffffffff7fffea60, 0xd4210
008, 0x31, 0x0, 0x4), at 0x100008220
  [2] __misalign_trap_handler(0x0, 0x6, 0x800020, 0x0, 0x7, 0x800020), at 0x1000
08c20
  [3] 0x6(0x10012e1f0, 0x100125af8, 0x100127480, 0x0, 0x100125aec, 0x0), at 0x5
=>[4] drawCDKScrollList(scrollp = 0x10012e000, Box = 1), line 732 in "scroll.c"
  [5] _injectCDKScroll(object = 0x10012e000, input = 258U), line 516 in "scroll.
c"
  [6] traverseCDKScreen(screen = 0x1001253c0), line 250 in "traverse.c"

It appears the ToggleSize didn't get incremented in addCDKScrollItem. Please take a look into it.

Thanks again!

Steve


-----Original Message-----
From: Thomas Dickey [mailto:address@hidden]
Sent: Wednesday, March 23, 2005 6:51 PM
To: Fu Steve X
Cc: 'address@hidden'
Subject: Re: addCDKScrollItem function in CDK


On Wed, Mar 23, 2005 at 01:37:25PM -0500, Fu Steve X wrote:
> Hi,
>
> The simple test code is based on scroll_ex.c. I just bind a callback
> to 'a' to invoke the addCDKScrollItem function. The items in the
> SCROLL starts to get garbled from top down if I keep pressing 'a' for
> 4 or 5 times. Scrolling the items up and down doesn't refresh the list
> correctly either. But it looks OK if I dump out
> chtype2Char(scrollp->item[0]).
>
> Is that a bug?

yes - running with valgrind, it finds some problem.  I'll look into that now:

==4517== Invalid write of size 4
==4517==    at 0x80498A6: char2Chtype (in /users/tom/foo)
==4517==    by 0x804DDD4: addCDKScrollItem (in /users/tom/foo)
==4517==    by 0x80490C2: addItemCB (in /users/tom/foo)
==4517==    by 0x80496E4: checkCDKObjectBind (in /users/tom/foo)
==4517==    by 0x804D3CB: _injectCDKScroll (in /users/tom/foo)
==4517==    by 0x804D34B: activateCDKScroll (in /users/tom/foo)
==4517==    by 0x80492D7: main (in /users/tom/foo)
==4517==  Address 0x1BAB7CE8 is 0 bytes after a block of size 1512 alloc'd
==4517==    at 0x1B907901: calloc (vg_replace_malloc.c:176)
==4517==    by 0x804DB2F: createCDKScrollItemList (in /users/tom/foo)
==4517==    by 0x804D164: newCDKScroll (in /users/tom/foo)
==4517==    by 0x8049296: main (in /users/tom/foo)

--
Thomas E. Dickey <address@hidden> http://invisible-island.net ftp://invisible-island.net


reply via email to

[Prev in Thread] Current Thread [Next in Thread]