Video-hub-app: Maximum call stack size exceeded

Created on 30 Aug 2020  ยท  14Comments  ยท  Source: whyboris/Video-Hub-App

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

stalled

Most helpful comment

@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 ๐Ÿ‘

All 14 comments

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 ๐Ÿค

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 ๐Ÿ˜…

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.

Thank you @ridvanaltun for checking again ๐Ÿ™‡
I will check the code and run the app to see if I can fix ๐Ÿค

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 ๐Ÿ™‡

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?

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 ๐Ÿค”

I found the error reason.

Related:

paulmillr/chokidar#841
nodejs/node#27534

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?

I take it there is an ฤฐ somewhere in your path? ๐Ÿ˜…

Unfortunately ๐Ÿ˜…

I added the stalled label while we wait for this PR to get merged and for the code to finally make it to _Electron_ ๐Ÿคž
https://github.com/nodejs/node/pull/27662

Not closing the issue until we have the fix in _Node_ ๐Ÿคž

@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 -- 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 ๐Ÿ‘

Thanks for getting back so quickly ๐Ÿค I'm glad it worked out ๐Ÿ˜

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cal2195 picture cal2195  ยท  5Comments

cal2195 picture cal2195  ยท  4Comments

cal2195 picture cal2195  ยท  4Comments

cal2195 picture cal2195  ยท  4Comments

whyboris picture whyboris  ยท  5Comments