Bug#428300: sysv-rc-conf: Program exception upon a "r" restore

2025-05-10 Thread Chris Hofstaedtler
On Sat, May 10, 2025 at 02:53:55PM +0100, Andrew Bower wrote:
> Control: tags -1 + patch
> 
> On Tue, Jun 09, 2015 at 11:56:45AM +0200, Denis Briand wrote:
> > Always the same issue with 0.99-7
> > 'r' key doesn't work.
> > But now, I haven't any stderr output.
> 
> Same here in 0.99-10 with no error output, just a silent crash.
> 
> The issue occurs whenever the services do not fit an exact number of
> screenfuls, in other words, almost always!
> 
> I have provided a patch which handles this scenario correctly.

This package needs a maintainer. Otherwise the patch will probably 
rot in the bts. Maybe you want to step in?

Best,
Chris



Bug#428300: sysv-rc-conf: Program exception upon a "r" restore

2025-05-10 Thread Andrew Bower
On Sat, May 10, 2025 at 11:39:15PM +0200, Chris Hofstaedtler wrote:
> On Sat, May 10, 2025 at 02:53:55PM +0100, Andrew Bower wrote:
> > Control: tags -1 + patch
> > I have provided a patch which handles this scenario correctly.
> 
> This package needs a maintainer. Otherwise the patch will probably 
> rot in the bts. Maybe you want to step in?

I'm considering it!

I thought I would try some fixes first to get the measure of it before
making the commitment.



Bug#428300: sysv-rc-conf: Program exception upon a "r" restore

2025-05-10 Thread Andrew Bower
Control: tags -1 + patch

On Tue, Jun 09, 2015 at 11:56:45AM +0200, Denis Briand wrote:
> Always the same issue with 0.99-7
> 'r' key doesn't work.
> But now, I haven't any stderr output.

Same here in 0.99-10 with no error output, just a silent crash.

The issue occurs whenever the services do not fit an exact number of
screenfuls, in other words, almost always!

I have provided a patch which handles this scenario correctly.
From 319c24d502cf948dc87df4e20a943f1928794d5f Mon Sep 17 00:00:00 2001
From: Andrew Bower 
Date: Sat, 10 May 2025 14:26:48 +0100
Subject: [PATCH] Fix restore action in GUI. (Closes: #428300)

---
 debian/patches/0003-Fix-restore-action.patch | 29 
 debian/patches/series|  1 +
 2 files changed, 30 insertions(+)
 create mode 100644 debian/patches/0003-Fix-restore-action.patch

diff --git a/debian/patches/0003-Fix-restore-action.patch b/debian/patches/0003-Fix-restore-action.patch
new file mode 100644
index 000..3af0c74
--- /dev/null
+++ b/debian/patches/0003-Fix-restore-action.patch
@@ -0,0 +1,29 @@
+From: Andrew Bower 
+Date: Sat, 10 May 2025 14:17:27 +0100
+Subject: Fix restore action in GUI. (Closes: #428300)
+
+Avoid crashing without restoring links when services do not exactly fit into
+whole screenfuls.
+
+---
+ sysv-rc-conf.pl | 6 --
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/sysv-rc-conf.pl b/sysv-rc-conf.pl
+index b464bb7..cfcbe65 100755
+--- a/sysv-rc-conf.pl
 b/sysv-rc-conf.pl
+@@ -248,9 +248,11 @@ sub revert_changes
+ for (my $i = 0; $i < max_services() ; $i++) {
+ for (my $j = 0; $j <= $#show_rls; $j++) {
+ my $obj = $scr->getobj(zero_pad($i).zero_pad($j));
+-my $ud = $obj->userdata();
++if (defined $obj) {
++my $ud = $obj->userdata();
+ 
+-$cache{ $ud->{sn} }{ $ud->{runlevel} } = $obj;
++$cache{ $ud->{sn} }{ $ud->{runlevel} } = $obj;
++}
+ }
+ }
+ }
diff --git a/debian/patches/series b/debian/patches/series
index 330c344..54919d5 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 01_behavior_fix.patch
 greedy_names.patch
+0003-Fix-restore-action.patch
-- 
2.49.0



signature.asc
Description: PGP signature


Processed: Re: Bug#428300: sysv-rc-conf: Program exception upon a "r" restore

2025-05-10 Thread Debian Bug Tracking System
Processing control commands:

> tags -1 + patch
Bug #428300 [sysv-rc-conf] sysv-rc-conf: Program exception upon a "r" restore.
Ignoring request to alter tags of bug #428300 to the same tags previously set

-- 
428300: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=428300
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems



Processed: Re: Bug#428300: sysv-rc-conf: Program exception upon a "r" restore

2025-05-10 Thread Debian Bug Tracking System
Processing control commands:

> tags -1 + patch
Bug #428300 [sysv-rc-conf] sysv-rc-conf: Program exception upon a "r" restore.
Added tag(s) patch.

-- 
428300: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=428300
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems