Napkin not running on Ubuntu 18.04


I am trying to use NAP on Ubuntu 18.04.2 (LTS), and getting stuck at running Napkin, even from a demo project.

The demo project itself (e.g. helloworld) compiles and runs without any problem, but when I try to run Napkin, I get a weird error. Here is the output:

[debug] Logging to file: /home/stehen/NAP-0.2.3-Linux/demos/helloworld/bin/GNU-Debug-x86_64/log/napkin_2019-03-13_14-23-00_894.log
QSocketNotifier: Can only be used with threads started with QThread
[fine] Loading theme: /home/stehen/NAP-0.2.3-Linux/demos/helloworld/bin/GNU-Debug-x86_64/resources/themes/gray/theme.json
[fine] Loading theme: /home/stehen/NAP-0.2.3-Linux/demos/helloworld/bin/GNU-Debug-x86_64/resources/themes/napkin/theme.json
[fine] Loading theme: /home/stehen/NAP-0.2.3-Linux/demos/helloworld/bin/GNU-Debug-x86_64/resources/themes/native/theme.json
terminate called after throwing an instance of 'std::length_error'
  what():  basic_string::_M_create

This happens with a freshly-downloaded copy of NAP 0.2.3.


pinging @bas, he uses ubuntu to develop napkin. any idea Bas?


I’m currently not near my Ubuntu machine, will check this tonight (PST), but could you tell me which compiler you’re using?


If you mean version of GCC, here is output of gcc -v:

Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 7.3.0-27ubuntu1~18.04' --with-bugurl=file:///usr/share/doc/gcc-7/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++ --prefix=/usr --with-gcc-major-version-only --program-suffix=-7 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 7.3.0 (Ubuntu 7.3.0-27ubuntu1~18.04)


And, if it helps: cmake --version output:

cmake version 3.10.2

CMake suite maintained and supported by Kitware (

And make --version output:

GNU Make 4.1
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.


Thanks, afaik we’ve been using Clang to develop the linux version of NAP, but GCC should work too. I’ll test this and will have more information (and hopefully a fix) for you tomorrow.


Sorry for the delay. So far I haven’t been able to reproduce this on two versions of Ubuntu: 17.10 and 18.04 (latest version as of today).

I wonder if you’d be able to debug and get some more info as to where this exception is coming from.

Also, did you have any custom modules built? It seems to crash right when the modules are being loaded in the editor.

If you can spare the time, can you describe the steps to repro this case, that would be helpful as well.

Thanks for your time looking into this with us


Very curious. And I did manage to run Napkin just fine on this same machine not long ago. Some kind of configuration must have changed. Something to do with QT?

I’m not sure how to debug it, since the failure happens at runtime not while compiling. Any suggestions?


Hi @bas I’m not sure if you have any more thoughts about how to debug this issue, but for now I’m just reinstalling Ubuntu from scratch as I’m not sure what else to do to get going. I’ll let you know if this solves the problem.


@bas - just to confirm: I have now done a completely new installation of Ubuntu 18.04, from scratch, and downloaded NAP again and same problem! :confounded:

So everything compiles just fine, the app can run, but Napkin always fails to run.


I myself did a full reinstall of the same version of Ubuntu 18.04 and have been running GCC and Clang versions, but alas, no repro on my side…
So unless I have some kind of information as to where the exception is being thrown we’re going to have to poke at it.

I’m sending you a debug binary, can you try running this through a debugger and tell me what you can find?


This causes issues here on 18.10 too; try changing into that directory first and running Napkin there (ie. ./napkin).

Something needs fixing there.


@chris You nailed it!

That’s exactly it. I was trying it on completely different PC, and getting the same error. But changing into the directory first and running it solves the problem! Now working every time.

Godverdomme. :laughing:

Might be worth checking whether there is something in Napkin that assumes a current working directory path or whatever?

Thanks for all the help @bas and co!


Nice find Chris!

I’ll see if I can allow running napkin from another cwd, but I’m glad it was a simple fix :slight_smile:


I pushed a fix: 38fdb20ceef9024f81f8dab8db66b0bb73466293 / master
38fdb20c Bas on 3/21/19 at 12:42 AM PST

From that version on you can run it from wherever you want :slight_smile: