Seems like I really had one bug in file layout, but it didn't fix the problem. I had goblin-camplib/gcamp_core/mod.dat instead of goblin-camp/lib/gcamp_core/mod.dat, I think it's another "\" instead "/", I just moved the file.
Now the layout is:
- Code: Select all
$ ls -AlR dist/debug-x86/
dist/debug-x86/:
total 8
drwxr-xr-x 2 ilya ilya 4096 Nov 5 23:04 bin
drwxr-xr-x 3 ilya ilya 4096 Nov 6 01:00 share
dist/debug-x86/bin:
total 38284
-rwxr-xr-x 1 ilya ilya 39201914 Nov 5 23:04 goblin-camp
dist/debug-x86/share:
total 4
drwxr-xr-x 3 ilya ilya 4096 Nov 5 22:38 goblin-camp
dist/debug-x86/share/goblin-camp:
total 56
-rw-r--r-- 1 ilya ilya 35819 Nov 5 22:36 COPYING.txt
-rw-r--r-- 1 ilya ilya 1695 Nov 5 22:36 LIBTCOD-LICENSE.txt
-rw-r--r-- 1 ilya ilya 7482 Nov 5 22:36 Readme.txt
drwxr-xr-x 4 ilya ilya 4096 Nov 5 22:38 lib
-rw-r--r-- 1 ilya ilya 3150 Nov 5 22:36 terminal.png
dist/debug-x86/share/goblin-camp/lib:
total 272
drwxr-xr-x 2 ilya ilya 4096 Nov 5 22:38 gcamp
drwxr-xr-x 2 ilya ilya 4096 Nov 6 01:00 gcamp_core
-rw-r--r-- 1 ilya ilya 267956 Nov 5 22:38 stdlib.zip
dist/debug-x86/share/goblin-camp/lib/gcamp:
total 20
-rw-r--r-- 1 ilya ilya 863 Nov 5 22:38 __init__.py
-rw-r--r-- 1 ilya ilya 1245 Nov 5 22:38 config.py
-rw-r--r-- 1 ilya ilya 1073 Nov 5 22:38 events.py
-rw-r--r-- 1 ilya ilya 1353 Nov 5 22:38 log.py
-rw-r--r-- 1 ilya ilya 1015 Nov 5 22:38 utils.py
dist/debug-x86/share/goblin-camp/lib/gcamp_core:
total 52
-rw-r--r-- 1 ilya ilya 951 Nov 5 22:38 __init__.py
-rw-r--r-- 1 ilya ilya 5496 Nov 5 22:38 constructions.dat
-rw-r--r-- 1 ilya ilya 9052 Nov 5 22:38 creatures.dat
-rw-r--r-- 1 ilya ilya 12538 Nov 5 22:38 items.dat
-rw-r--r-- 1 ilya ilya 207 Nov 5 23:04 mod.dat
-rw-r--r-- 1 ilya ilya 714 Nov 5 22:38 names.dat
-rw-r--r-- 1 ilya ilya 2183 Nov 5 22:38 wildplants.dat
I had to add explicit flush to logger to make meaningful logfile (it used to be almost empty):
#define LOG_FUNC(x, func) (Logger::Prefix(__FILE__, __LINE__, func) << x << Logger::Suffix()).flush()
Logfile:
- Code: Select all
C++ (`Logger.cpp` @ 49), `OpenLogFile`:
Log opened 2010-Nov-06 01:54:28
================================
C++ (`Paths.cpp` @ 162), `Init`:
Personal directory: "/home/ilya/.goblincamp"
================================
C++ (`Paths.cpp` @ 163), `Init`:
Saves directory: "/home/ilya/.goblincamp/saves"
================================
C++ (`Paths.cpp` @ 164), `Init`:
Screenshots directory: "/home/ilya/.goblincamp/screenshots"
================================
C++ (`Paths.cpp` @ 165), `Init`:
Mods directory: "/home/ilya/.goblincamp/mods"
================================
C++ (`Paths.cpp` @ 166), `Init`:
Executable directory: "/home/ilya/Programming/Testing/GoblinCamp/goblin-camp-pl/goblin-camp-pl/build/dist/debug-x86/bin"
================================
C++ (`Paths.cpp` @ 167), `Init`:
Global data directory: "/home/ilya/Programming/Testing/GoblinCamp/goblin-camp-pl/goblin-camp-pl/build/dist/debug-x86/share/goblin-camp/"
================================
C++ (`Paths.cpp` @ 168), `Init`:
Executable: "/home/ilya/Programming/Testing/GoblinCamp/goblin-camp-pl/goblin-camp-pl/build/dist/debug-x86/bin/goblin-camp"
================================
C++ (`Paths.cpp` @ 169), `Init`:
Config: "/home/ilya/.goblincamp/config.py"
================================
C++ (`Paths.cpp` @ 170), `Init`:
Font: "/home/ilya/.goblincamp/terminal.png"
================================
C++ (`Engine.cpp` @ 47), `Init`:
Initialising engine.
================================
C++ (`Engine.cpp` @ 53), `Init`:
Python 2.6.5 (release26-maint, Aug 11 2010, 21:56:25)
[GCC 4.4.3]
================================
C++ (`Engine.cpp` @ 77), `Init`:
sys.path = ['/home/ilya/Programming/Testing/GoblinCamp/goblin-camp-pl/goblin-camp-pl/build/dist/debug-x86/share/goblin-camp/lib', '/home/ilya/Programming/Testing/GoblinCamp/goblin-camp-pl/goblin-camp-pl/build/dist/debug-x86/share/goblin-camp/lib/stdlib.zip']
================================
C++ (`Engine.cpp` @ 85), `Init`:
Importing utils.
================================
From gdb I see that there is indeed some exception that arises from import("traceback"). Here is some output of 'stepi'-ing through it, but I don't think it will tell much.
- Code: Select all
0x00007ffff7a791b8 in PyList_GetItem@plt () from /usr/lib/libpython2.6.so.1.0
(gdb)
0x00007ffff7ab16e0 in PyList_GetItem () from /usr/lib/libpython2.6.so.1.0
(gdb)
0x00007ffff7ab16e4 in PyList_GetItem () from /usr/lib/libpython2.6.so.1.0
(gdb)
0x00007ffff7ab16e8 in PyList_GetItem () from /usr/lib/libpython2.6.so.1.0
(gdb) finish
Run till exit from #0 0x00007ffff7ab16e8 in PyList_GetItem () from /usr/lib/libpython2.6.so.1.0
0x00007ffff7b26839 in ?? () from /usr/lib/libpython2.6.so.1.0
(gdb) stepi
0x00007ffff7b2683c in ?? () from /usr/lib/libpython2.6.so.1.0
(gdb)
0x00007ffff7b26842 in ?? () from /usr/lib/libpython2.6.so.1.0
(gdb)
0x00007ffff7b26844 in ?? () from /usr/lib/libpython2.6.so.1.0
(gdb)
0x00007ffff7b26847 in ?? () from /usr/lib/libpython2.6.so.1.0
(gdb)
0x00007ffff7b2684a in ?? () from /usr/lib/libpython2.6.so.1.0
(gdb)
0x00007ffff7b2684c in ?? () from /usr/lib/libpython2.6.so.1.0
(gdb)
0x00007ffff7a79aa8 in PyObject_CallFunctionObjArgs@plt () from /usr/lib/libpython2.6.so.1.0
(gdb)
0x00007ffff7a84300 in PyObject_CallFunctionObjArgs () from /usr/lib/libpython2.6.so.1.0
(gdb) finish
Run till exit from #0 0x00007ffff7a84300 in PyObject_CallFunctionObjArgs () from /usr/lib/libpython2.6.so.1.0
0x00007ffff7b26851 in ?? () from /usr/lib/libpython2.6.so.1.0
(gdb) stepi
0x00007ffff7b26854 in ?? () from /usr/lib/libpython2.6.so.1.0
(gdb)
0x00007ffff7b26857 in ?? () from /usr/lib/libpython2.6.so.1.0
(gdb)
0x00007ffff7b26808 in ?? () from /usr/lib/libpython2.6.so.1.0
(gdb)
0x00007ffff7b2680f in ?? () from /usr/lib/libpython2.6.so.1.0
(gdb)
0x00007ffff7b26812 in ?? () from /usr/lib/libpython2.6.so.1.0
(gdb)
0x00007ffff7a7a3c8 in PyErr_ExceptionMatches@plt () from /usr/lib/libpython2.6.so.1.0
(gdb)
0x00007ffff7b221c0 in PyErr_ExceptionMatches () from /usr/lib/libpython2.6.so.1.0
(gdb)
0x00007ffff7b221c1 in PyErr_ExceptionMatches () from /usr/lib/libpython2.6.so.1.0
(gdb)
0x00007ffff7b221c4 in PyErr_ExceptionMatches () from /usr/lib/libpython2.6.so.1.0
(gdb)
0x00007ffff7a7a3e8 in PyErr_Occurred@plt () from /usr/lib/libpython2.6.so.1.0
(gdb)
0x00007ffff7b21150 in PyErr_Occurred () from /usr/lib/libpython2.6.so.1.0
(gdb)
0x00007ffff7b21157 in PyErr_Occurred () from /usr/lib/libpython2.6.so.1.0
(gdb)
0x00007ffff7b2115a in PyErr_Occurred () from /usr/lib/libpython2.6.so.1.0
(gdb)
0x00007ffff7b2115e in PyErr_Occurred () from /usr/lib/libpython2.6.so.1.0
(gdb)
0x00007ffff7b221c9 in PyErr_ExceptionMatches () from /usr/lib/libpython2.6.so.1.0
(gdb)
0x00007ffff7b221cc in PyErr_ExceptionMatches () from /usr/lib/libpython2.6.so.1.0
(gdb)
0x00007ffff7b221cf in PyErr_ExceptionMatches () from /usr/lib/libpython2.6.so.1.0
(gdb) c
Continuing.
terminate called after throwing an instance of 'boost::python::error_already_set'
Program received signal SIGABRT, Aborted.
0x00007ffff5e1f1b5 in raise () from /lib/libc.so.6
(gdb) c
Continuing.
[Thread 0x7ffff32ee710 (LWP 10830) exited]
Callstack from gdb (put breakpoint at address, not sure if the exception really was at first time I got there):
- Code: Select all
Breakpoint 2, 0x00007ffff7a79aa8 in PyObject_CallFunctionObjArgs@plt () from /usr/lib/libpython2.6.so.1.0
(gdb) bt
#0 0x00007ffff7a79aa8 in PyObject_CallFunctionObjArgs@plt () from /usr/lib/libpython2.6.so.1.0
#1 0x00007ffff7b26851 in ?? () from /usr/lib/libpython2.6.so.1.0
#2 0x00007ffff7b26c62 in ?? () from /usr/lib/libpython2.6.so.1.0
#3 0x00007ffff7b29654 in ?? () from /usr/lib/libpython2.6.so.1.0
#4 0x00007ffff7b297b3 in ?? () from /usr/lib/libpython2.6.so.1.0
#5 0x00007ffff7b29df8 in ?? () from /usr/lib/libpython2.6.so.1.0
#6 0x00007ffff7b2ab65 in PyImport_ImportModuleLevel () from /usr/lib/libpython2.6.so.1.0
#7 0x00007ffff7b1091f in ?? () from /usr/lib/libpython2.6.so.1.0
#8 0x00007ffff7a840f2 in PyObject_Call () from /usr/lib/libpython2.6.so.1.0
#9 0x00007ffff7a841e1 in ?? () from /usr/lib/libpython2.6.so.1.0
#10 0x00007ffff7a84de2 in PyObject_CallFunction () from /usr/lib/libpython2.6.so.1.0
#11 0x00007ffff7b2ac9c in PyImport_Import () from /usr/lib/libpython2.6.so.1.0
#12 0x00007ffff7b2ae5c in PyImport_ImportModule () from /usr/lib/libpython2.6.so.1.0
#13 0x00007ffff7609374 in boost::python::import(boost::python::str) ()
from /home/ilya/Programming/Testing/Boost/boost_1_44_0/Distribution/lib/libboost_python.so.1.44.0
#14 0x00000000005ccb86 in Script::Init (args=...)
at /home/ilya/Programming/Testing/GoblinCamp/goblin-camp-pl/goblin-camp-pl/Goblin Camp/src/scripting/Engine.cpp:87
#15 0x00000000005a9b6c in GCMain (args=...)
at /home/ilya/Programming/Testing/GoblinCamp/goblin-camp-pl/goblin-camp-pl/Goblin Camp/src/GCamp.cpp:62
#16 0x0000000000712608 in main (argc=1, argv=0x7fffffffdc88)
at /home/ilya/Programming/Testing/GoblinCamp/goblin-camp-pl/goblin-camp-pl/Goblin Camp/src/unix/main.cpp:28
