Results 1 to 9 of 9

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

  1. #1
    Ext JS Premium Member
    Join Date
    Feb 2009
    Posts
    487
    Answers
    4

    Default What's the best way of working out what's causing a Layout Run Failed error?

    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

  2. #2
    Sencha User yeghikyan's Avatar
    Join Date
    Mar 2009
    Location
    München
    Posts
    574
    Answers
    99

    Default

    fiddle.sencha.com
    "The competent programmer is fully aware of the strictly limited size of his own skull; therefore he approaches the programming task in full humility, and among other things he avoids clever tricks like the plague." – Edsger W. Dijkstra

  3. #3
    Ext JS Premium Member
    Join Date
    Feb 2009
    Posts
    487
    Answers
    4

    Default

    Quote Originally Posted by yeghikyan View Post
    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.

  4. #4
    Sencha Premium User
    Join Date
    Sep 2011
    Location
    Tamworth, NSW, Australia
    Posts
    1,353
    Answers
    13

    Default

    +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".

  5. #5
    Sencha Premium User
    Join Date
    Sep 2011
    Location
    Tamworth, NSW, Australia
    Posts
    1,353
    Answers
    13

    Default

    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:

    Code:
    "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.

  6. #6
    Sencha User yeghikyan's Avatar
    Join Date
    Mar 2009
    Location
    München
    Posts
    574
    Answers
    99

    Default

    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.
    "The competent programmer is fully aware of the strictly limited size of his own skull; therefore he approaches the programming task in full humility, and among other things he avoids clever tricks like the plague." – Edsger W. Dijkstra

  7. #7
    Sencha Premium User
    Join Date
    Sep 2011
    Location
    Tamworth, NSW, Australia
    Posts
    1,353
    Answers
    13

    Default

    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).

  8. #8
    Sencha User yeghikyan's Avatar
    Join Date
    Mar 2009
    Location
    München
    Posts
    574
    Answers
    99

    Default

    So the question is following: "an enterprise application do not work in Austrialia, how to fix the problem?"
    "The competent programmer is fully aware of the strictly limited size of his own skull; therefore he approaches the programming task in full humility, and among other things he avoids clever tricks like the plague." – Edsger W. Dijkstra

  9. #9
    Ext JS Premium Member
    Join Date
    Feb 2009
    Posts
    487
    Answers
    4

    Default

    Quote Originally Posted by marc.fearby View Post
    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:

    Code:
    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

Similar Threads

  1. Getting Error "Layout run failed"
    By sjoshi in forum Ext: Discussion
    Replies: 1
    Last Post: 26 Apr 2013, 5:03 AM
  2. Layout failed error in extjs4.1
    By vijayakumar84 in forum Ext: Q&A
    Replies: 1
    Last Post: 12 Apr 2013, 3:54 AM
  3. Replies: 1
    Last Post: 9 Jul 2012, 6:13 AM
  4. "Layout run failed" error message.
    By mkaw in forum Ext: Q&A
    Replies: 4
    Last Post: 19 Jun 2012, 7:03 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •