Article View: news.software.readers
Article #253362Re: my 2nd slrn macro - works sometimes, else "stack underflow"
From: Ignatios Souvatzis
Date: Wed, 06 Feb 2013 08:56
Date: Wed, 06 Feb 2013 08:56
47 lines
2746 bytes
2746 bytes
John E. Davis wrote: > [I set the followup-to header to news.software.readers since not all > servers carry alt.lang.s-lang] > > On Tue, 5 Feb 2013 17:23:03 +0100, Ignatios Souvatzis > <u502sou@beverly.kleinbus.org> wrote: >> This is supposed to cycle through the Newsgroups the current article >> was posted to that are available on the server. > [...] >> >> Any idea how I'd find out what's wrong? > > The simplest way is to run slrn using the --debug option. Errors will > be written to the log file. Ah, thanks! > Your bug is caused by the way you are calling the "uncollapse_thread". > You are treating it as if it returns a value but it returns nothing. > This will generate a stack-underflow error. I noticed that in the meantime... > You see it only sometimes because "group_search" does return a value, > which you leave on the stack. Ah, ok. > My suggested changes are below: > I would rewrite the next three blocks of code: > more simply as: > #v+ > grouparr = [grouparr[where(grouparr != cgroup)], cgroup]; > foreach cgroup (grouparr) > if (group_search (cgroup)) > break; > #v- I considered using 'where', but for an article that's cross-posted to three groups, I'd only ever be able to reach the first, if I was in another, or the second, if I was in the the first one. I'd somehow need to rotate the array until cgroup is at the end. -is
Technical Details
Message-ID:
<slrnkh46mn.at4.u502sou@marie.beverly.kleinbus.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!border1.nntp.dca3.giganews.com!border2.nntp.dca3.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!news.glorb.com!feeder.erje.net!us.feeder.erje.net!newsfeed.straub-nv.de!weretis.net!feeder4.news.weretis.net!news.wtal.de!news.tal.de!beverly.kleinbus.org!not-for-mailReferences:
<slrnkh2cf7.at4.u502sou@marie.beverly.kleinbus.org> <slrnkh2p3p.9v2.jed@aluche.mit.edu>Show Full Headers
Complete Article Headers
Message-ID: <slrnkh46mn.at4.u502sou@marie.beverly.kleinbus.org> Subject: Re: my 2nd slrn macro - works sometimes, else "stack underflow" Date: Wed, 6 Feb 2013 09:56:55 +0100 From: Ignatios Souvatzis <u502sou@beverly.kleinbus.org> References: <slrnkh2cf7.at4.u502sou@marie.beverly.kleinbus.org> <slrnkh2p3p.9v2.jed@aluche.mit.edu> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!border1.nntp.dca3.giganews.com!border2.nntp.dca3.giganews.com!border4.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!news.glorb.com!feeder.erje.net!us.feeder.erje.net!newsfeed.straub-nv.de!weretis.net!feeder4.news.weretis.net!news.wtal.de!news.tal.de!beverly.kleinbus.org!not-for-mail Newsgroups: news.software.readers Organization: TAL.DE and customers Lines: 47 NNTP-Posting-Host: beverly.kleinbus.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: news.wtal.de 1360142907 16172 82.139.196.57 (6 Feb 2013 09:28:27 GMT) X-Complaints-To: abuse@tal.de NNTP-Posting-Date: 6 Feb 2013 09:28:27 GMT User-Agent: slrn/0.9.9p1 (NetBSD) X-Original-Bytes: 2529