Skip to content

Instantly share code, notes, and snippets.

@ppmathis
Created July 14, 2016 21:03
Show Gist options
  • Select an option

  • Save ppmathis/063341fad125506b0a963396bc90eb27 to your computer and use it in GitHub Desktop.

Select an option

Save ppmathis/063341fad125506b0a963396bc90eb27 to your computer and use it in GitHub Desktop.

Affected Function

Snippet taken from pvemanagerlib.js:7804-7809

isValid: function() {
    var me = this;

    var form = me.formPanel.getForm();
    return form.isValid();
}

Stacktrace

The following stack trace was made with a breakpoint set at at pvemanagerlib.js:7808, which represents the call to "form.isValid();" which seems to trigger the infinite recursion. Execution was manually continued a few times to verify that the breakpoint is correctly set and happens within that loop. It is clearly visible that the same piece of code gets repeated over and over.

Unfortunately I was not able to get the stack trace origin right from the exception, as even when you set the stacktrace limit to infinite, the Chromium Developer Tools still enforce some kind of limit and "Break on exceptions" does not seem to work either.

isValid (pvemanagerlib.js:7808)
(anonymous function) (pvemanagerlib.js:8035)
fire (ext-all-debug.js:20226)
doFireEvent (ext-all-debug.js:21133)
doFireEvent (ext-all-debug.js:64735)
prototype.doFireEvent (ext-all-debug.js:54760)
fireEventArgs (ext-all-debug.js:20986)
fireEvent (ext-all-debug.js:20945)
afterLayout (ext-all-debug.js:125037)
notifyOwner (ext-all-debug.js:122655)
callLayout (ext-all-debug.js:215815)
flushLayouts (ext-all-debug.js:215961)
runComplete (ext-all-debug.js:216503)
callOverrideParent (ext-all-debug.js:1570)
callParent (ext-all-debug.js:12118)
runComplete (ext-all-debug.js:62177)
run (ext-all-debug.js:216490)
flushLayouts (ext-all-debug.js:62185)
resumeLayouts (ext-all-debug.js:62200)
Ext.resumeLayouts (ext-all-debug.js:67851)
isValid (ext-all-debug.js:159272)

isValid (pvemanagerlib.js:7808)
(anonymous function) (pvemanagerlib.js:8035)
fire (ext-all-debug.js:20226)
doFireEvent (ext-all-debug.js:21133)
doFireEvent (ext-all-debug.js:64735)
prototype.doFireEvent (ext-all-debug.js:54760)
fireEventArgs (ext-all-debug.js:20986)
fireEvent (ext-all-debug.js:20945)
afterLayout (ext-all-debug.js:125037)
notifyOwner (ext-all-debug.js:122655)
callLayout (ext-all-debug.js:215815)
flushLayouts (ext-all-debug.js:215961)
runComplete (ext-all-debug.js:216503)
callOverrideParent (ext-all-debug.js:1570)
callParent (ext-all-debug.js:12118)
runComplete (ext-all-debug.js:62177)
run (ext-all-debug.js:216490)
flushLayouts (ext-all-debug.js:62185)
resumeLayouts (ext-all-debug.js:62200)
Ext.resumeLayouts (ext-all-debug.js:67851)
isValid (ext-all-debug.js:159272)

isValid (pvemanagerlib.js:7808)
(anonymous function) (pvemanagerlib.js:8035)
fire (ext-all-debug.js:20226)
doFireEvent (ext-all-debug.js:21133)
doFireEvent (ext-all-debug.js:64735)
prototype.doFireEvent (ext-all-debug.js:54760)
fireEventArgs (ext-all-debug.js:20986)
fireEvent (ext-all-debug.js:20945)
afterLayout (ext-all-debug.js:125037)
notifyOwner (ext-all-debug.js:122655)
callLayout (ext-all-debug.js:215815)
flushLayouts (ext-all-debug.js:215961)
runComplete (ext-all-debug.js:216503)
callOverrideParent (ext-all-debug.js:1570)
callParent (ext-all-debug.js:12118)
runComplete (ext-all-debug.js:62177)
run (ext-all-debug.js:216490)
flushLayouts (ext-all-debug.js:62185)
resumeLayouts (ext-all-debug.js:62200)
Ext.resumeLayouts (ext-all-debug.js:67851)
isValid (ext-all-debug.js:159272)

isValid (pvemanagerlib.js:7808)
(anonymous function) (pvemanagerlib.js:8035)
fire (ext-all-debug.js:20226)
doFireEvent (ext-all-debug.js:21133)
doFireEvent (ext-all-debug.js:64735)
prototype.doFireEvent (ext-all-debug.js:54760)
fireEventArgs (ext-all-debug.js:20986)
fireEvent (ext-all-debug.js:20945)
afterLayout (ext-all-debug.js:125037)
notifyOwner (ext-all-debug.js:122655)
callLayout (ext-all-debug.js:215815)
flushLayouts (ext-all-debug.js:215961)
runComplete (ext-all-debug.js:216503)
callOverrideParent (ext-all-debug.js:1570)
callParent (ext-all-debug.js:12118)
runComplete (ext-all-debug.js:62177)
run (ext-all-debug.js:216490)
flushLayouts (ext-all-debug.js:62185)
updateLayout (ext-all-debug.js:62243)
updateLayout (ext-all-debug.js:67127)
onShow (ext-all-debug.js:66094)
callParent (ext-all-debug.js:12118)
onShow (ext-all-debug.js:145577)
callParent (ext-all-debug.js:12118)
onShow (ext-all-debug.js:153241)
callParent (ext-all-debug.js:12118)
(anonymous function) (ext-all-debug.js:19752)
show (ext-all-debug.js:66857)
run_editor (pvemanagerlib.js:30209)
me.handler (pvemanagerlib.js:2389)
callback (ext-all-debug.js:8442)
fireHandler (ext-all-debug.js:130649)
onClick (ext-all-debug.js:130637)
fire (ext-all-debug.js:20226)
fire (ext-all-debug.js:32466)
publish (ext-all-debug.js:32442)
onRecognized (ext-all-debug.js:33001)
fire (ext-all-debug.js:112346)
onTouchEnd (ext-all-debug.js:113409)
invokeRecognizers (ext-all-debug.js:33039)
onTouchEnd (ext-all-debug.js:33199)
(anonymous function) (ext-all-debug.js:6996)
fireHandlers (ext-all-debug.js:6567)
requestAnimationFrame (async)
requestAnimationFrame ()
(anonymous function) ()
doDelegatedEvent ()
onDelegatedEvent ()
(anonymous function) ()

Scope

The following variables are present within the scope of the isValid() method listed above. Unfortunately I was not able to JSON.stringify() them, as they're a huge mess of circular references and even some libraries specialized for handling circular references started to choke here.

form

{
    $observableInitialized: true
    _boundItems: constructor
    api: undefined
    baseParams: undefined
    checkDirtyTask: Ext.util.DelayedTask
    checkErrorTask: Ext.util.DelayedTask
    checkValidityTask: Ext.util.DelayedTask
    errorReader: undefined
    eventedBeforeEventNames: Object
    events: Object
    fieldMonitors: Object
    hasListeners: HasListeners
    initialized: true
    jsonSubmit: undefined
    managedListeners: Array[55]
    method: "PUT"
    monitor: constructor
    owner: constructor
    paramOrder: undefined
    paramsAsHash: undefined
    reader: undefined
    standardSubmit: undefined
    timeout: undefined
    trackResetOnLoad: true
    url: "/api2/extjs/cluster/backup/d79811965c3628a0b4aedf3ecb27567b1d04dbf5: 1"
    waitMsgTarget: undefined
    waitTitle: undefined
    __proto__: constructor
}

this

{
    $observableInitialized: true
    _renderState: 4
    activeCounter: 0
    activeUI: "default"
    afterHeaderInit: true
    alwaysOnTop: false
    ariaEl: constructor
    ariaRenderAttributes: null
    ariaUsesMainElement: true
    autoGenId: true
    body: constructor
    buttons: null
    childEls: Object
    collapseDirection: "top"
    componentCls: "x-window"
    componentLayout: constructor
    componentLayoutCounter: 2
    config: Object
    container: constructor
    create: false
    dd: constructor
    dockedItems: constructor
    el: constructor
    eventedBeforeEventNames: Object
    events: Object
    fbar: null
    floatParent: undefined
    formPanel: constructor
    frame: true
    frameBC: null
    frameBL: null
    frameBR: null
    frameBody: null
    frameML: null
    frameMR: null
    frameTC: null
    frameTL: null
    frameTR: null
    frameTable: null
    hasHierarchyEventListeners: true
    hasListeners: HasListeners
    header: constructor
    hidden: false
    hiddenOnCollapse: constructor
    id: "pveDcBackupEdit-1189"
    inheritedState: Object
    inheritedStateInner: Object
    initBindable: ()
    initConfig: ()
    initialConfig: Object
    isFirstInstance: true
    items: constructor
    jobid: "d79811965c3628a0b4aedf3ecb27567b1d04dbf5:1"
    keyMap: constructor
    lastBox: Object
    layout: constructor
    layoutCounter: 2
    loader: null
    managedListeners: Array[13]
    method: "PUT"
    minHeight: 50
    minWidth: 50
    modal: true
    pluginsInitialized: true
    preventChildDisable: false
    protoEl: null
    renderData: Object
    rendered: true
    rendering: null
    scrollFlags: Object
    stateEvents: Array[0]
    subject: "Backup Job"
    tabGuardAfterEl: constructor
    tabGuardBeforeEl: constructor
    title: "Edit: Backup Job"
    tools: Array[1]
    touchScroll: false
    ui: "default"
    uiCls: Array[1]
    url: "/api2/extjs/cluster/backup/d79811965c3628a0b4aedf3ecb27567b1d04dbf5:1"
    width: 600
    x: 660
    y: 216
    zIndexManager: constructor
    zIndexParent: undefined
    __proto__: constructor
}

me

Does not make any sense to list the value of "me", as it is the same as "this" as you can even see in the code above.

Additional Information

Proxmox Version: Proxmox Virtual Environment 4.2-15/6669ad2c
Browser Version: Version 51.0.2704.106 (64-bit)
Operating System: Antergos (Arch Linux based, rolling release, newest updates)

Source Files

ext-all-debug.js: https://gist.githubusercontent.com/NeoXiD/f0c030274b8dd0d1cb453e3056641933/raw/0402ddc89d0e3611d71ceb4968e230cbacc45e0b/ext-all-debug.js
pvemanagerlib.js: https://gist.githubusercontent.com/NeoXiD/c44608af6bfe52141e147e9a4e17bd1a/raw/395690db539f34ce2374c6c5bfbef532ed0fadf3/pvemanagerlib.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment