ex_04.bmx Unhandled Exception:( -99 ) ...

BlitzMax Forums/Brucey's Modules/ex_04.bmx Unhandled Exception:( -99 ) ...

Arowx(Posted 2008) [#1]
Hi getting the following error message:

Unhandled Exception:( -99 ) ternal error: code overflow

This is using the BaH.libcurlssl ex_04.bmx file on my own server.

I have traced the error down to the regex parser, here is a small test app that recreates the problem using the regex expression and string that triggers it...




Arowx(Posted 2008) [#2]
Managed to trim down the Regular expression to the following and still get the error, if this helps!



As soon as you trim down the expression to exclude the "\\[" and "\\]" it works and detects groups of chracters!

I believe the "\\[" and "\\]" just test for square bracket chracters so I'm not sure why this fails?


Brucey(Posted 2008) [#3]
Yeah, I think there's an issue in PCRE with too-deep recursion on the stack. (So I'll look into updating that, as well as seeing a way to stop the error if possible).

However... ;-)
... your regex is flawed :-p

You don't need the double slashes (\\) in BlitzMax, only C, since blitz doesn't use slash as an escape character. Removing those fixes the overflow error.
It won't find anything though, since the expression is looking for a differently formated "ls" output than you are testing it with.
You'll find if you remove that semi-colon (too) things will improve a little.

Anyhoo, if you were to use a string such as :
Local dir:String = "qasd 32/02/2222 05-Jan-2003 03:03:03 weASwer"

with a regex like

you would at least get a match...

But I ain't no expert...


Arowx(Posted 2008) [#4]
Hi Brucey, excellent!

Only the error is from the BaH.libcurlssl example 4 when pointed at my website.

The regex is taken from that used by the BaH.ftpparser in the vmsparser.bmx file, downloaded today from website/googlecode!

I tried it without the double \ and it worked!

Great work with the modules Brucey, now onto automating my weblog extraction process!


Brucey(Posted 2008) [#5]
Cool.. I'll sort *my* expressions out then ;-)