Description of problem: Launch Celestia, we can see the splashscreen and after some seconds… crash Version-Release number of selected component: celestia-1.6.1-14.fc20 Additional info: reporter: libreport-2.1.10 backtrace_rating: 4 cmdline: celestia crash_function: luaD_throw executable: /usr/bin/celestia kernel: 3.12.5-301.fc20.x86_64 runlevel: N 5 type: CCpp uid: 1000 Truncated backtrace: Thread no. 1 (10 frames) #2 luaD_throw at ldo.c:119 #3 luaG_errormsg at ldebug.c:569 #4 luaG_runerror at ldebug.c:578 #5 luaG_typeerror at ldebug.c:515 #6 luaV_settable at lvm.c:163 #7 lua_setfield at lapi.c:764 #8 LuaState::allowLuaPackageAccess at celx.cpp:4122 #9 LuaState::init at celx.cpp:3540 #10 CelestiaCore::initLuaHook at celestiacore.cpp:5013 #11 CelestiaCore::initSimulation at celestiacore.cpp:4153
Created attachment 839820 [details] File: backtrace
Created attachment 839821 [details] File: cgroup
Created attachment 839822 [details] File: core_backtrace
Created attachment 839823 [details] File: dso_list
Created attachment 839824 [details] File: environ
Created attachment 839825 [details] File: limits
Created attachment 839826 [details] File: maps
Created attachment 839827 [details] File: open_fds
Created attachment 839828 [details] File: proc_pid_status
Created attachment 839829 [details] File: var_log_messages
*** Bug 1047403 has been marked as a duplicate of this bug. ***
Another user experienced a similar problem: When you start the application falls reporter: libreport-2.1.10 backtrace_rating: 4 cmdline: celestia crash_function: luaD_throw executable: /usr/bin/celestia kernel: 3.12.5-302.fc20.x86_64 package: celestia-1.6.1-14.fc20 reason: celestia killed by SIGABRT runlevel: N 5 type: CCpp uid: 1000
It seems that there is a problem porting Celestia from Lua 5.1 to Lua 5.2: http://216.231.48.101/forum/viewtopic.php?f=4&t=17371
OK, I'm a complete Lua n00b, but I've dived into the code and have discovered that Celestia is breaking in two places: In celestia-1.6.1/src/celestia/celx.cpp: void LuaState::allowLuaPackageAccess() and: void LuaState::setLuaPath(const string& s) However, it appears to be breaking for the same reason: #if LUA_VER >= 0x050100 lua_getglobal(state, "package"); lua_pushstring(state, s.c_str()); lua_setfield(state, -2, "path"); lua_pop(state, 1); #else As I understand it, this code is trying to do the following: "package"["path"] = s Unfortunately, whatever "package" is supposed to be, Lua is pushing "null" onto the stack instead. I have hacked this code thus: lua_getglobal(state, "package"); if (lua_istable(state, -1)) { lua_pushstring(state, s.c_str()); lua_setfield(state, -2, "path"); } lua_pop(state, 1); and similarly for allowLuaPackageAccess(). This allows Celestia to start up, but doesn't qualify as a "fix" because it misses the point of what "package" is supposed to be.
I think the problem is that openLuaLibrary() in celx.cpp is implemented incorrectly for Lua 5.2. The key is to use the luaL_requiref() function, which can be instructed to load the missing global table: #if LUA_VER >= 0x050100 // Load a Lua library--in Lua 5.1, the luaopen_* functions cannot be called // directly. They most be invoked through the Lua state. static void openLuaLibrary(lua_State* l, const char* name, lua_CFunction func) { #if LUA_VER >= 0x050200 luaL_requiref(l, name, func, 1); #else lua_pushcfunction(l, func); lua_pushstring(l, name); lua_call(l, 1, 0); #endif } #endif
Created attachment 861181 [details] Reimplement openLuaLibrary for Lua 5.2.
Of course, now that I can actually run Celestia, I am able to notice that Fedora's "cleaning pixies" have been at it again. In fact, they've done such a good job that Jupiter is now white!
Another user experienced a similar problem: Started the app from the menu MATE desktop reporter: libreport-2.2.1 backtrace_rating: 4 cmdline: celestia crash_function: luaD_throw executable: /usr/bin/celestia kernel: 3.13.9-200.fc20.i686+PAE package: celestia-1.6.1-14.fc20 reason: celestia killed by SIGABRT runlevel: N 5 type: CCpp uid: 1000
(In reply to denis.belanger50 from comment #18) > Another user experienced a similar problem: > > Started the app from the menu MATE desktop You can fix this yourself by rebuilding the RPM with the patch I attached to this bug back in February. (For bonus points, you can replace the source tarball with the "pristine" source from SourceForge as well). Basically: the fix is known, but I don't recommend waiting for Fedora to pick it up.
I confirm Chris' patch and "bonus" replacement from original source allowed me to recompile the rpm (fc20 X86_64). Now celestia starts correctly and displays reasonable pictures of planets like Jupiter. Chris patch celestia-lua-52-fix.patch has to be put in the /root/rpmbuild/SOURCES directory as well as the original celestia-1.6.1.tar.gz from sourceforge. Then the file /root/rpmbuild/SPECS/celestia.spec has to be modified (see lines begining with Source0, Patch4 and patch4): ------------------------------------------------------------------------------------------------ ... License: GPLv2+ Source0: http://downloads.sourceforge.net/celestia/celestia-%%{version}.tar.gz Source3: celestia.desktop URL: http://www.shatters.net/celestia/ Patch0: celestia-1.6.1-gcc47.patch Patch1: celestia-1.6.1-zlib.patch Patch2: celestia-1.6.1-lua-5.2.patch Patch3: celestia-1.6.1-gcc48.patch Patch4: celestia-lua-52-fix.patch BuildRequires: zlib-devel ... ... %prep %setup -q %patch0 -p1 -b .gcc47 %patch1 -p1 -b .zlib %patch2 -p1 -b .lua-52 %patch3 -p1 %patch4 -p1 # Make sure we compile with the right CFLAGS/CXXFLAGS (from Hans de Goede). ... ---------------------------------------------------------------------------------------- Then recompile with # rpmbuild -bb /root/rpmbuild/SPECS/celestia.spec If needed yum install the packages necessary for compiling. Delete the old celestia if already installed: # rpm -e celestia Install the new celestia: # rpm -Uvh /root/rpmbuild/RPMS/x86_64/celestia-1.6.1-14.fc20.x86_64.rpm
Another user experienced a similar problem: used command 'sudo yum install celestia' to install celestia opened menu, selected celestia, error popped up and celestia did not open reporter: libreport-2.2.2 backtrace_rating: 4 cmdline: celestia crash_function: luaD_throw executable: /usr/bin/celestia kernel: 3.14.9-200.fc20.x86_64 package: celestia-1.6.1-14.fc20 reason: celestia killed by SIGABRT runlevel: N 5 type: CCpp uid: 1000
celestia-1.6.1-15.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/celestia-1.6.1-15.fc20
*** Bug 1063063 has been marked as a duplicate of this bug. ***
celestia-1.6.1-15.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.
Many images from the original sources are still removed, which is a bug IMHO because NASA data is public domain (see the exact terms at http://www.jpl.nasa.gov/imagepolicy/). The removed images are very important for anybody interested in using this program. To restore them (for fedora 20 x86_64) I had to fetch the source code (https://kojipkgs.fedoraproject.org//packages/celestia/1.6.1/15.fc20/src/celestia-1.6.1-15.fc20.src.rpm) and install it as root: # rpm -ivh celestia-1.6.1-15.fc20.src.rpm The new source link in /root/rpmbuild/SPECS/celestia.spec has been updated: Source0: http://sourceforge.net/projects/celestia/files/Celestia-source/%%{version}/celestia-%%{version}.tar.gz and as root cd /rooot/rpmbuild/SOURCES wget http://sourceforge.net/projects/celestia/files/Celestia-source/1.6.1/celestia-1.6.1.tar.gz rpmbuild -bb /root/rpmbuild/SPECS/celestia.spec Then I installed the complete celestia with rpm -ivh /root/rpmbuild/RPMS/x86_64/celestia-1.6.1-15.fc20.x86_64.rpm
celestia 1.6.1 15 fc20 now dies with SIGTRAP.
(In reply to Ken Sinner from comment #26) > celestia 1.6.1 15 fc20 now dies with SIGTRAP. Please open a new bug for your issue. The issue described by bug #1045632 has been fixed.