Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Maximum call stack size exceeded #533

Closed
ridvanaltun opened this issue Aug 29, 2020 · 14 comments
Closed

Maximum call stack size exceeded #533

ridvanaltun opened this issue Aug 29, 2020 · 14 comments
Labels
stalled Things that need further thought, or are blocked!

Comments

@ridvanaltun
Copy link
Contributor

Hello,

I am trying to create a hub with 2.500 videos. When i click create button, below error occours after every 5 minutes.

I am using VHA version 3.0.0.

Screenshot_2

@whyboris
Copy link
Owner

Thank you for the report! I'll see if I can replicate and figure out what's happening.

Best guess is something is going wrong with chokidar -- but it would be weird for it to choke 😉 on such a small collection 😅

If you have other clues do share 🤝

@whyboris
Copy link
Owner

Hey @ridvanaltun -- I've fixed up some things with the extraction process (fewer stat calls for example) …

If you have the time, could you please re-try this procedure again with the same settings that caused the problem before -- to see if the problem persists?

I'm hoping to release 3.0.0 with as few bugs as possible. At the moment I'm unable to replicate the problem 😅

@ridvanaltun
Copy link
Contributor Author

I built the app from master branch.

Unfortunately the error keeps coming up. The first error took 5 minutes to arrive, and then 10 minutes later the second error came.

Screenshot 2020-10-12 110453

I just say an estimate, but I think there might be an error with the heavy CPU usage of my computer because when I start to create a hub, the computer's fan noise and fan usage increase.

Screenshot 2020-10-12 112530

As you see, the CPU is being used completely. The computer may be using CPU instead of GPU to create clips.

@whyboris
Copy link
Owner

Thank you @ridvanaltun for checking again 🙇
I will check the code and run the app to see if I can fix 🤝

@whyboris
Copy link
Owner

I tried today and couldn't replicate on my end. I wonder what on your end is different 🤔

In my case, all I have is a folder with many videos (and virtually no other files besides that). Could you, if not too private, share a bit about what you have?

  • the source / input folder that you choose -- if you right-click (in Windows) and click Properties -- how many files does it say it has?
  • do you run the app via npm start? If so, you'll have a log in your terminal of what happens. Is there anything there that seems like an error message?

I decided to log how long it takes for chokidar to run through my directory of videos - and it took mere seconds 🚀 ... it's unclear why chokidar would be running after even 1 minute of extraction (as your error shows).

Is it possible that you have a symlink in your folder that points to a parent folder? That is a circular refence? Maybe chokidar is stuck re-scanning the same path non-stop?

Thank you for any information that you could share that you think is relevant 🙇

@ridvanaltun
Copy link
Contributor Author

I would like to help,

There is 7949 files, 646 folders and 254 GB data. I keep all this data in a HDD.

I count files with powershell using below command:

Get-ChildItem -Recurse | Group-Object Extension -NoElement

Output:

 Count Name
----- ----
 2106 .mp4
    7 .pdf
 5253 .jpg
  147 .png
  154 .jpeg
    5 .zip
   61 .ts
   60 .txt
    2 .docx
   15 .url
    3 .html
    1 .gif
   15 .nfo
    9 .exe

I am sure there is no symlink in my folders.

The errors occurs in preventing sleep stage after i think 25-30 seconds with no any console log.

When I click ok in error dialog the CPU usage changes like below:

Screenshot 2020-10-13 070934

By the way the VHA holds progress percent %14 for 10 minutes. After 10 minutes the VHA increase the percent very slowly (like 3 minutes for %1). Is it normal?

@whyboris
Copy link
Owner

whyboris commented Oct 13, 2020

Thank you for additional details.

VHA progress is coded a bit weird at the moment -- it tries to estimate time remaining by multiplying the number of items remaining-to-extract by the average time it takes to extract (based on files already extracted this run). But the total keeps increasing because there are more files being added to the queue.

I'm planning on reworking the computation so that it always knows the total number of files to be extracted.

The preventing sleep message is just a reminder that I have turned on the powerSaveBlocker so that users can run their app overnight if they want to. That specific event should run just as the first video gets added to the app gallery 👌

VHA should just ignore all other non-video files (explicitly within chokidar file-found event), so I'm still unsure what is causing the error.

Have you tried running the app against a folder with just a few video files (and no other files inside) just to check? I suspect that will work without a problem.

Just to confirm: in your original description of an error after 5 minutes -- by then -- the app was already showing videos and some screenshots, right?

So the overall picture is the app seems to work for a bit, but then seems to be stuck doing nothing, and finally gives an error (OS popup), and clicking the error makes the error go away, the app continues to be stuck, and then another error appears?

It's so bizzarre -- the chokidar (that is throwing the error it seems) should only run for under 10 seconds -- by which it should have scanned through all the files on the hard drive and shut itself down.

ps -- just to be clear -- this is happening when creating a new hub, not trying to re-scan an older one, right?

pps -- it shouldn't matter, but .ts files are interpreted as video files; though they should just show up as blank rectangles without breaking the app 🤔

@ridvanaltun
Copy link
Contributor Author

ridvanaltun commented Oct 13, 2020

I found the error reason.

Related:

paulmillr/chokidar#841
nodejs/node#27534

@whyboris
Copy link
Owner

I take it there is an İ somewhere in your path? 😅

So it seems the problem isn't due to chokidar but due to node 😓

Weird that the result isn't that chokidar ignores a path and everything works otherwise, but instead some crash 😢

I suspect this isn't up to my app to fix 😕 -- but I don't know how best to address this issue. Any thoughts?

@ridvanaltun
Copy link
Contributor Author

I take it there is an İ somewhere in your path? 😅

Unfortunately 😅

@whyboris whyboris added the stalled Things that need further thought, or are blocked! label Oct 22, 2020
@whyboris
Copy link
Owner

I added the stalled label while we wait for this PR to get merged and for the code to finally make it to Electron 🤞
nodejs/node#27662

Not closing the issue until we have the fix in Node 🤞

@whyboris
Copy link
Owner

@ridvanaltun -- I think I fixed the problem with #602 -- which is in now in the main branch 🎉

Please try out the latest main and see if your problem persists. I am 99% confident your problem has been solved 😁

Please update us so I can close this issue 🤝

@ridvanaltun
Copy link
Contributor Author

@ridvanaltun -- I think I fixed the problem with #602 -- which is in now in the main branch 🎉

Please try out the latest main and see if your problem persists. I am 99% confident your problem has been solved 😁

Please update us so I can close this issue 🤝

Yes, problem solved, thanks 👍

@whyboris
Copy link
Owner

Thanks for getting back so quickly 🤝 I'm glad it worked out 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stalled Things that need further thought, or are blocked!
Projects
None yet
Development

No branches or pull requests

2 participants