Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - InfernoZeus

Pages: [1]
1
Curses / Re: Patch for Issue with Hacking
« on: February 16, 2011, 11:47:24 am »
I found several!  I even reproduced a few of them.  Alas, I suck as a coder, and haven't been able to fix any of the others so far.  I'll keep trying.

It'd be good if you posted them somewhere, just in case they haven't already been acknowledged. I'm not sure if there's a proper issue tracker though.

2
Ah, open source software.

It is nice when it works so smoothly! :)

3
Thanks for the feedback Jonathan, I've added some code to src/sitemode/talk.cpp which checks if a room is being rented, and then gives an option to stop renting. I had a look at the code for when the player is evicted in order to work out how to move all of the possessions and people that have the room set as their base.

Is it possible to attach a patch or something - would you mind taking a look at it?

Edit: Also, what is RENTING_PERMANENT used for? Is that for the free rental places that you never get kicked out of?

locationst->newrental seems to be set when you rent a room and its reset at the start of the month. Is that so if you started renting since the start of the month, you don't pay any additional rent on the third?

4
Curses / Looking into implementing canceling the renting of an apartment
« on: February 11, 2011, 12:26:28 am »
Something that I've noticed myself, and seems to be asked a lot, is if its possible to stop renting an apartment. I thought I'd take a look at the code and see how difficult it would be to add in. (If anyone has already done anything towards this, just gimme a heads up and I'll leave it alone)

As far as I can tell it seems like it should be pretty simple, but I wasn't sure how to go about charging for the number of days that the apartment had already been in use that month. It wouldn't make sense not to charge anything as people could just cancel right before payment was due, and then take it out again the next month. Does the code currently track when someone started renting the apartment?

Also, is the right place to ask questions about the code itself? The sourceforge page doesn't seem to have an issue list like Google Code does.

5
Curses / Re: Building from source in Ubuntu
« on: February 10, 2011, 09:05:23 pm »
I think it might have been something to do with a corrupted save file. I've just been debugging it in Eclipse, and it was crashing during the loading phase at the start.

I don't suppose anyone knows how to get Eclipse to work properly with ncurses? At the moment, it just displays all of the escape characters. I'm pretty sure that Eclipse's 'console' isn't a proper console..

Edit: It seems the issue occurs any time that it loads the save.dat file. Here's the stack trace from gdb after it crashes..
Code: [Select]
#0  0x00007ffff70a9ba5 in raise () from /lib/libc.so.6
#1  0x00007ffff70ad6b0 in abort () from /lib/libc.so.6
#2  0x00007ffff70e343b in ?? () from /lib/libc.so.6
#3  0x00007ffff7175537 in __fortify_fail () from /lib/libc.so.6
#4  0x00007ffff71743f0 in __chk_fail () from /lib/libc.so.6
#5  0x00007ffff7174bcb in __fread_chk () from /lib/libc.so.6
#6  0x000000000042f35b in fread () at /usr/include/bits/stdio2.h:285
#7  load () at title/saveload.cpp:475
#8  0x0000000000405b03 in main (argc=<value optimized out>, argv=<value optimized out>) at game.cpp:426

Edit 2: I've confirmed this by temporarily removing commenting out the loading and it runs fine every time.

Edit 3: Problem found, LCS doesn't play well with 64-bit versions of Ubuntu.

6
Curses / Re: Building from source in Ubuntu
« on: February 09, 2011, 09:45:45 pm »
Alright, here it is:

Code: [Select]
*** buffer overflow detected ***: src/crimesquad terminated
======= Backtrace: =========
/lib/libc.so.6(__fortify_fail+0x37)[0x7ff0155e3537]
/lib/libc.so.6(+0xfe3f0)[0x7ff0155e23f0]
/lib/libc.so.6(__fread_chk+0x15b)[0x7ff0155e2bcb]
src/crimesquad[0x42f30b]
src/crimesquad[0x405ab3]
/lib/libc.so.6(__libc_start_main+0xfe)[0x7ff015502d8e]
src/crimesquad[0x4039a9]
======= Memory map: ========
00400000-00573000 r-xp 00000000 08:01 169443                             /home/ben/lcsgame/trunk/src/crimesquad
00772000-00773000 r--p 00172000 08:01 169443                             /home/ben/lcsgame/trunk/src/crimesquad
00773000-00775000 rw-p 00173000 08:01 169443                             /home/ben/lcsgame/trunk/src/crimesquad
00775000-00f6c000 rw-p 00000000 00:00 0
02ef2000-02f2d000 rw-p 00000000 00:00 0                                  [heap]
7ff0152e0000-7ff0152e2000 r-xp 00000000 08:01 152244                     /lib/libdl-2.12.1.so
7ff0152e2000-7ff0154e2000 ---p 00002000 08:01 152244                     /lib/libdl-2.12.1.so
7ff0154e2000-7ff0154e3000 r--p 00002000 08:01 152244                     /lib/libdl-2.12.1.so
7ff0154e3000-7ff0154e4000 rw-p 00003000 08:01 152244                     /lib/libdl-2.12.1.so
7ff0154e4000-7ff01565e000 r-xp 00000000 08:01 152237                     /lib/libc-2.12.1.so
7ff01565e000-7ff01585d000 ---p 0017a000 08:01 152237                     /lib/libc-2.12.1.so
7ff01585d000-7ff015861000 r--p 00179000 08:01 152237                     /lib/libc-2.12.1.so
7ff015861000-7ff015862000 rw-p 0017d000 08:01 152237                     /lib/libc-2.12.1.so
7ff015862000-7ff015867000 rw-p 00000000 00:00 0
7ff015867000-7ff01587c000 r-xp 00000000 08:01 129877                     /lib/libgcc_s.so.1
7ff01587c000-7ff015a7b000 ---p 00015000 08:01 129877                     /lib/libgcc_s.so.1
7ff015a7b000-7ff015a7c000 r--p 00014000 08:01 129877                     /lib/libgcc_s.so.1
7ff015a7c000-7ff015a7d000 rw-p 00015000 08:01 129877                     /lib/libgcc_s.so.1
7ff015a7d000-7ff015aff000 r-xp 00000000 08:01 152245                     /lib/libm-2.12.1.so
7ff015aff000-7ff015cfe000 ---p 00082000 08:01 152245                     /lib/libm-2.12.1.so
7ff015cfe000-7ff015cff000 r--p 00081000 08:01 152245                     /lib/libm-2.12.1.so
7ff015cff000-7ff015d00000 rw-p 00082000 08:01 152245                     /lib/libm-2.12.1.so
7ff015d00000-7ff015de8000 r-xp 00000000 08:01 395994                     /usr/lib/libstdc++.so.6.0.14
7ff015de8000-7ff015fe7000 ---p 000e8000 08:01 395994                     /usr/lib/libstdc++.so.6.0.14
7ff015fe7000-7ff015fef000 r--p 000e7000 08:01 395994                     /usr/lib/libstdc++.so.6.0.14
7ff015fef000-7ff015ff1000 rw-p 000ef000 08:01 395994                     /usr/lib/libstdc++.so.6.0.14
7ff015ff1000-7ff016006000 rw-p 00000000 00:00 0
7ff016006000-7ff016046000 r-xp 00000000 08:01 129896                     /lib/libncurses.so.5.7
7ff016046000-7ff016245000 ---p 00040000 08:01 129896                     /lib/libncurses.so.5.7
7ff016245000-7ff016249000 r--p 0003f000 08:01 129896                     /lib/libncurses.so.5.7
7ff016249000-7ff01624a000 rw-p 00043000 08:01 129896                     /lib/libncurses.so.5.7
7ff01624a000-7ff01626a000 r-xp 00000000 08:01 145652                     /lib/ld-2.12.1.so
7ff016449000-7ff01644f000 rw-p 00000000 00:00 0
7ff016467000-7ff01646a000 rw-p 00000000 00:00 0
7ff01646a000-7ff01646b000 r--p 00020000 08:01 145652                     /lib/ld-2.12.1.so
7ff01646b000-7ff01646c000 rw-p 00021000 08:01 145652                     /lib/ld-2.12.1.so
7ff01646c000-7ff01646d000 rw-p 00000000 00:00 0
7fff331ad000-7fff331ce000 rw-p 00000000 00:00 0                          [stack]
7fff331ff000-7fff33200000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
Aborted

I've also included the results from env CFLAGS="-O0 -g" ./configure
Code: [Select]
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking ncurses.h usability... yes
checking ncurses.h presence... yes
checking for ncurses.h... yes
checking ncursesw/ncurses.h usability... no
checking ncursesw/ncurses.h presence... no
checking for ncursesw/ncurses.h... no
checking for addch in -lncurses... yes
checking for add_wch in -lncurses... no
checking for library containing initscr... -lncurses
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for size_t... yes
checking whether time.h and sys/time.h may both be included... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking return type of signal handlers... void
checking whether lstat correctly handles trailing slash... yes
checking whether stat accepts an empty string... no
checking for memset... yes
checking for mkdir... yes
checking for strchr... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands

7
Curses / Re: Building from source in Ubuntu
« on: February 09, 2011, 08:57:40 pm »
Thanks for the suggestion, however that doesn't change anything. It still compiles without errors (although there are warnings), but the same errors come up. I have been able to get it working inconsistently, but then it just complains about sitemaps.txt missing form ./workspaces/ - I managed to fix that by copying the file from ./art/ but is that to be expected?

Edit: Alright, I've been poking around, trying to get it working, and it seems that it only throws up this issue if I'm still in the same shell that I compiled it in. If I restart the terminal, it works fine. Seems very strange.

8
Curses / Building from source in Ubuntu - Solution found!
« on: February 09, 2011, 01:23:29 pm »
Edit: I found the problem - I'd been trying to run it in a 64-bit version of Ubuntu, which doesn't seem to work. As soon as I switched over to a 32-bit version, everything worked fine.



I checked out a copy of the code from SVN, and noticed that there are two files on how to build/install LCS (INSTALL and LINUX_README.txt) - as far as I can tell, INSTALL is a auto-generated file, whereas LINUX_README.txt contains the correct instructions. I followed the instructions in LINUX_README.txt
Code: [Select]
bootstrap
./configure
make
but when I tried to run crimesquad, it shows the following errors:
Code: [Select]
*** buffer overflow detected ***: src/crimesquad terminated
======= Backtrace: =========
/lib/libc.so.6(__fortify_fail+0x37)[0x7f535cdd7537]
/lib/libc.so.6(+0xfe3f0)[0x7f535cdd63f0]
/lib/libc.so.6(__fread_chk+0x15b)[0x7f535cdd6bcb]
src/crimesquad[0x42f30b]
src/crimesquad[0x405ab3]
/lib/libc.so.6(__libc_start_main+0xfe)[0x7f535ccf6d8e]
src/crimesquad[0x4039a9]
======= Memory map: ========
00400000-00573000 r-xp 00000000 08:01 29493                              /home/ben/lcsgame/trunk/src/crimesquad
00772000-00773000 r--p 00172000 08:01 29493                              /home/ben/lcsgame/trunk/src/crimesquad
00773000-00775000 rw-p 00173000 08:01 29493                              /home/ben/lcsgame/trunk/src/crimesquad
00775000-00f6c000 rw-p 00000000 00:00 0
0268f000-026d0000 rw-p 00000000 00:00 0                                  [heap]
7f535cad4000-7f535cad6000 r-xp 00000000 08:01 152244                     /lib/libdl-2.12.1.so
7f535cad6000-7f535ccd6000 ---p 00002000 08:01 152244                     /lib/libdl-2.12.1.so
7f535ccd6000-7f535ccd7000 r--p 00002000 08:01 152244                     /lib/libdl-2.12.1.so
7f535ccd7000-7f535ccd8000 rw-p 00003000 08:01 152244                     /lib/libdl-2.12.1.so
7f535ccd8000-7f535ce52000 r-xp 00000000 08:01 152237                     /lib/libc-2.12.1.so
7f535ce52000-7f535d051000 ---p 0017a000 08:01 152237                     /lib/libc-2.12.1.so
7f535d051000-7f535d055000 r--p 00179000 08:01 152237                     /lib/libc-2.12.1.so
7f535d055000-7f535d056000 rw-p 0017d000 08:01 152237                     /lib/libc-2.12.1.so
7f535d056000-7f535d05b000 rw-p 00000000 00:00 0
7f535d05b000-7f535d070000 r-xp 00000000 08:01 129877                     /lib/libgcc_s.so.1
7f535d070000-7f535d26f000 ---p 00015000 08:01 129877                     /lib/libgcc_s.so.1
7f535d26f000-7f535d270000 r--p 00014000 08:01 129877                     /lib/libgcc_s.so.1
7f535d270000-7f535d271000 rw-p 00015000 08:01 129877                     /lib/libgcc_s.so.1
7f535d271000-7f535d2f3000 r-xp 00000000 08:01 152245                     /lib/libm-2.12.1.so
7f535d2f3000-7f535d4f2000 ---p 00082000 08:01 152245                     /lib/libm-2.12.1.so
7f535d4f2000-7f535d4f3000 r--p 00081000 08:01 152245                     /lib/libm-2.12.1.so
7f535d4f3000-7f535d4f4000 rw-p 00082000 08:01 152245                     /lib/libm-2.12.1.so
7f535d4f4000-7f535d5dc000 r-xp 00000000 08:01 395994                     /usr/lib/libstdc++.so.6.0.14
7f535d5dc000-7f535d7db000 ---p 000e8000 08:01 395994                     /usr/lib/libstdc++.so.6.0.14
7f535d7db000-7f535d7e3000 r--p 000e7000 08:01 395994                     /usr/lib/libstdc++.so.6.0.14
7f535d7e3000-7f535d7e5000 rw-p 000ef000 08:01 395994                     /usr/lib/libstdc++.so.6.0.14
7f535d7e5000-7f535d7fa000 rw-p 00000000 00:00 0
7f535d7fa000-7f535d83a000 r-xp 00000000 08:01 129896                     /lib/libncurses.so.5.7
7f535d83a000-7f535da39000 ---p 00040000 08:01 129896                     /lib/libncurses.so.5.7
7f535da39000-7f535da3d000 r--p 0003f000 08:01 129896                     /lib/libncurses.so.5.7
7f535da3d000-7f535da3e000 rw-p 00043000 08:01 129896                     /lib/libncurses.so.5.7
7f535da3e000-7f535da5e000 r-xp 00000000 08:01 145652                     /lib/ld-2.12.1.so
7f535dc3d000-7f535dc43000 rw-p 00000000 00:00 0
7f535dc5b000-7f535dc5e000 rw-p 00000000 00:00 0
7f535dc5e000-7f535dc5f000 r--p 00020000 08:01 145652                     /lib/ld-2.12.1.so
7f535dc5f000-7f535dc60000 rw-p 00021000 08:01 145652                     /lib/ld-2.12.1.so
7f535dc60000-7f535dc61000 rw-p 00000000 00:00 0
7fff2c2bc000-7fff2c2dd000 rw-p 00000000 00:00 0                          [stack]
7fff2c3ff000-7fff2c400000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
Aborted

Has anyone come across this problem before? Are there any prerequisites that I could be missing? I'm trying to build on Ubuntu 10.10 running in a VM. Thanks

9
DF Gameplay Questions / Re: Wooden Block Stockpiles
« on: July 24, 2010, 06:46:26 am »
Sorry, there was a typo in my first post, should have read:

Why aren't Wooden blocks put into Bar/Block stockpiles?

I've got a Bar/Block stockpile, but all of the wooden blocks are just cluttering up the workshop instead of being moved there :(

10
DF Gameplay Questions / Wooden Block Stockpiles
« on: July 23, 2010, 04:33:55 pm »
Why aren't Wooden blocks put into Bar/Block stockpiles? Also, where can I find them in the Stockpile settings list? TIA

Edit: Typo..

11
DF Modding / Re: Stonesense - Official thread
« on: July 22, 2010, 11:15:06 am »
Is this still being worked on? The OP hasn't been online in a month  :(

12
DF Gameplay Questions / Questions about Fishing
« on: July 19, 2010, 10:14:34 am »
I'm trying to set up my Fishing 'industry' and I've got a couple of questions about it. Do the fishers bring back the fishes to the fortress? Or is it like woodcutting where they just leave it to be hauled by someone else? Also, what type of hauling is Fish under? TIA

13
DF Gameplay Questions / Re: Confusing Miner Pathfinding
« on: July 19, 2010, 10:10:36 am »
Is there anything I can do to help avoid that? TIA

Burrows. I force my miners to finish one room before moving to something else.

Thanks, I'll try that. So far I've avoided Burrows, but they seem to pop up everywhere  :P I think it might be time to learn how they work..

14
DF Gameplay Questions / Confusing Miner Pathfinding
« on: July 19, 2010, 08:05:01 am »
I just started playing DF and it's been great fun so far. It's amazing that it's mostly the work of one guy. Anyway, I've got a quick question.

Does anyone know how the Miner's work out which square they're going to mine out next? They seem to do it in a very round-a-bout way, and spend more time walking back and forth between tiles than actually mining. Is there anything I can do to help avoid that? TIA

Pages: [1]