[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-dev] Crashes in findRegexp or File

findRegExp is partially broken -- something wrong with its
garbage-collection handling (which would cause crashes). Nobody has
looked into it AFAIK.

On Tue, Dec 23, 2008 at 3:49 PM, jostM <sc3@xxxxxxxx> wrote:
> I'm having constant crashes with this code. I've narrowed it down to
> either happening after reading the file several times, or  using
> findRegexp (even with much simpler finds than here).
> I'm trying to write an automatic link fixer, but it fails because of
> these crashes.
> You may need to do this a few time in a row before it crashes the whol SCApp
> (
>    p="Help/GUI/GUI-Classes.html";
>    //path.postln;
>    f=File.new(p,"r");
>    q= f.readAllString;
>    f.close;
>    // this string finds links,
>    // and parses them into a specific kind of array.
>    r="<a href=[\"]([^\"]*)[\"]>[a-zA-Z0-9_< >\"/=\-]*</a>";
>    l=q.findRegexp(r);
> )

James Harkins /// dewdrop world

"Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal."  -- Whitman

sc-dev mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-dev/
search: https://listarc.bham.ac.uk/lists/sc-dev/search/