PDA

View Full Version : What's the best way of working out what's causing a Layout Run Failed error?



Jangla
14 Apr 2015, 12:16 AM
Title says it all. I've got this happening when hiding and showing the headerCt on a grid but I can't figure out why. Worked fine in 4.1.1, broken in 4.2.3

Thanks

yeghikyan
14 Apr 2015, 1:01 AM
fiddle.sencha.com

Jangla
14 Apr 2015, 1:04 AM
fiddle.sencha.com

If I'm working on an enterprise level app, I really need to know what's causing the issue in the actual live code. Creating a cut down version for fiddle isn't realistic and invariably doesn't replicate the problem. The issue is usually a subtlety in the massively complex app we have.

What I'd like is for Ext to report (or to know how to extract) the exact component(s) that's causing the layout failure.

marc.fearby
20 Apr 2015, 5:59 PM
+1

I have the same issue with an app I upgraded from 4.2.3 to 5.1 (to get new accessibility improvements). No matter what I do I keep getting this error :-(

And I'm talking about a massive application, too. Fiddle is not an option.

PS. I have a grid which uses a cell editing plugin with lots of combo boxes attached to each cell so that it functions a bit like a spreadsheet (with auto-complete), which I thought might have been the culprit (given its complexity) so I moved it out of the suspect formpanel, and I'm still getting "Layout run failed".

marc.fearby
20 Apr 2015, 8:47 PM
I don't know if the ultimate solution may be as simple as this, but getting rid of the ext-all-debug.js framework in app.json means I'm no longer getting these errors:


"js": [
{
"path": "${ext.dir}/build/ext-all.js"
}
// etc
],



Mind you, my grid cell editing plugin no longer works, but that might be another issue.

yeghikyan
20 Apr 2015, 9:56 PM
In my humble opinion ExtJs am meistens is used for massive, enterprise level applications, so it is not a reason to say "it is not possible to reproduce bug in fiddle".
In such cases we are turning off the components one by one and so localizing the bug... of course if the enterprise level application was developed in correct, modular way.

marc.fearby
21 Apr 2015, 8:53 PM
The particular 'enterprise' app I'm talking about I wrote a couple of years ago, and let's just say that I didn't know an awful lot about Ext JS back then, so it wasn't designed in a very modular way. It also has a very complex layout, but in any case, I've abandoned my efforts to migrate from 4.2.2 to 5.x because of the run layout failures.

I don't have any faith in the code under Ext 5 and it works just fine under Ext 4 (although it's not very accessible; nobody's complained yet!). It also uses combobox cell editors extensively, and I'd have to load ALL records in ALL stores under Ext 5 (which is unacceptable for this app) because it doesn't transfer the grid cell's text to the raw value of the combobox (like it does under Ext 4).

yeghikyan
22 Apr 2015, 12:13 AM
So the question is following: "an enterprise application do not work in Austrialia, how to fix the problem?":D

Jangla
30 Apr 2015, 2:05 AM
The particular 'enterprise' app I'm talking about I wrote a couple of years ago, and let's just say that I didn't know an awful lot about Ext JS back then, so it wasn't designed in a very modular way. It also has a very complex layout, but in any case, I've abandoned my efforts to migrate from 4.2.2 to 5.x because of the run layout failures.

I don't have any faith in the code under Ext 5 and it works just fine under Ext 4 (although it's not very accessible; nobody's complained yet!). It also uses combobox cell editors extensively, and I'd have to load ALL records in ALL stores under Ext 5 (which is unacceptable for this app) because it doesn't transfer the grid cell's text to the raw value of the combobox (like it does under Ext 4).

My code works flawlessly in 4.1.1 and breaks in 4.2.3 - so frustrating when it's not even a major revision that's being updated.

Edit: I've found a way to extract *some* info from Ext on this. It's no helping me work out what the problem is, but it may help others in a similar situation.

Place a break point just inside the runComplete method.

Then run this function in the console:




Ext.Object.each(me.layouts, function(key, value, obj) { if ( obj[key].running ) console.log(obj[key].id)})



This will tell you the id of any layouts in the current system that are failing (i.e. they are still set to running = true)

In my case, it says that it's the grid table view inside the grid panel. Something I have very little control over and am not doing anything to alter from the norm :(