-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Maps] GeoJSON Upload failing with Uncaught RangeError: Maximum call stack size exceeded #39317
Comments
Pinging @elastic/kibana-gis |
The |
Looks like that is not the case and the issues are separate. I commented out the angular $scope.indexPatterns declaration and the problem still occurs so looks like this is related to geojson upload and not angular. |
This issue isn't specific to the GeoJSON Upload feature, it's related generally to the Maps app handling of geojson. If you attempt to load the same layer as a Custom Vector Source layer, the same issue persists. This should narrow it down to the current Maps GeoJSON handling |
@aaronjcaldwell wrt #39317 (comment) that's not quite the case when it comes to the error outlined here #39317 (comment) they're likely two separte issues altogether then |
I'm not really seeing any issues with loading this file as a custom vector source, e.g.:
seems to load just fine. It's only around 90000 points, which is on the low end, and the file is not particularly large either. |
I spent the day debugging this with @thomasneirynck. Thomas could not recreate the issue consistently while I could. I tested with Chrome Version 75.0.3770.100 and Firefox Version 67.0.4 on Mac OS Mojave Version 10.14.5. For debugging, I self-hosted the file per these instructions. Then I added I decided to stress test the Maps app by generating a million point feature class and loading it into the map (see this patch). Aside from taking a very long time to load 1M features, I received no error. The only success I found was by commenting out this line. However, I can not determine why that makes a difference. The EDIT: I also attempted to re-create a simplified example of how we load data into Kibana to test the dataset. The data loads without error here. However, now I realize we do modify the GeoJSON data to set the |
The error appears to throw in the web workers created by mapbox-gl. These workers are minified in the vendor library, however, we can change the imports in Kibana's code to use the unminified library. Now we can track the error to the specific line in the web worker that is failing. In my testing, the error throws on line 15937 (a |
The error appears to be caused by sending an array of already sorted ids to the quicksort function in the mapbox-gl worker code. Sorting an already sorted array is one of the worst-case scenarios for a simple quicksort algorithm which results in the call stack error on client machines without sufficient resources. |
closed by #40803 |
Kibana version:
master
Describe the bug:
Upload GeoJSON Vector File in the Maps app fails as
Uncaught RangeError: Maximum call stack size exceeded
when uploading this large points file.tanker_traffic_pnw.json.zip
This error occurs in both Firefox and Chrome.
Errors in browser console (if relevant):
Uncaught Error: Uncaught RangeError: Maximum call stack size exceeded (blob:http://localhost:5601/2840fa13-6fc7-4d85-ba8e-baa72aab16c2:1) at push../src/legacy/ui/public/notify/notify.js.window.onerror (notify.js:153)
The text was updated successfully, but these errors were encountered: