Skip to content
This repository has been archived by the owner on Oct 22, 2021. It is now read-only.

Changing themes in a running instance overflows memory over time. #221

Closed
dvdmuckle opened this issue Nov 21, 2018 · 11 comments
Closed

Changing themes in a running instance overflows memory over time. #221

dvdmuckle opened this issue Nov 21, 2018 · 11 comments
Labels
bug Confirmed bugs.

Comments

@dvdmuckle
Copy link

dvdmuckle commented Nov 21, 2018

Using the file browser, if you change the theme of eDEX-UI a number of times, it starts to slow down and eventually grinds to a halt with the message [17916:0100/000000.413673:FATAL:memory.cc(22)] Out of memory. size=262144. It appears that when reloading a theme, the previous session is still being saved in memory, or something like that. This takes a number of theme changes to trigger on a machine with 16gb of RAM, though a smaller machine like my 8gb laptop doesn't take many theme changes.

@GitSquared
Copy link
Owner

(related source code)

@GitSquared GitSquared added bug Confirmed bugs. and removed investigation labels Nov 21, 2018
@gandf
Copy link

gandf commented Nov 21, 2018

Each theme applied stay 3 process WmiPrvSE.exe running on Windows.
Run eDEX-UI and close it stay 3 WmiPrvSE.exe.
Bug is present even if you don't change theme.

@GitSquared
Copy link
Owner

Hold up, could that be a windows specific issue?

@gandf
Copy link

gandf commented Nov 21, 2018

After others tests, several exe stay in live after change theme on Windows. I don't have tested on other OS. List on windows :

  • conhost.exe
  • cmd.exe
  • NETSTAT.exe
  • WMIC.exe or sometime replaced by WmiPrvSE.exe
    Change theme or close eDEX-UI don't release these processes if RAM is full.
    otherwise, it takes time but after close app release these processes.

@GitSquared
Copy link
Owner

Damned, that looks bad. Processes are related to systeminformation dependency i believe, but they should close.

Handling of node.js child processes on windows is a fucking unbearable mess and that's an understatement. Thanks for the detailed info, @gandf . I'll see what i can do.

@gandf
Copy link

gandf commented Nov 21, 2018

This code create processes.
initMods();

This code should destroy processes but it doesn't do it before close app.
delete window.mods;

@GitSquared
Copy link
Owner

Yeah doing a namespace cleanup before shutting down is not a bad idea. Will implement this ASAP and see if it helps things.

@gandf
Copy link

gandf commented Nov 21, 2018

I think, solution 2 can works with taskkill :
stackoverflow

@GitSquared
Copy link
Owner

@dvdmuckle Could you please confirm on which OS you first had the issue?

@dvdmuckle
Copy link
Author

@GitSquared Fedora 28.

@GitSquared
Copy link
Owner

(self-note: fix by implementing a themeOverride var in the core thread with the renderer's theme loader asking for it at startup, and effectively replacing the current messy recreation of modules by a full page reload)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Confirmed bugs.
Projects
None yet
Development

No branches or pull requests

3 participants