When you change the < in the javascript your forcing it to clear the mason
cache.
Once you've changed it to >, did you re-request page1 again before page2,
retracing your steps.
It might seem silly, but it's the most likely reason I can think of your
change from < to > making a difference.
You could also try adding MORE < clauses to the javascript after it's
segfaulted and see if it runs again afterwards.
That would certainly destroy any possibility of it being <s causing the
problem.

G

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Michael Burns
> Sent: 22 March 2006 00:19
> To: Mason-Users
> Subject: [Mason] Mason Segfault due to too many <s ?
> 
> Good afternoon,
> 
> I want to report a very, very strange segfault I ran into this  
> afternoon.
> 
> I have a component that contains a bunch of Javascript. I include  
> this component on a variety of pages which need it.
> 
> All is fine & dandy, until this afternoon when creating a new page.  
> Everything was fine, until I inserted the call to the Javascript  
> component. Subsequent web requests for the page started segfaulting  
> -- on every request.
> 
> This new page isn't materially different from any other page that  
> calls the Javascript component (and the others all still work) --  
> except that it is a bit longer/larger and contains a lot more 
> control  
> structures (Mason/Perl if and else blocks galore).
> 
> I mention the control block stuff because it's seems that (so far as  
> I can tell) I might be running into a HTML::Mason::Lexer limit of  
> some sort? Here's why I think this:
> 
> I have narrowed down the problem to "excess" less-than (<) signs in  
> the Javascript code of the component I'm trying to include.
> 
> A pseudo-code case might look like this:
> 
> page1.html
> ---------------
> [mason, perl, etc]
> <& Javascript.mas &>
> [mason, perl, etc]
> 
> 
> page2.html
> ---------------
> [more complicated perl, etc]
> <& Javascript.mas &>
> [more complicated mason, perl, etc]
> 
> Javascript.mas
> ---------------
> [some mason, perl, etc]
> <script>
> [javascript]
> for (var i=0; i < count; i++) {
>    // javascript
> }
> [more javascript]
> </script>
> [some more mason, perl, etc]
> 
> 
> So the scenario is that page1.html loads fine. page2.html results in  
> a segfault (it loads fine if the <& Javascript.mas &> is 
> commented out).
> 
> Here's the really odd thing that made me think it might be a  
> HTML::Mason::Lexer issue: if I change all less-thans in the  
> Javascript file to something else -- it works!! (well, the 
> javascript  
> is logically broken, but I can change it to just not use less-than).  
> Really strange. So this works where above doesn't:
> 
> Javascript.mas
> ---------------
> [some mason, perl, etc]
> <script>
> [javascript]
> for (var i=0; count > i; i++) {
>    // javascript
> }
> </script>
> [some more mason, perl, etc]
> 
> 
> I am very baffled -- the javascript should just be "opaque" content  
> as far as Mason would care, I'd assume. Yet it seems to be being  
> caught up on the '<' in the content, which is what is leading me to  
> think maybe it's a Lexer issue or something farther up the chain ...
> 
> Any ideas? Also anything you folks think I could try to offer more  
> insight?
> 
> Thanks for your time,
> 
> 
> -Michael
> _______________________________________________________
> 
> Michael Burns
> Cosbit Technologies
> 403-701-2672  / [EMAIL PROTECTED]
> 
> AIM: cmikeburns
> MSN: cmikeburns
> _______________________________________________________
> 
> Box 2173, Station M  .  Calgary, Alberta, Canada  .  T2P 2M4
> http://cosbit.com
> 
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking 
> scripting language
> that extends applications into web and mobile media. Attend 
> the live webcast
> and join the prime developer group breaking into this new 
> coding territory!
> http://sel.as-us.falkag.net/sel?cmd=k&kid0944&bid$1720&dat1642
> _______________________________________________
> Mason-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mason-users
> 
> 
> 




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to