> Hey,

Hey hey,


>> I have a very annoying error in my current application (uses qooxdoo 3.0.1).
>>
>> I have a window, that creates other windows dynamically, when needed.
>> This is done with a Mixin, that holds the references to that windows and
>> therefore also has a destructor to dispose those references if instantiated.
>>
>>
>> Now when I log-out of my application (all the destructors for all created
>> windows are called in this case), I get this "content is null" Error in
>> renderLayout() Method of Widged.js line 995 [1]
> 
> Sounds strange.
> 
> 
>> Some questions arise:
>>
>> 1. All th sub-windows are closed at "logout time". So why is "renderLayout"
>>   been called for any of those that sub-window instances at all?
> 
> Thats a good question! Sounds like a framework issue to me so I'm interested 
> in a solution as well. :) It could be that the remove of the disposed widget 
> from the layout queue is missing somewhere but thats only a guess.

Is there a thing I can do to see whether this might be the case? I also only
can guess what's happening. But as I have several 10th of windows and dialogs
and this issue came up just recently, I am pretty sure the wrong usage is "on
my side".


>> 2. The destructor for the window and the sub-windows have already been 
>> called.
>>   When firebug hits the error, 'this.$$disposed === true' and 'this' is an
>>   instance of sub-window. Although it's an *ex* instance I should say ;)
>>   This seems to be O.K., right? The window-destructor is called, that called
>>   the Mixin-destructor, that called the destructor of the sub-window.[2]
> 
> It's not ok that a disposed widget should be rendered but the rest seems to 
> be good.

Can someone (you?) tell a little more when I try to post a stack dump?


>> I can remove the destruction of the sub-window handles from the Mixin to
>> prevent this error from happening, but then the destructor of the sub-windows
>> are not called and that's something I don't want!
>>
>>
>>
>> Guarding the access to undefined 'content' (line 994 in Widget.js) like this
>> does the trick for me...
>> ---------------------------------
>> 994: if (content && Object.keys(contentStyles).length > 0) {
>> 995:   content.setStyles(contentStyles);
>> 996: }
>> -----------------------------------
>> ...but I have no idea what else this could break! Although this extra check 
>> for
>> 'content' to be defined/not-null looks save to me.
> 
> That will only prevent the consequences but does not solve the root cause of 
> the issue. Who knows if there breaks something else in some other situations. 

Right! This is only a last resort. A message that might point me to the root
cause would be better. Something like:
---------------------------------
991: if !(content) {
992:   this.warn("'content' is not valid! Did you possibly do this or that?");
993: }
994: if (Object.keys(contentStyles).length > 0) {
995:   content.setStyles(contentStyles);
996: }
---------------------------------
But for that, we first need to know what went wrong ;)


>> Nevertheless, I would be interested if someone could help me getting the
>> *reason* for this
>>
>> Or can anybody point me into a direction how to fix this in the first place?
> 
> Thats hard to tell without seeing the issue by myself. Do you have any chance 
> to let us see the issue?

I'm not sure I can. My Application is pretty large and not in the public
domain. But maybe I can find the time at the weekend to re-create the issue
with a basic application.


> Regards,
> Martin

Thanks for the response --and I'll keep you informed if I find something--,
  Peter

-- 

*************************************************************
Besuchen Sie uns:
01.-03.10.2013 Post-Expo in Wien
Wir laden Sie herzlich ein und freuen uns auf Ihre Anmeldung.
*************************************************************

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60133471&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to