Hi,
I have a problem with memory leaks in cursel. I can see that objects are created by new, but no free is issued. With the 32-bit version it caused an inconvenience, but 64-bit eats up all the memory.
To get round this I tried recompiling cursel with -refcnt (-gc is not recognised) to invoke garbage collection, but this gives a seg fault.
objc-3.3.16-1.x86_64 and objc-3.4.3-1.x86_64 on SLES 15 both give the seg fault.
Is there something I have not installed to get garbage collection to work?
Let me know if you need any more information.
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for the feedback. SUSE SLES 15 is SUSE Linux Entreprise Server. I will test first on OpenSUSE (which is related to SUSE SLES). The OpenSUSE project has Desktop and Server OS, I'll first give it a try with objc 3.4.10 (which is the latest version of Portable Object Compiler) and cursel 1.0.2 (latest version from https://sourceforge.net/projects/cursel) on OpenSUSE Tumbleweed or OpenSUSE Leap. Tumbleweed and Leap are available both in x86 32 bit and 64 bit. From my perspective it is most important to first check that the compiler and cursel support OpenSUSE version 16 (I think that 16 will be the version that will the next version after SLES 15). I'll give an update in the next weeks if I can reproduce the problem that you reported.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I succesfully installed SUSE Tumbleweed with the Linux 6.17.6 kernel on both Intel pentium (physical hardware 32bit) and AMD Ryzen (physical hardware 64bit). SUSE Tumbleweed is available on both 32bit and 64bit (see https://www.opensuse.org/). It appears that SUSE Leap 16 with the new "Agama" installer is only 64bit but I have to check later. Anyway I do NOT suggest or encourage you to upgrade from SLES15 (not at all). In fact, I will certainly continue to support all versions of Slackware Linux and SUSE Linux also from many years ago. See the "Platforms.txt" file in the distribution of Portable Object Compiler for a list of platforms on which Portable Object Compiler compiles.
In the case of SUSE Tumbleweed with GCC 15.2.1 as C compiler autoconf 2.72, automake 1.18.1 and byacc 20241231 and flex 2.6.4, Portable Object Compiler 3.4.10 builds fine.
For cursel on the other hand with ncurses 6.5 20251025 as delivered by the
zypper install -t pattern devel_basis
rpm -ql ncurses-devel
shows that curses is delivered with two libraries: widechar and regular. There is a -lncurses and a -lncursesw (also header file ncurses.h and ncursesw.h)
I think the ncursesw.h header is for the NCURSES_WIDECHAR case.
Anyway cursel compiles on the Tumbleweed platforms but I have to make some manual modifications:
I had to add a prototype :
int yyerror(char *x);
in the grammar (the .ym file from cursel).
Also more importantly I had to change the Makefile after "configure" from -lcurses manually to -lncurses so that it find the libncurses library (which is not named libcurses).
In the AT&T curses case, the library is called libcurses. Cursel also builds with AT&T curses as delivered on some non-Linux UNIX platforms.
I will look into the problem during the next weeks, but currently it looks fine.
On Linux "stty -a" reports 128 columns and 48 rows and in my case on AMD 64bit it reports using a color framebuffer console configured for 128x48.
Also the TERM=linux setting produces nice looking frames and menus on the text console.
Note that the systems were configured without Desktop software (only as Server) with the text based installer (console mode), so this is not using TERM=xterm or similar.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've placed new 3.4.10 packages for i586 (Pentium) and for x86_64 (AMD64) in the opensuse directory. Those are built on "Tumbleweed" 32bit and 64bit.
Also I have enabled "sysstat" on the Pentium and AMD64 machine using:
zypper install sysstat
systemctl enable sysstat
systemctl start sysstat
so that "sar -r" shows free memory on the machines.
"cursel" runs fine on the i586 with 1GB of RAM using the latest Linux kernel.
"cursel" also builds and runs fine (and compiles much faster) on the modern AMD64 system using the same version of the latest Linux kernel.
I can confirm in any case that "cursel" runs fine on Tumbleweed (openSUSE) but obviously the configure script of cursel should be upgraded to autoconf 2.72 (from the old 2.69 or 2.68).
The configure script for cursel should automatically use the right -I/usr/include/ncurses and -lncurses or -lcurses depending on the platform so that no manual modification of the Makefile is required on openSUSE or SUSE SLES.
So during the next weeks I'll try update the cursel package.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I have a problem with memory leaks in cursel. I can see that objects are created by new, but no free is issued. With the 32-bit version it caused an inconvenience, but 64-bit eats up all the memory.
To get round this I tried recompiling cursel with -refcnt (-gc is not recognised) to invoke garbage collection, but this gives a seg fault.
objc-3.3.16-1.x86_64 and objc-3.4.3-1.x86_64 on SLES 15 both give the seg fault.
Is there something I have not installed to get garbage collection to work?
Let me know if you need any more information.
Thanks
Thanks for the feedback. SUSE SLES 15 is SUSE Linux Entreprise Server. I will test first on OpenSUSE (which is related to SUSE SLES). The OpenSUSE project has Desktop and Server OS, I'll first give it a try with objc 3.4.10 (which is the latest version of Portable Object Compiler) and cursel 1.0.2 (latest version from https://sourceforge.net/projects/cursel) on OpenSUSE Tumbleweed or OpenSUSE Leap. Tumbleweed and Leap are available both in x86 32 bit and 64 bit. From my perspective it is most important to first check that the compiler and cursel support OpenSUSE version 16 (I think that 16 will be the version that will the next version after SLES 15). I'll give an update in the next weeks if I can reproduce the problem that you reported.
I succesfully installed SUSE Tumbleweed with the Linux 6.17.6 kernel on both Intel pentium (physical hardware 32bit) and AMD Ryzen (physical hardware 64bit). SUSE Tumbleweed is available on both 32bit and 64bit (see https://www.opensuse.org/). It appears that SUSE Leap 16 with the new "Agama" installer is only 64bit but I have to check later. Anyway I do NOT suggest or encourage you to upgrade from SLES15 (not at all). In fact, I will certainly continue to support all versions of Slackware Linux and SUSE Linux also from many years ago. See the "Platforms.txt" file in the distribution of Portable Object Compiler for a list of platforms on which Portable Object Compiler compiles.
In the case of SUSE Tumbleweed with GCC 15.2.1 as C compiler autoconf 2.72, automake 1.18.1 and byacc 20241231 and flex 2.6.4, Portable Object Compiler 3.4.10 builds fine.
For cursel on the other hand with ncurses 6.5 20251025 as delivered by the
zypper install -t pattern devel_basis
rpm -ql ncurses-devel
shows that curses is delivered with two libraries: widechar and regular. There is a -lncurses and a -lncursesw (also header file ncurses.h and ncursesw.h)
I think the ncursesw.h header is for the NCURSES_WIDECHAR case.
Anyway cursel compiles on the Tumbleweed platforms but I have to make some manual modifications:
I had to add a prototype :
int yyerror(char *x);
in the grammar (the .ym file from cursel).
Also more importantly I had to change the Makefile after "configure" from -lcurses manually to -lncurses so that it find the libncurses library (which is not named libcurses).
In the AT&T curses case, the library is called libcurses. Cursel also builds with AT&T curses as delivered on some non-Linux UNIX platforms.
I will look into the problem during the next weeks, but currently it looks fine.
On Linux "stty -a" reports 128 columns and 48 rows and in my case on AMD 64bit it reports using a color framebuffer console configured for 128x48.
Also the TERM=linux setting produces nice looking frames and menus on the text console.
Note that the systems were configured without Desktop software (only as Server) with the text based installer (console mode), so this is not using TERM=xterm or similar.
I've placed new 3.4.10 packages for i586 (Pentium) and for x86_64 (AMD64) in the opensuse directory. Those are built on "Tumbleweed" 32bit and 64bit.
Also I have enabled "sysstat" on the Pentium and AMD64 machine using:
zypper install sysstat
systemctl enable sysstat
systemctl start sysstat
so that "sar -r" shows free memory on the machines.
"cursel" runs fine on the i586 with 1GB of RAM using the latest Linux kernel.
"cursel" also builds and runs fine (and compiles much faster) on the modern AMD64 system using the same version of the latest Linux kernel.
I can confirm in any case that "cursel" runs fine on Tumbleweed (openSUSE) but obviously the configure script of cursel should be upgraded to autoconf 2.72 (from the old 2.69 or 2.68).
The configure script for cursel should automatically use the right -I/usr/include/ncurses and -lncurses or -lcurses depending on the platform so that no manual modification of the Makefile is required on openSUSE or SUSE SLES.
So during the next weeks I'll try update the cursel package.