beekeeper-studio / beekeeper-studio

Modern and easy to use SQL client for MySQL, Postgres, SQLite, SQL Server, and more. Linux, MacOS, and Windows.
https://www.beekeeperstudio.io
Other
16.34k stars 1.07k forks source link

BUG: View Structure option throws RangeError: Maximum call, no columns displayed #1425

Closed kb-ig closed 1 year ago

kb-ig commented 1 year ago

Describe the bug When I right-click on a table and select the "View Structure" option, the table columns are shown for a second or two, then vanish and the BK shows "No Columns".

Checking in the dev tools, I can see two errors occuring:

  1. Cannot read property 'style' of null - as soon as the structure window opens (and the columns are displayed)
  2. RangeError: Maximum call - a couple of seconds later, and the columns are no longer displayed after this

To Reproduce Steps to reproduce the behavior:

  1. Connect to DB
  2. Open dev tools
  3. Right click on any table and select "View Structure"
  4. Error should be observed
  5. (Note, this happens regardless of having dev tools open)

Expected behavior Table structure should be shown and not disappear after a couple of seconds

Screenshots / Gifs If applicable, add screenshots or GIFS to help explain your problem. BeekeeperStudio-ViewStructureBug

Version Information (please complete the following information):

Additional context The problem does not seem to happen every time. Sometimes, if the problem does not happen, closing and reopening Beekeeper and then following the reproduce steps will cause the error to occur.

rathboma commented 1 year ago

Thanks for the bug report. Does it happen on all tables or just specific ones?

kb-ig commented 1 year ago

@rathboma It seems quite inconsistent for some tables. When I was trying to capture that recording, it was 50/50 - sometimes it would work, and others not work (always the way when trying to capture a bug!). But now, I've just tried about 50 different tables across a number of different databases (all the same postgres version) and 100% hit this issue.

It seems to happen far less often with the developer tools window open. Following the 100% reproduce rate above with the dev tools closed, I can only reproduce around 10% of the time (maybe even less) with the dev tools open.

Sorry, I know this isnt very helpful :/ At first I thought it might be something to do with the table size (i.e. number of columns, number of constraints etc) but that doesnt seem to be the case. It also doesnt seem to be related to the number of rows in the table.

liepumartins commented 1 year ago

Just hit the same problem. I do not see a pattern yet. Happens on a production MySQL as well as local copy - the same tables. Also on a SQL Server tables.

kb-ig commented 1 year ago

Just in case the call stack is helpful

Call stack ``` Uncaught (in promise) RangeError: Maximum call stack size exceeded at Pt.set [as vDomWindowBuffer] (vue.runtime.esm.js:908) at Pt.resize (tabulator_esm.js:21802) at Mt.adjustTableSize (tabulator_esm.js:23218) at Mt.redraw (tabulator_esm.js:23269) at ut.tableResized (tabulator_esm.js:17798) at tabulator_esm.js:24092 at Array.forEach () at Gt._dispatch (tabulator_esm.js:24091) at Mt.dispatch (tabulator_esm.js:79) at Mt.adjustTableSize (tabulator_esm.js:23223) setData | @ | tabulator_esm.js:22398   | load | @ | tabulator_esm.js:23822   | replaceData | @ | tabulator_esm.js:25354   | handler | @ | helpers.ts:130   | Fn | @ | vue.runtime.esm.js:2987   | e.run | @ | vue.runtime.esm.js:3503   | Xr | @ | vue.runtime.esm.js:4090   | (anonymous) | @ | vue.runtime.esm.js:3113   | Wn | @ | vue.runtime.esm.js:3035   | processTicksAndRejections | @ | internal/process/task_queues.js:93   | Promise.then (async) |   |     | jn | @ | vue.runtime.esm.js:3060   | Xn | @ | vue.runtime.esm.js:3125   | ei | @ | vue.runtime.esm.js:4175   | e.update | @ | vue.runtime.esm.js:3482   | e.notify | @ | vue.runtime.esm.js:695   | set | @ | vue.runtime.esm.js:941   | Mi.Pi.set | @ | vue.runtime.esm.js:5311   | refresh | @ | TabTableProperties.vue:246   | processTicksAndRejections | @ | internal/process/task_queues.js:93   | async function (async) |   |     | refresh | @ | TabTableProperties.vue:246   | initialize | @ | TabTableProperties.vue:237   | shouldInitialize | @ | TabTableProperties.vue:170   | Fn | @ | vue.runtime.esm.js:2987   | e.run | @ | vue.runtime.esm.js:3503   | Xr | @ | vue.runtime.esm.js:4090   | (anonymous) | @ | vue.runtime.esm.js:3113   | Wn | @ | vue.runtime.esm.js:3035   | Promise.then (async) |   |     | jn | @ | vue.runtime.esm.js:3060   | Xn | @ | vue.runtime.esm.js:3125   | ei | @ | vue.runtime.esm.js:4175   | e.update | @ | vue.runtime.esm.js:3482   | e.notify | @ | vue.runtime.esm.js:695   | set | @ | vue.runtime.esm.js:941   | setActive | @ | TabModule.ts:55   | (anonymous) | @ | vuex.esm.js:844   | (anonymous) | @ | vuex.esm.js:466   | (anonymous) | @ | vuex.esm.js:465   | b._withCommit | @ | vuex.esm.js:624   | b.commit | @ | vuex.esm.js:464   | commit | @ | vuex.esm.js:409   | S.i.commit | @ | vuex.esm.js:796   | setActive | @ | TabModule.ts:126   | (anonymous) | @ | vuex.esm.js:851   | b.dispatch | @ | vuex.esm.js:516   | dispatch | @ | vuex.esm.js:406   | setActiveTab | @ | CoreTabs.vue?4d88:186   | addTab | @ | CoreTabs.vue?4d88:190   | async function (async) |   |     | addTab | @ | CoreTabs.vue?4d88:189   | openTableProperties | @ | CoreTabs.vue?4d88:268   | Fn | @ | vue.runtime.esm.js:2987   | Rr.e.$emit | @ | vue.runtime.esm.js:3685   | handler | @ | TableListContextMenus.ts:35   | optionClicked | @ | ContextMenu.vue?e9fd:68   | click | @ | ContextMenu.vue:1   | Fn | @ | vue.runtime.esm.js:2987   | n | @ | vue.runtime.esm.js:1785   | Ls.o._wrapper | @ | vue.runtime.esm.js:7428 ```
mcanepa commented 1 year ago

The same is happening to me

rathboma commented 1 year ago

Thanks all, we're looking into it. Hopefully a hotfix coming in the next couple of days