Re: nedit receives SIGABRT when an item from Help menu is selected

2019-02-10 Thread Alessandro DE LAURENZIS

Hello Laurence,

thanks for your feedback.

On 2/10/19 11:01 AM, Laurence Tratt wrote:

On Sat, Feb 09, 2019 at 10:50:31AM +0100, Alessandro DE LAURENZIS wrote:

Hello Alessandro,


all in the subject... This is a gdb backtrace after e.g "Getting Started"
(but the same thing happens whichever item I select from Help menu):


The version of Nedit in ports is 5.5, which is about 15 years old [1]. It has
bitrotted badly since and, personally, I abandoned Nedit 5 years ago due to
the increasing number of visible bugs (the one you mention is one I vaguely
remember; but there were several others).

I see from Wikipedia that there is now a 5.6 and maybe a 5.7 release (is [2]
the definitive site? I'm unsure). Maybe the new releases fix some of the
issues, although if ever a project has felt abandoned, it is Nedit :/


Laurie

[1] https://marc.info/?l=openbsd-ports=109791544315146=2
[2] https://sourceforge.net/p/nedit/git/ci/master/tree/



Yes, I was aware. I discussed privately with Stuart, who suggested to 
update the port. I made a first attempt (unified diff in the 
attachment), and verified that this bug at least has gone. But it surely 
requires deeper review and testing, considering also that I'm not a 
nedit user...


--
Alessandro DE LAURENZIS
[mailto:jus...@atlantide.t28.net]
Web: http://www.atlantide.t28.net
LinkedIn: https://www.linkedin.com/in/delaurenzis/
Index: Makefile
===
RCS file: /cvs/ports/editors/nedit/Makefile,v
retrieving revision 1.78
diff -u -p -u -p -r1.78 Makefile
--- Makefile	4 Sep 2018 12:46:11 -	1.78
+++ Makefile	9 Feb 2019 13:36:31 -
@@ -1,42 +1,42 @@
 # $OpenBSD: Makefile,v 1.78 2018/09/04 12:46:11 espie Exp $
 
-COMMENT=		X11/Motif GUI text editor
+COMMENT =		a fast, compact Motif/X11 plain text editor
 
-DISTNAME=		nedit-5.5
-P_V=			0.5
-REVISION=		23
-EPOCH=			0
-DISTFILES=		${DISTNAME}-src${EXTRACT_SUFX} \
+DISTNAME =		nedit-5.7
+P_V =			0.5
+DISTFILES =		${DISTNAME}-src${EXTRACT_SUFX} \
 			nedit_patterns-${P_V}.tgz:0
-PATCHFILES=		wrapmark.diff:0
-CATEGORIES=		editors x11
+CATEGORIES =		editors x11
 
-MASTER_SITES=		${MASTER_SITE_SOURCEFORGE:=nedit/}
-MASTER_SITES0=		http://distfiles.nl/
+MASTER_SITES =		${MASTER_SITE_SOURCEFORGE:=nedit/}
+MASTER_SITES0 =		http://distfiles.nl/
 
-DIST_SUBDIR=		nedit
+DIST_SUBDIR =		nedit
 
 # GPLv2
-PERMIT_PACKAGE_CDROM=	Yes
+PERMIT_PACKAGE_CDROM =	Yes
 
 WANTLIB += ICE SM X11 Xau Xdmcp Xext Xft Xmu Xpm Xrender Xt
 WANTLIB += c expat fontconfig freetype iconv m z Xm
 
-LIB_DEPENDS+=		converters/libiconv \
+LIB_DEPENDS +=		converters/libiconv \
 			x11/motif
 
-ALL_TARGET=		openbsd
+ALL_TARGET =		openbsd
 
-NO_TEST=		Yes
+NO_TEST =		Yes
 
-CFLAGS+=		-DBUILD_UNTESTED_NEDIT
-MAKE_ENV+=MOTIFLIB='-L${LOCALBASE}/lib -lXm'
+MAKE_ENV +=		MOTIFLIB='-L${LOCALBASE}/lib -lXm'
+
+post-build:
+	mv ${WRKBUILD}/doc/nc.pod ${WRKBUILD}/doc/ncl.pod
+	@cd ${WRKBUILD} && ${MAKE} docs
 
 do-install:
 	${INSTALL_PROGRAM} ${WRKBUILD}/source/nedit ${PREFIX}/bin
 	${INSTALL_PROGRAM} ${WRKBUILD}/source/nc ${PREFIX}/bin/ncl
 	${INSTALL_MAN} ${WRKSRC}/doc/nedit.man ${PREFIX}/man/man1/nedit.1
-	${INSTALL_MAN} ${WRKSRC}/doc/nc.man ${PREFIX}/man/man1/ncl.1
+	${INSTALL_MAN} ${WRKSRC}/doc/ncl.man ${PREFIX}/man/man1/ncl.1
 	${INSTALL_DATA} ${WRKSRC}/doc/NEdit.ad \
 		${PREFIX}/lib/X11/app-defaults/NEdit
 	${INSTALL_DATA_DIR} ${PREFIX}/share/doc/nedit
Index: distinfo
===
RCS file: /cvs/ports/editors/nedit/distinfo,v
retrieving revision 1.18
diff -u -p -u -p -r1.18 distinfo
--- distinfo	18 Jan 2015 03:13:50 -	1.18
+++ distinfo	9 Feb 2019 13:36:31 -
@@ -1,6 +1,4 @@
-SHA256 (nedit/nedit-5.5-src.tar.gz) = fNa7yd8VQhzM6Zj0xqzZZuCmRTxV6JegMN4TLggkP1I=
+SHA256 (nedit/nedit-5.7-src.tar.gz) = rdmsef+XNSitNshoWCOLrE9ZiWwn2/KFy+ak1CX8oXo=
 SHA256 (nedit/nedit_patterns-0.5.tgz) = 7qnt2CG5d9xtvfYGk7nAOlSeuNrba+d++GO5y58bpdA=
-SHA256 (nedit/wrapmark.diff) = zVi6lmNskZwQ4zfIedeKFD//kbECfO/Hq8uocohGqO0=
-SIZE (nedit/nedit-5.5-src.tar.gz) = 1503942
+SIZE (nedit/nedit-5.7-src.tar.gz) = 1344754
 SIZE (nedit/nedit_patterns-0.5.tgz) = 9245
-SIZE (nedit/wrapmark.diff) = 50327
Index: patches/patch-Makefile
===
RCS file: patches/patch-Makefile
diff -N patches/patch-Makefile
--- /dev/null	1 Jan 1970 00:00:00 -
+++ patches/patch-Makefile	9 Feb 2019 13:36:31 -
@@ -0,0 +1,13 @@
+$OpenBSD$
+
+Index: Makefile
+--- Makefile.orig
 Makefile
+@@ -32,7 +32,6 @@ all:
+ 	(cd Xlt;$(MAKE) -f Makefile.$@ libXlt.a)
+ 	(cd Microline/XmL;$(MAKE) -f Makefile.$@ libXmL.a)
+ 	(cd source; $(MAKE) -f Makefile.$@ nedit nc)
+-	@source/nedit -V
+ 
+ # This should not be in the default build, as users may not have Perl
+ # installed.  This is only interesting to developers.
Index: patches/patch-doc_Makefile
===
RCS file: 

Re: nedit receives SIGABRT when an item from Help menu is selected

2019-02-10 Thread Laurence Tratt
On Sat, Feb 09, 2019 at 10:50:31AM +0100, Alessandro DE LAURENZIS wrote:

Hello Alessandro,

> all in the subject... This is a gdb backtrace after e.g "Getting Started"
> (but the same thing happens whichever item I select from Help menu):

The version of Nedit in ports is 5.5, which is about 15 years old [1]. It has
bitrotted badly since and, personally, I abandoned Nedit 5 years ago due to
the increasing number of visible bugs (the one you mention is one I vaguely
remember; but there were several others).

I see from Wikipedia that there is now a 5.6 and maybe a 5.7 release (is [2]
the definitive site? I'm unsure). Maybe the new releases fix some of the
issues, although if ever a project has felt abandoned, it is Nedit :/


Laurie

[1] https://marc.info/?l=openbsd-ports=109791544315146=2
[2] https://sourceforge.net/p/nedit/git/ci/master/tree/
-- 
Personal http://tratt.net/laurie/
Software Development Teamhttp://soft-dev.org/
   https://github.com/ltratt  http://twitter.com/laurencetratt



nedit receives SIGABRT when an item from Help menu is selected

2019-02-09 Thread Alessandro DE LAURENZIS

Dear ports@ readers,

all in the subject... This is a gdb backtrace after e.g "Getting 
Started" (but the same thing happens whichever item I select from Help 
menu):


[...]

$ gdb nedit
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-unknown-openbsd6.4"...
(gdb) run
Starting program: /usr/local/bin/nedit
UTF8 locale not supported.

Program received signal SIGABRT, Aborted.
thrkill () at -:3
3   -: No such file or directory.
in -
Current language:  auto; currently asm
(gdb) bt
#0  thrkill () at -:3
#1  0x0eb099ca984c in __stack_smash_handler (func=Variable "func" is not 
available.
)
at /usr/src/lib/libc/sys/stack_protector.c:79
#2  0x0eae83ebe83a in helpCB (menuItem=0xeb0a4e27000,
clientData=0xeb0bb7fc000, callData=0x7f7bac90) from /usr/local/bin/nedit
#3  0x0eb0d325c535 in XtCallCallbackList () from 
/usr/X11R6/lib/libXt.so.11.0
#4  0x0eb0d805d065 in BtnUp (wid=0xeb0a4e27000, event=0x7f7bb2e8, params=Variable 
"params" is not available.
)
at PushB.c:2658
#5  0x0eb0d329e072 in HandleActions () from /usr/X11R6/lib/libXt.so.11.0
#6  0x0eb0d329bbc3 in HandleSimpleState () from /usr/X11R6/lib/libXt.so.11.0
#7  0x0eb0d329b483 in _XtTranslateEvent () from /usr/X11R6/lib/libXt.so.11.0
#8  0x0eb0d326d887 in XtDispatchEventToWidget ()
   from /usr/X11R6/lib/libXt.so.11.0
#9  0x0eb0d326e2cd in _XtDefaultDispatcher () from 
/usr/X11R6/lib/libXt.so.11.0
#10 0x0eb0d326dd8a in XtDispatchEvent () from /usr/X11R6/lib/libXt.so.11.0
#11 0x0eb0d327ba13 in XtAppProcessEvent () from /usr/X11R6/lib/libXt.so.11.0
#12 0x0eb0d326e7ad in XtAppMainLoop () from /usr/X11R6/lib/libXt.so.11.0
#13 0x0eae83ea6459 in main (argc=1, argv=0x7f7bbd78) at nedit.c:760
(gdb)

[...]

Any hints?

--
Alessandro DE LAURENZIS
[mailto:jus...@atlantide.t28.net]
Web: http://www.atlantide.t28.net
LinkedIn: https://www.linkedin.com/in/delaurenzis/