Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Some Bugs  (Read 1212 times)

quintin522

  • Bay Watcher
  • [FLYING_SPAGHETTI_MONSTER]
    • View Profile
Some Bugs
« on: December 24, 2009, 01:00:08 am »

Don't know if someone else has reported these, or brought them up before.

In nightmare mode, I got a warning that the Firemen were going to raid a safehouse. So I moved all my liberals out from their impending assult, and the next day the safehouse got raided. And the next. And the next. And the next. They only stopped after I sent over a "enlightened" liberal to martyr. After that the raids stopped.

The other one i noticed is that if you wait constantly at the entrance of a map, swat teams are unable to enter. You have to move away before they could start entering, and even that was delayed.
Logged
"I can't bleed to death now, I don't have time!"
Urist McExplorer, bolding going where no dwarf has OH GAWD THE MAGMA IT BURNSSSss..

Jonathan S. Fox

  • Bay Watcher
    • View Profile
    • http://www.jonathansfox.com/
Re: Some Bugs
« Reply #1 on: December 24, 2009, 03:21:11 am »

What version number are you using? I thought I'd fixed infinite firemen raids.
Logged

quintin522

  • Bay Watcher
  • [FLYING_SPAGHETTI_MONSTER]
    • View Profile
Re: Some Bugs
« Reply #2 on: December 24, 2009, 10:39:31 am »

The latest, 4.01.4
Logged
"I can't bleed to death now, I don't have time!"
Urist McExplorer, bolding going where no dwarf has OH GAWD THE MAGMA IT BURNSSSss..

buerokrat

  • Escaped Lunatic
    • View Profile
Re: Some Bugs
« Reply #3 on: January 14, 2010, 05:05:07 pm »

I compiled v4.01.4 on linux (bootstrap, configure, make and then I executed the binary) and run it successfully for the first time (build up a smart lcs ;)). The next time, I got a buffer overflow. Obviously, it has something to do with the "load" function. gdb said:
Quote
374           fread(&selectedsiege,sizeof(long),1,h);
(gdb) step
fread () at /usr/include/bits/stdio2.h:285
285             return __fread_chk_warn (__ptr, __bos0 (__ptr), __size, __n, __stream);
Besides, I don't get sitemaps.txt loaded, wherever I put it.
I've never worked on lager C-projects and never filed any bug report. But I hope this helps (me and others).
Logged

Jonathan S. Fox

  • Bay Watcher
    • View Profile
    • http://www.jonathansfox.com/
Re: Some Bugs
« Reply #4 on: January 14, 2010, 05:20:19 pm »

You'll need to run dos2unix or whatever it's called on sitemaps.txt to change its line endings, as the format it's uploaded with is incompatible with linux. Then it goes in the art directory. My first guess for your loading problem sounds like something where the selectedsiege integer is not defined/saved as a long type, and the system you're on defines long and int as different sizes. You could try changing long to int in that line and see if it fixes it.
Logged

cavebunny

  • Escaped Lunatic
    • View Profile
Re: Some Bugs
« Reply #5 on: January 15, 2010, 12:31:48 pm »

buerokrat: I hit a similar buffer overflow issue to you the one you describe, and found that FORTIFY_SOURCE was the problem, it is enabled by default on most modern distros, and lcs seems to have some issues with it. In particular, it would run fine the first time, and then, if started when there was a save file present, would crash on trying to load it. Deleting ~/.lcs/save.dat would allow the game to run correctly again, but this made using save games impossible.

I found that by calling:
export CPPFLAGS="-D-FORTIFY-SOURCE=0"

and then compiling, this problem went away. (The 'proper' solution is probably to make the source be compilable with the additional safety checks - it seems like most of the issues are in the file src/title/saveload.cpp but my knowledge of C++ isn't strong enough to figure out what they are exactly).
Logged

buerokrat

  • Escaped Lunatic
    • View Profile
Re: Some Bugs
« Reply #6 on: January 17, 2010, 05:14:51 pm »

You could try changing long to int in that line and see if it fixes it.
I changed long to int in saveload.cpp. Now it works. I've never expected any platform not to distinguish between both types.

Now I've found a funny bug/intentional feature. My leader started talks to recruit someone. Then his squad was killed in a car accident, since conservative swines forced them to ignore a red traffic light. But my dead leader continues his talks. Maybe as a zombie? I thought eternal life was a conservatice concept that does not happen to enlighted liberals. He's dead for 3 days now, he should even smell. But the new guy still enjoys talking to him.
Logged

Petra

  • Bay Watcher
  • Vortex of Doom
    • View Profile
Re: Some Bugs
« Reply #7 on: April 05, 2010, 09:34:06 pm »

*bumb

I got this glitch where cork merks are raiding some apartments in the University District. It's a siege, and there's no one there. NO items. NOthing.
Logged