Already filed as: http://jira.openlaszlo.org/jira/browse/LPP-7344
Guess we should raise the priority on that! On 2010-04-06, at 10:25, Henry Minsky wrote: > Hmm, I wonder if there is anything better that the compiler or runtime can > do to warn about > constraints that cannot work. > > The runtime error you were seeing was a clue, maybe we can make a beefed up > check in the > constraint execution code in debug mode to try and help flag cases where > the constraint > is ill-formed. > > > > On Tue, Apr 6, 2010 at 10:10 AM, Roger Yarrow <[email protected]> wrote: > >> Thanks everyone for the prompt replies. With lots of commenting out >> sections and trial/error, I found the problematic constraint. I had a >> constraint inside a class that was based upon an array. The array is defined >> in the class such as this: >> >> <attribute name="range_array" type="expression" value="$once{new >> Array()}"/> >> >> The constraint was like this: >> >> <view visible="${classroot.range_array.length>1}"> >> >> This was the point of failure. To resolve, I made an attribute that held >> the current value of the array's length. I then modified the constraint to >> use this attribute value instead, and it works! Problem solved! >> >> >> >> On Tue, Apr 6, 2010 at 1:33 AM, Max Carlson <[email protected]> wrote: >> >>> Wow - congratulations on the port! >>> >>> I'd suggest running in debug mode with backtrace enabled. Then, you can >>> click on the errors and see exactly what's causing them. If it's something >>> in our code you can click the bug report button and use that to submit a >>> report to http://jira.openlaszlo.org/ so we can get it fixed for you. >>> >>> Let me know what you find! >>> >>> Regards, >>> Max Carlson >>> OpenLaszlo.org >>> >>> >>> On 4/5/10 8:33 PM, Roger Yarrow wrote: >>> >>>> Hi, >>>> >>>> I have a large app (18000+ lines) that I migrated from 4.1.1 swf8 to >>>> 4.7.1 swf9. I have it all working (finally!) with debug=true. When >>>> debug=true, the application will compile and execute but I get about a >>>> handful of errors like this: >>>> >>>> ERROR @core/LzNode.lzs˜1518: TypeError: Error #1034: Type Coercion >>>> failed: cannot convert [...@2c2b5821 to LzEventable. >>>> ERROR @core/LzNode.lzs˜1518: TypeError: Error #1034: Type Coercion >>>> failed: cannot convert [...@b297f59 to LzEventable. >>>> ERROR @core/LzNode.lzs˜1518: TypeError: Error #1034: Type Coercion >>>> failed: cannot convert [...@c91ec11 to LzEventable. >>>> ERROR @core/LzNode.lzs˜1518: TypeError: Error #1034: Type Coercion >>>> failed: cannot convert [...@a6610b1 to LzEventable. >>>> >>>> The errors are during initialization as I have lots of views/classes >>>> being instantiated in a variety of ways. >>>> >>>> When I attempt to deploy the app using debug=false, it will not fully >>>> execute. Adobe Flash (debugger version) pops up with errors such as: >>>> >>>> TypeError: Error #1034: Type Coercion failed: cannot convert [...@1d6a2661 >>>> to .LzEventable. >>>> at LzNode/applyConstraintMethod() >>>> at LzNode/applyConstraintExpr() >>>> at LzNode/__LZresolveReferences() >>>> at LzNode/__LZcallInit() >>>> at LzNode/__LZcallInit() >>>> at LzNode/__LZcallInit() >>>> at LzNode/__LZclearPreventInit() >>>> at LzState/apply() >>>> at LzState/$lzc$set_applied() >>>> at LzEventable/setAttribute() >>>> at MethodInfo-2268() >>>> at LzNode/applyConstraintMethod() >>>> at LzNode/applyConstraintExpr() >>>> at LzNode/__LZresolveReferences() >>>> at LzNode/__LZcallInit() >>>> at LzNode/__LZcallInit() >>>> at LzNode/__LZcallInit() >>>> at LzNode/__LZcallInit() >>>> at LzNode/__LZcallInit() >>>> at LzNode/__LZcallInit() >>>> at LzNode/__LZcallInit() >>>> at LzNode/__LZinstantiationDone() >>>> at LzView/__LZinstantiationDone() >>>> at LzInstantiatorService/makeSomeViews() >>>> at LzInstantiatorService/checkQ() >>>> at >>>> Function/http://adobe.com/AS3/2006/builtin::call()<http://adobe.com/AS3/2006/builtin::call%28%29> >>>> at LzEvent/sendEvent() >>>> at LzIdleKernel$/__update() >>>> >>>> And: >>>> >>>> TypeError: Error #1034: Type Coercion failed: cannot convert [...@1fc27079 >>>> to .LzEventable. >>>> at LzNode/applyConstraintMethod() >>>> at LzNode/applyConstraintExpr() >>>> at LzNode/__LZresolveReferences() >>>> at LzNode/__LZcallInit() >>>> at LzNode/__LZcallInit() >>>> at LzNode/__LZclearPreventInit() >>>> at LzState/apply() >>>> at LzState/$lzc$set_applied() >>>> at LzEventable/setAttribute() >>>> at MethodInfo-2286() >>>> at LzNode/applyConstraintMethod() >>>> at LzNode/applyConstraintExpr() >>>> at LzNode/__LZresolveReferences() >>>> at LzNode/__LZcallInit() >>>> at LzNode/__LZcallInit() >>>> at LzNode/__LZcallInit() >>>> at LzNode/__LZcallInit() >>>> at LzNode/__LZcallInit() >>>> at LzNode/__LZcallInit() >>>> at LzNode/__LZinstantiationDone() >>>> at LzView/__LZinstantiationDone() >>>> at LzInstantiatorService/makeSomeViews() >>>> at LzInstantiatorService/createImmediate() >>>> at LzNode/createChildren() >>>> at LzNode() >>>> at LzView() >>>> at $lzc$class_generic_widget() >>>> at $lzc$class_countdown_timer() >>>> at $lzc$class_m3107/reload() >>>> at $lzc$class_m3100/show_desktop() >>>> at $lzc$class_m1974/clearMessage() >>>> at >>>> Function/http://adobe.com/AS3/2006/builtin::call()<http://adobe.com/AS3/2006/builtin::call%28%29> >>>> at LzDelegate/execute() >>>> at MethodInfo-437() >>>> at >>>> Function/http://adobe.com/AS3/2006/builtin::apply()<http://adobe.com/AS3/2006/builtin::apply%28%29> >>>> at LzTimeKernelClass/timerHandler() >>>> at flash.utils::Timer/_timerDispatch() >>>> at flash.utils::Timer/tick() >>>> >>>> The nature of the errors (Error #1034) are the same so I'm assuming they >>>> are one in the same. When debug=true, Flash can "handle" the error and >>>> allows my app to execute normally. When debug=false, it cannot handle >>>> the error and the app dies during instantiation and executes but only >>>> "halfway" alive. >>>> >>>> How do I figure out where the problem is? I looked in core/LzNode and >>>> the problem area is related to applyConstraintMethod, so I'm guessing I >>>> have a constraint going haywire somewhere. Perhaps a constraint is >>>> based upon a view not yet instantiated? How do I "dig deeper" to find >>>> out where the issue is? >>>> >>>> I am desperate here... if I have to, I can just deploy using a >>>> debug=true and hide the debug window. Obviously, I'd rather not do that. >>>> >>>> Thanks!! >>>> >>>> - Roger >>>> >>> >> > > > -- > Henry Minsky > Software Architect > [email protected]
