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

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



a quick test seems to be an improvement. no crashes so far. Thiis really
great. I hope to have a utility soon that will auatomatically fix any
broken help link that can be determined by findHelpFile.

This would also make it possibel for people to update help files
alternate help file path installations on other platforms.

jost



Jan T wrote:
> Jost,
> could you update & try again, i committed a fix.
> Let me know whether it runs more stable now.
> J
>
> On Dec 23, 2008, at 10:01 PM, jostM wrote:
>
>> Ok I'll have to try to archive the result before it crashes, and then
>> use that to do my link replacement.
>>
>> Or perhaps I'll outsource this to the shell.
>>
>> thanks,
>>
>> jost
>>
>>
>>
>> James Harkins wrote:
>>>
>>> findRegExp is partially broken -- something wrong with its
>>> garbage-collection handling (which would cause crashes). Nobody has
>>> looked into it AFAIK.
>>> hjh
>>>
>>>
>>> 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);
>>>>
>>>> )
>>>>
>>>
>>>
>
>
> _______________________________________________
> 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/
>

_______________________________________________
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/