[Laszlo-dev] what's generating this error in swf10?

P T Withington ptw at pobox.com
Sun Sep 20 12:07:33 PDT 2009


Because `globalValue` sux on swf9/10 and usually returns null, which  
you can't dereference.  André is right though, globalValue, or any of  
the dereferences could result in a null that could cause an error in  
the next step, and we don't want to see that error (the caller is  
prepared to catch the error and work out longhand what the real issue  
is).

This bug could be enlarged to say:  Find all the places in the  
debugger that expect an error and make sure that all the callees have  
the appropriate pragma.

But the further mystery is that the try/catch is not inserted in  
DHTML, only in swf9/10.  So there is another mystery in the compiler...

On 2009-09-20, at 14:53, Henry Minsky wrote:

> Why did a missing throwsErrors cause this?  There are some probes of  
> various
> places to see if the
> symbol is  found there, but aren't they all using the '[...]' access
> mechanism, which doesn't throw an error if no
> value is found?
>
>
>
>
> On Sun, Sep 20, 2009 at 2:25 PM, P T Withington <ptw at pobox.com> wrote:
>
>> This is why you should always cc laszlo-dev:
>>
>> http://jira.openlaszlo.org/jira/browse/LPP-8486
>>
>> André already figured it out.
>>
>>
>> On 2009-09-18, at 20:29, P T Withington wrote:
>>
>> Well, the debugger remembers errors and won't ever print the same one
>>> again.  So that could be why you don't see it again, or, something  
>>> is just
>>> not initialized the first time around.
>>>
>>> It will be a pain to debug, because fdb doesn't seem to intercept  
>>> errors
>>> if they are/will be caught, and now that the debugger catches all  
>>> errors...
>>> bleah!
>>>
>>> I don't see it either, so I guess what you'd have to do is put a  
>>> #pragma
>>> "throwsError=true" in (I think you could put it at the top-level  
>>> of the
>>> class block) and try fdb-ing it?
>>>
>>> On 2009-09-18, at 18:19, Henry Minsky wrote:
>>>
>>> The first time I type in any 'simple' expression in a swf10  
>>> debugger, I
>>>> get
>>>> this error message. I don't see it happen again after
>>>> the first time.
>>>>
>>>>
>>>> lzx> Debug.window.x
>>>> ERROR @compiler/LzBootstrapDebugService.lzs#125: TypeError: Error  
>>>> #1010:
>>>> A
>>>> term is undefined and has no properties.
>>>> 71.25
>>>> lzx> Debug.window.x
>>>> 71.25
>>>> lzx>
>>>>
>>>> The line of code it is pointing to is evalSimpleExpr, but I don't  
>>>> see why
>>>> it's generating an error.
>>>>
>>>>
>>>>
>>>> --
>>>> Henry Minsky
>>>> Software Architect
>>>> hminsky at laszlosystems.com
>>>>
>>>
>>>
>>
>
>
> -- 
> Henry Minsky
> Software Architect
> hminsky at laszlosystems.com




More information about the Laszlo-dev mailing list