-
Notifications
You must be signed in to change notification settings - Fork 957
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
documentation confusion for Draco javascript decoder build #793
Comments
The above means the parent directory of the
The Draco CMake build won't generate any javascript without an installed and activated Emscripten SDK. If you have not already, follow the Emscripten installation documentation. Note that if you have multiple python versions installed on your system that Emscripten builds can fail in weird and interesting ways due to picking up multiple python versions during builds. In this situation it's best to be explicit when running CMake, so add this argument when configuring Draco: Edit to add more about the ASSERTIONS setting:
I don't think the above will do any good even if you configure everything correctly. If you really want an assertions enabled Emscripten build of Draco your CMake configuration command needs to look something like the following:
Note the omission of the space between the |
Thanks for all the information! I'm not gonna be able to try it this weekend, but on Monday should be good ! I'm quite confident about this though ! |
I'm so sorry, I can't seem to make it work... So far I have 3 folders /parentFolder/emscripten/ I'm on WSL, I start with (from parentFolder/emsdk/) :
then I run the following commands (from parentFolder/draco/build_dir/):
I get this output :
But the build_dir/ doesn't contain any js files (following is the content of the build_dir/) :
The previous files are, I guess , the files from the classic build :
Maybe there is something obvious that I'm missing... |
I think you need to clean your build directory. It appears that CMake is ignoring the toolchain argument and updating the existing configuration when you run it-- delete the contents of build_dir and start with the cmake command you included above. |
Sweet ! It worked! So now, when loading my 50Million points scan I have this (which I believe is triggering the error): I was looking into this thread: Seems like emscripten can handle a maximum of 4GB. I'm trying to figure out how to run this : |
ALLOW_MEMORY_GROWTH is already set for the Draco build. If you watch the CMake output you'll see the Draco build testing it in the combined flag check. I think this model may simply be too large, but you can try increasing the max memory. It's the same procedure as the assertions. Here's an example with both enabled.
|
So, first of all, thanks for the help and for being so quick to respond !
Yes, the model is definitely too large to be handled by the decoder with just 2GB of max memory So I tried the command you paste (with the build_dir fully cleaned before), it create files (so I guess it worked kinda ?)
Tried with another huge model :
So it feels like it didn't take the 4GB max memory ? Or maybe there is something that I'm missing ? Edit : just to make sure I had the right new file, I rebuilt it without the assertion and I had indeed the right file. |
I suspect that the browser running your javascript simply will not allow such a large allocation. |
Mhhh, I'm running chrome on windows, Version 97.0.4692.71 (Official Build) (64-bit) Even weirder: Could that be it though? : chromium bug I'm so sorry to bother you with this... |
The referenced bug and the bugs it links to make some pretty clear statements that a tab won't be allowed to allocate over 4GB of memory. The size of the javascript heap is irrelevant if the process/tab hosting it caps out at 4 GB. You might be able to allocate somewhere between 2GB and 4GB, but allocating 4 GB on the JS heap certainly won't be possible if the host environment is limited to 4 GB total. The browser needs at least some memory to manage the tab itself along with whatever else is contained within it. |
Closing this-- it's pretty clear the documentation is correct, and we're now going down the path of debugging your environment. If there's an issue here it's the browser limiting the total memory allowed to be allocated by javascript, but everything seems to be working-as-intended on the browser side as well. The file you're attempting to load is simply too large for the javascript decoder to handle due to runtime environment limitations. |
That's fair! Thanks a lot for the help! |
Hi,
I've been trying to load 50+ millions points (200MB+) point cloud with DracoLoader for threejs,
But it gives me an error on loading:
Aborted(). Build with -s ASSERTIONS=1 for more info.
So I tried to build the decoder,
Cloning the emscripten repo,
But in your documentation, you have this step:
export EMSCRIPTEN=../../emscripten/tools/parent
The problem being I do not have this folder on the emscripten repo (I tried multiple version of it but I couldn't find that folder)
And when I run
make -s ASSERTIONS=1
, I can't see any .js files in the build_dir repo.So maybe I'm doing something wrong.
Forgive me if that's not the right place to ask.
edit: added some more info
The text was updated successfully, but these errors were encountered: