Offline Map Tools for MapboxGL Native not generating proper db file
Platform: Linux (Ubuntu 16.04) Mapbox SDK version: Mapbox GL Native for Linux
Steps to trigger behavior
- Ran 'make offline'
- mbgl-offline executable generated in build/linux-x86_64/Debug
- Ran ./mbgl-offline --north 41.4664 -- west 2.0407 --south 41.2724 --east 2.2680 --output barcelona.db
Expected behavior
- barcelona.db generated in folder
Actual behavior
- Error message: "Segmentation fault (core dumped)"
- barcelona.db generated but only 61 kb
@hafiz703 Can you run this in a debugger and share the call stack that leads to the seg fault?
Sorry for the late response

I faced the same problem with Ubuntu 18.10.
Same here on Ubuntu 18.04
I get a crash in the same thread and it occurs when calling curl::global_init(CURL_GLOBAL_ALL) in HTTPFileSource::Impl::Impl.
It appears that libcurl4-openssl-dev is incompatible with npm in Ubuntu 18.04. Perhaps this is related.
Same problem here on Ubuntu 18.10.
I managed to succeed a make offline command after installing libcurl4-gnutls-dev even though libcurl4-openssl-dev is the recommended lib.
By trying to install the libcurl4-openssl-dev package I get APT telling me that it's going to remove the following ones:
libcurl4-gnutls-dev libssl1.0-dev node-gyp nodejs-dev npm
npm and node-js included as amesgames suggested.
I managed to run the offline tool.
I first launched the make offline command by using the libcurl4-gnutls-dev package, node and npm.
At this point launching the application would trigger the aforementioned SEGFAULT.
Then I installed the libcurl4-openssl-dev letting APT remove node, npm and the GNU libcurl package.
Launched again a make offline and this time the compiler run again but only on 2 source files, without actually needing node nor npm at this stage.
At the end I managed to cd build/linux-x86_64/Release/ and launch a trial command:
./mbgl-offline --north 71.44117085172385 --west -26.015625 --south 28.07198030177986 --east 28.916015625 --minZoom 4 --maxZoom 4 --output ~/europe.db --token my_personal_token
and finally
0 / 1 resources (indeterminate); 0 bytes downloaded (- bytes/sec)
64 / 542 resources; 617580 bytes downloaded (617580 bytes/sec)
128 / 542 resources; 1772573 bytes downloaded (1772573 bytes/sec)
192 / 542 resources; 2431269 bytes downloaded (2431269 bytes/sec)
256 / 542 resources; 3364586 bytes downloaded (1682293 bytes/sec)
320 / 542 resources; 4079005 bytes downloaded (2039502 bytes/sec)
384 / 542 resources; 4991719 bytes downloaded (1663906 bytes/sec)
448 / 542 resources; 5727463 bytes downloaded (1909154 bytes/sec)
512 / 542 resources; 6666032 bytes downloaded (2222010 bytes/sec)
523 / 542 resources; 6974309 bytes downloaded (2324769 bytes/sec)
524 / 542 resources; 7016693 bytes downloaded (2338897 bytes/sec)
525 / 542 resources; 7034249 bytes downloaded (2344749 bytes/sec)
526 / 542 resources; 7083965 bytes downloaded (2361321 bytes/sec)
527 / 542 resources; 7084022 bytes downloaded (2361340 bytes/sec)
528 / 542 resources; 7085093 bytes downloaded (2361697 bytes/sec)
529 / 542 resources; 7090442 bytes downloaded (2363480 bytes/sec)
530 / 542 resources; 7161568 bytes downloaded (2387189 bytes/sec)
531 / 542 resources; 7194009 bytes downloaded (2398003 bytes/sec)
532 / 542 resources; 7194064 bytes downloaded (1798516 bytes/sec)
533 / 542 resources; 7234893 bytes downloaded (1808723 bytes/sec)
534 / 542 resources; 7295802 bytes downloaded (1823950 bytes/sec)
535 / 542 resources; 7354864 bytes downloaded (1838716 bytes/sec)
536 / 542 resources; 7374441 bytes downloaded (1843610 bytes/sec)
537 / 542 resources; 7432167 bytes downloaded (1858041 bytes/sec)
538 / 542 resources; 7486542 bytes downloaded (1871635 bytes/sec)
539 / 542 resources; 7518223 bytes downloaded (1879555 bytes/sec)
540 / 542 resources; 7612575 bytes downloaded (1903143 bytes/sec)
541 / 542 resources; 7696092 bytes downloaded (1924023 bytes/sec)
542 / 542 resources; 7771489 bytes downloaded (1942872 bytes/sec)
Finished Download
stopped
This is the result of ls -lah ~/ | grep europe:
-rw-r--r-- 1 maze maze 8,3M jun 10 15:42 europe.db
Still this was a workaround to make things work.
I managed to run the offline tool. I first launched the
make offlinecommand by using thelibcurl4-gnutls-devpackage, node and npm. At this point launching the application would trigger the aforementioned SEGFAULT. Then I installed thelibcurl4-openssl-devletting APT remove node, npm and the GNU libcurl package. Launched again amake offlineand this time the compiler run again but only on 2 source files, without actually needing node nor npm at this stage. At the end I managed tocd build/linux-x86_64/Release/and launch a trial command:./mbgl-offline --north 71.44117085172385 --west -26.015625 --south 28.07198030177986 --east 28.916015625 --minZoom 4 --maxZoom 4 --output ~/europe.db --token my_personal_tokenand finally
0 / 1 resources (indeterminate); 0 bytes downloaded (- bytes/sec) 64 / 542 resources; 617580 bytes downloaded (617580 bytes/sec) 128 / 542 resources; 1772573 bytes downloaded (1772573 bytes/sec) 192 / 542 resources; 2431269 bytes downloaded (2431269 bytes/sec) 256 / 542 resources; 3364586 bytes downloaded (1682293 bytes/sec) 320 / 542 resources; 4079005 bytes downloaded (2039502 bytes/sec) 384 / 542 resources; 4991719 bytes downloaded (1663906 bytes/sec) 448 / 542 resources; 5727463 bytes downloaded (1909154 bytes/sec) 512 / 542 resources; 6666032 bytes downloaded (2222010 bytes/sec) 523 / 542 resources; 6974309 bytes downloaded (2324769 bytes/sec) 524 / 542 resources; 7016693 bytes downloaded (2338897 bytes/sec) 525 / 542 resources; 7034249 bytes downloaded (2344749 bytes/sec) 526 / 542 resources; 7083965 bytes downloaded (2361321 bytes/sec) 527 / 542 resources; 7084022 bytes downloaded (2361340 bytes/sec) 528 / 542 resources; 7085093 bytes downloaded (2361697 bytes/sec) 529 / 542 resources; 7090442 bytes downloaded (2363480 bytes/sec) 530 / 542 resources; 7161568 bytes downloaded (2387189 bytes/sec) 531 / 542 resources; 7194009 bytes downloaded (2398003 bytes/sec) 532 / 542 resources; 7194064 bytes downloaded (1798516 bytes/sec) 533 / 542 resources; 7234893 bytes downloaded (1808723 bytes/sec) 534 / 542 resources; 7295802 bytes downloaded (1823950 bytes/sec) 535 / 542 resources; 7354864 bytes downloaded (1838716 bytes/sec) 536 / 542 resources; 7374441 bytes downloaded (1843610 bytes/sec) 537 / 542 resources; 7432167 bytes downloaded (1858041 bytes/sec) 538 / 542 resources; 7486542 bytes downloaded (1871635 bytes/sec) 539 / 542 resources; 7518223 bytes downloaded (1879555 bytes/sec) 540 / 542 resources; 7612575 bytes downloaded (1903143 bytes/sec) 541 / 542 resources; 7696092 bytes downloaded (1924023 bytes/sec) 542 / 542 resources; 7771489 bytes downloaded (1942872 bytes/sec) Finished Download stoppedThis is the result of
ls -lah ~/ | grep europe:-rw-r--r-- 1 maze maze 8,3M jun 10 15:42 europe.dbStill this was a workaround to make things work.
It worked here following the steps. Thanks
This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.