bvaughn/react-devtools-experimental

Error: "Cannot read property 'treeBaseDuration' of undefined"

sompylasar opened this issue · 5 comments

  1. Open an app that supports profiling, e.g. https://react-devtools-experimental.now.sh/
  2. Open React DevTools Profiler. Reload with profiling.
  3. Interact with the app so that some commits add and remove elements from rendering.
  4. Finish profiling.
  5. Click (select) the last commit in the timeline.
  6. Click (select) an element that is not present in the first commit.
  7. Switch to the first commit via the timeline (the commit that does not have the selected element).

devtools-profiler-crash-20190520

            scaleX: Object(xa.f)(0, null !== d ? d.treeBaseDuration : e.baseDuration, 0, i),

in this piece:

    function za({chartData: e, commitDetails: n, commitTree: t, height: a, width: i}) {
        const l = Object(r.useContext)(oa)
          , s = l.selectFiber
          , c = l.selectedFiberID
          , u = Object(r.useMemo)(()=>{
            if (null === c)
                return 0;
            const n = e.idToDepthMap.get(c);
            return void 0 !== n ? n - 1 : 0
        }
        , [e, c])
          , d = Object(r.useMemo)(()=>{
            let n = null;
            return null !== c && (n = e.rows[u].find(e=>e.id === c)),
            n
        }
        , [e, c, u])
          , f = Object(r.useMemo)(()=>({
            chartData: e,
            scaleX: Object(xa.f)(0, null !== d ? d.treeBaseDuration : e.baseDuration, 0, i),
            selectedChartNode: d,
            selectedChartNodeIndex: u,
            selectFiber: s,
            width: i
        }), [e, d, u, s, i]);
        return o.a.createElement(T, {
            height: a,
            innerElementType: Fa,
            itemCount: e.depth,
            itemData: f,
            itemSize: Ca,
            width: i,
            __source: {
                fileName: Ra,
                lineNumber: 153
            }
        }, Sa)
    }

Please do not remove the text below this line

DevTools version: 4.0.0-f10a6b3

Call stack: at chrome-extension://pkmnigdcbihgkcpblhoollboafggfkpm/build/main.js:56:245360
at Object.useMemo (chrome-extension://pkmnigdcbihgkcpblhoollboafggfkpm/build/main.js:43:61068)
at useMemo (chrome-extension://pkmnigdcbihgkcpblhoollboafggfkpm/build/main.js:30:5137)
at za (chrome-extension://pkmnigdcbihgkcpblhoollboafggfkpm/build/main.js:56:245308)
at Sa (chrome-extension://pkmnigdcbihgkcpblhoollboafggfkpm/build/main.js:43:56401)
at ci (chrome-extension://pkmnigdcbihgkcpblhoollboafggfkpm/build/main.js:43:63257)
at xl (chrome-extension://pkmnigdcbihgkcpblhoollboafggfkpm/build/main.js:43:96604)
at bl (chrome-extension://pkmnigdcbihgkcpblhoollboafggfkpm/build/main.js:43:81524)
at gl (chrome-extension://pkmnigdcbihgkcpblhoollboafggfkpm/build/main.js:43:79150)
at ao (chrome-extension://pkmnigdcbihgkcpblhoollboafggfkpm/build/main.js:43:41222)

Component stack: in za
in div
in n
in div
in La
in Suspense
in div
in div
in div
in ol
in na
in Unknown
in Vo
in Unknown
in div
in div
in aa
in K
in ae
in po
in Bl

Thanks for the bug report. I suggest holding off on looking into it until #276 is complete though (in case anyone was interested) because I'd like to avoid merge conflicts.

Not able to repro this following the instructions listed. Can you still repro it with the latest version of DevTools? (Unfortunately you're going to need to manually re-install)

Just wanted to let you know that I was also experiencing this issue and can no longer reproduce it in version 4.0.0.3 f47b40f.

Thanks for the info @daltondowning !

Does not repro on version 98623df.