Opened 12 years ago

Closed 12 years ago

#10403 closed defect (invalid)

BorderContainer: too much recursion

Reported by: Dipl.Ing. (FH) Christian K. Fraunholz Owned by: anonymous
Priority: high Milestone: tbd
Component: Dijit Version: 1.4.0b
Keywords: Cc:
Blocked By: Blocking:


in dojo version 1.4 the following code causes an endless loop ("too much recursiono error message in firebug"):

    var bc = new dijit.layout.BorderContainer({
        id: tabName,
        gutters: false,
        liveSplitters: false

    var grid = new sparepart.widget.DeviceGroupGrid({
        context: mySelection

The error disappears when setting gutters to true or disabling the grid mixin that overrides the adaptHeight method of the grid. The code worked fine in dojo version 1.3

Attachments (2)

test_BorderContainer_prog.html (1.1 KB) - added by bill 12 years ago.
works fine for me
dataGrid_borderContainer_bug.html (1.9 KB) - added by dgreene 12 years ago.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 12 years ago by bill

Component: GeneralDijit
Resolution: worksforme
Status: newclosed
Summary: too much recursionBorderContainer: too much recursion

Please attach test cases using the attach file button. I tried making a test case out of the code you attached above and it worked fine.

Also, does the failure have anything to do with your sparepart.widget.DeviceGroupGrid? widget? If so you need to add that to your test case.

Changed 12 years ago by bill

works fine for me

comment:2 Changed 12 years ago by dgreene

Resolution: worksforme
Status: closedreopened

I am seeing the "too much recursion" error with a DataGrid inside a BorderContainer inside a dojox Dialog. I have attached a test case. Oddly enough, there are several conditions which I found have to be true in order for the error to happen:

  • gutters must be "false" on the BorderContainer: setting to "true" makes it work fine.
  • The BorderContainer's height must be 100%: setting to a pixel height makes it work fine.
  • There must be a top region ContentPane in the BorderContainer, and that ContentPane must not be empty: if the top region ContentPane contains nothing or if there isn't a top region, everything works fine.
  • dijit.Dialog works fine

The endless loop appears to come from the adaptHeight() method in _View.js of the DataGrid, which calls hasHScrollbar(), which calls this.grid.update(), which starts the whole thing over again. It seems weird that an inspector method called hasHScrollbar() would call an action method update(), but I'm sure it was done for a reason.

tested in FF 3.6.3 with Dojo 1.4.3

Changed 12 years ago by dgreene

comment:3 Changed 12 years ago by bill

Resolution: invalid
Status: reopenedclosed

I do see the hang in dgreene's testcase although it's being caused because the BorderContainer doesn't has a height/width set. I added style="height:300px; width: 300px; and then the test works correctly, with no hang.

Perhaps that was the problem in the original ticket also.

When I traced things in firebug the second ContentPane ended up calling grid.resize({h: 1, w: 1}) and then the browser hung. Not sure why, but anyway the lack of size specification is the error in the test file.

Note: See TracTickets for help on using tickets.