Floating point exception (core dumped)

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
obsnold
Posts: 2
Joined: 28.10.2021
With us: 3 years 1 month

Floating point exception (core dumped)

Post #1by obsnold » 28.10.2021, 07:53

Hi All,
I just tried to build Celestia and I get the following error:
Floating point exception (core dumped)

Here are my machine details:
OS: Ubuntu 20.04.3 LTS x86_64
Host: 20H5A02LHH ThinkPad E570
Kernel: 5.11.0-38-generic
CPU: Intel i7-7500U (4) @ 3.500GHz
GPU: NVIDIA GeForce GTX 950M
GPU: Intel HD Graphics 620
Memory: 5019MiB / 19922MiB

I built the QT version from commit ec232b7fad06f87b946a094456a89f340fd5bbca
I recently built on a different computer and everything was fine(may have been a different commit though).

here is the backtrace from gdb:

Code: Select all

Thread 1 "celestia-qt" received signal SIGFPE, Arithmetic exception.
0x00007ffff7df1722 in CreateTextureFromImage(Image&, Texture::AddressMode, Texture::MipMapMode) ()
   from /usr/local/lib/libcelestia.so.1.7
(gdb) bt
#0  0x00007ffff7df1722 in CreateTextureFromImage(Image&, Texture::AddressMode, Texture::MipMapMode) ()
    at /usr/local/lib/libcelestia.so.1.7
#1  0x00007ffff7df1d01 in LoadTextureFromFile(std::filesystem::__cxx11::path const&, Texture::AddressMode, Texture::MipMapMode) ()
    at /usr/local/lib/libcelestia.so.1.7
#2  0x00007ffff7d73eab in OverlayImage::OverlayImage(std::filesystem::__cxx11::path, Renderer*) () at /usr/local/lib/libcelestia.so.1.7
#3  0x00007ffff7ce64d3 in CommandScriptImage::process(ExecutionEnvironment&) () at /usr/local/lib/libcelestia.so.1.7
#4  0x00007ffff7ceaea0 in Execution::tick(double) () at /usr/local/lib/libcelestia.so.1.7
#5  0x00007ffff7c89213 in CelestiaCore::tick() () at /usr/local/lib/libcelestia.so.1.7
#6  0x0000555555584ee1 in CelestiaAppWindow::celestia_tick() ()
#7  0x00007ffff6cce300 in QMetaObject::activate(QObject*, int, int, void**) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#8  0x00007ffff6cdb51e in QTimer::timeout(QTimer::QPrivateSignal) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#9  0x00007ffff6ccecf5 in QObject::event(QEvent*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#10 0x00007ffff76baa66 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#11 0x00007ffff76c40f0 in QApplication::notify(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#12 0x00007ffff6ca293a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#13 0x00007ffff6cf98b0 in QTimerInfoList::activateTimers() () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#14 0x00007ffff6cfa19c in  () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#15 0x00007ffff592d17d in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#16 0x00007ffff592d400 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#17 0x00007ffff592d4a3 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#18 0x00007ffff6cfa5e4 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) ()
    at /lib/x86_64-linux-gnu/libQt5Core.so.5
#19 0x00007ffff6ca2aa1 in QCoreApplication::processEvents(QFlags<QEventLoop::ProcessEventsFlag>, int) ()
    at /lib/x86_64-linux-gnu/libQt5Core.so.5
#20 0x00007ffff7869488 in QSplashScreen::finish(QWidget*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#21 0x0000555555580bae in main ()

onetwothree
Site Admin
Posts: 706
Joined: 22.09.2018
With us: 6 years 2 months

Post #2by onetwothree » 28.10.2021, 09:33

Could you rebuild it with cmake option `-DCMAKE_BUILD_TYPE=RelWithDebInfo`, then run it with gdb and post output here?

Topic author
obsnold
Posts: 2
Joined: 28.10.2021
With us: 3 years 1 month

Post #3by obsnold » 29.10.2021, 01:07

Ha after building with `-DCMAKE_BUILD_TYPE=RelWithDebInfo` it runs fine.

I just did a clean build and ran cmake with the following options:

Code: Select all

cmake .. -DENABLE_DATA=ON -DENABLE_INTERFACE=ON


and it still ran fine...

I'm testing after doing 'sudo make install' so perhaps I'm not getting a clean result?

Can I run it without doing make install? or is there an easy way to purge my system of the already installed files?

onetwothree
Site Admin
Posts: 706
Joined: 22.09.2018
With us: 6 years 2 months

Post #4by onetwothree » 01.11.2021, 10:19

Hi, in ENABLE_INTERFACE you should replace INTERFACE with QT/GTK/GTLUT/SDL.
obsnold wrote:I'm testing after doing 'sudo make install' so perhaps I'm not getting a clean result?

The only problem with "make install" that it doesn't delete files removed from repository. But if you reinstall from the same commit you can consider it as clean.

obsnold wrote:Can I run it without doing make install?
It's possible, you can create symlinks pointing to directories present in CelestiaContent repository. Then set environment variable CELESTIA_DATA_DIR to path of your Celestia source directory and you can run it from your source directory as ./build/src/celestia/qt/celestia-qt.

obsnold wrote:or is there an easy way to purge my system of the already installed files?

You can remove /usr/local/share/celestia directory, /usr/local/bin/celestia-* and /usr/local/lib/libcelestia* files


Return to “Development”