Bugs item #1779533, was opened at 2007-08-22 08:54
Message generated for change (Comment added) made by nobody
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=111005&aid=1779533&group_id=11005
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: nedit crash when clicking "filter" button
Initial Comment:
NEdit release of Aug 20, 2004
Built on: Linux, 386, Intel C++
Built at: Aug 15 2007, 14:50:24
With Motif: 2.2.3 [@(#)Motif Version 2.2.4]
Running Motif: 2.2 [unknown]
Server: The X.Org Foundation 60802000
Visual: 24-bit TrueColor (ID 0x21, Default)
Locale: en_US.UTF-8
-----------------------------
To duplicate:
1) cd a directory conatining several file and another directory.
2) select from menul "File -> Open".
3) first click on a file listed in "open file" dialog window, then click on the
directory.
4) after above steps, a file and a directory are both hightlighted;
5) finally click the "filter" button and nedit will crash.
Thanks.
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody)
Date: 2007-09-13 14:05
Message:
Logged In: NO
Sammy, nice job on diagnosing this. I've been chasing this bug for a
while and trying to develop a workaround.
----------------------------------------------------------------------
Comment By: Sammy (sambo57u)
Date: 2007-09-13 07:47
Message:
Logged In: YES
user_id=1767080
Originator: NO
The crash is happening in line 3655 of List.c in motif 2.3.0:
Program received signal SIGSEGV, Segmentation fault.
0x00002aaaaaba9ef8 in ReplaceItem (lw=0x9d7f40, item=0x9e4090, pos=1) at
List.c:3655
3655 if(lw->list.selectedPositions[i]==pos+1) {
I am not a c programmer (fortran) but I looked into the motif source and
added
few checks (same check is used below in List.c) and it no longer crashes
on 64bit.
Here is the motif patch I used. Please let me know if this makes sense and
in that
case file as motif bug:
====================================================
--- openmotif-2.3.0/lib/Xm/List.c.old 2007-02-23 11:13:38.000000000
-0600
+++ openmotif-2.3.0/lib/Xm/List.c 2007-09-13 09:32:53.000000000
-0500
@@ -3651,12 +3651,15 @@
XmStringFree(lw->list.items[pos]);
lw->list.items[pos] = XmStringCopy(item);
/*Selected items should be replaced also*/
- for(i=0; i<lw->list.selectedItemCount; i++)
- if(lw->list.selectedPositions[i]==pos+1) {
- XmStringFree(lw->list.selectedItems[i]);
- lw->list.selectedItems[i]=XmStringCopy(item);
- }
-
+ if ((lw->list.selectedPositions != NULL) &&
+ (lw->list.selectedPositionCount > 0))
+ {
+ for(i=0; i<lw->list.selectedItemCount; i++)
+ if(lw->list.selectedPositions[i]==pos+1) {
+ XmStringFree(lw->list.selectedItems[i]);
+ lw->list.selectedItems[i]=XmStringCopy(item);
+ }
+ }
}
^L
=================================================================
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody)
Date: 2007-08-23 20:57
Message:
Logged In: NO
If I build the executable with static link (make linux-static) on i386
(redhat 7.3), nedit doesn't crash even when I run it on x86_64 (redhat
enterprise linux 4).
----------------------------------------------------------------------
Comment By: Sammy (sambo57u)
Date: 2007-08-23 16:14
Message:
Logged In: YES
user_id=1767080
Originator: NO
It is not crashing on i386 but it is on x86_64. I build nedit on both
platforms and the 64 bit version is crashing.
As an additional note, I am using latest motif-2.3.0 including few new
patches from cvs. The previous user was using 2.2.4 so it probably is
not a motif issue.
----------------------------------------------------------------------
Comment By: Nobody/Anonymous (nobody)
Date: 2007-08-23 07:48
Message:
Logged In: NO
the executable was build on a 32-bit machine but was running on a 64-bit
machine. I tried to run nedit the the machine on which it was build, and it
didn't crash.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=111005&aid=1779533&group_id=11005
--
NEdit Develop mailing list - [email protected]
http://www.nedit.org/mailman/listinfo/develop