Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Some bugs  (Read 2463 times)

Persus13

  • Bay Watcher
  • 6th King of the Mafia
    • View Profile
Some bugs
« on: September 04, 2013, 10:33:11 pm »

Hey, so I've been playing the latest official version of LCS, and I noticed three bugs.

The first was that I bought a shotgun from a gang member, and the the gangster freaked out because I was holding a shotgun.

The second was that in the Elite Liberal amendment, there were three maines, two Iowas, and no North Carolinas.

Finally:
Logged
Congratulations Persus, now you are forced to have the same personal text for an entire year!
Longbowmen horsearcher doomstacks that suffer no attrition and can navigate all major rivers without ships.
Sigtext

FinetalPies

  • Bay Watcher
  • Even on the battlefield.
    • View Profile
Re: Some bugs
« Reply #1 on: September 05, 2013, 04:13:01 am »

Lure says, randishes the Combat Knife.
"What's the price for the Liberal Crime Squad?"

Also that particular Liberal actually had a .44 Magnum equipped, though the rest of my Squad had combat knives.
Logged

FinetalPies

  • Bay Watcher
  • Even on the battlefield.
    • View Profile
Re: Some bugs
« Reply #2 on: September 05, 2013, 04:48:49 am »

I just got a new love slave and it gave the standard option of:

 - Come to the abandoned fertilizer plant as a regular member
 - Stay at University district as a sleeper agent

The thing is though I'm not at an abandoned fertilizer plant, I'm at "Ogden Manpower" (Business front)

Not really a big deal
Logged

KA101

  • Bay Watcher
    • View Profile
Re: Some bugs
« Reply #3 on: September 06, 2013, 04:16:09 pm »

I just got a new love slave and it gave the standard option of:

 - Come to the abandoned fertilizer plant as a regular member
 - Stay at University district as a sleeper agent

The thing is though I'm not at an abandoned fertilizer plant, I'm at "Ogden Manpower" (Business front)

Not really a big deal

If Ogden Manpower used to be an abandoned fertilizer plant, sometimes the game doesn't use the Front name.  Happens with some raids & raid-warnings as well.
Logged

Cheedows

  • Bay Watcher
  • Still a dwarf, right?
    • View Profile
Re: Some bugs
« Reply #4 on: September 06, 2013, 07:46:04 pm »

It seems that the day before my founder comes back from vacation I will always crash whenever waiting, going for a raid etc. Is there anyway to fix this?
Logged

Liberal Elitist

  • Bay Watcher
  • I'm more liberal than you are!
    • View Profile
    • The Liberal Crime Squad wiki
Re: Some bugs
« Reply #5 on: September 13, 2013, 05:50:28 pm »

Well, that's a lot of bugs...

The second was that in the Elite Liberal amendment, there were three maines, two Iowas, and no North Carolinas.

This one's been fixed already in the SVN builds on SourceForge. Unfortunately, I can't say the same about any of the other bugs mentioned in this thread. Except the one about Ogden Manpower being an Abandoned Fertilizer Plant, that one isn't really a bug, it's that way on purpose, at least I think it is... not really sure. But I guess it could be considered a bug even if it WAS originally done that way on purpose, since it would probably be better and more consistent to go with the name of the business front, as long as a business front exists (business fronts DO get destroyed sometimes during sieges).

And as for that screenshot of the text display problem, yeah I've seen all sorts of similar text display problems in different parts of the game, usually because 2 different pieces of text are being printed in the same place on the screen and one of them partially overwrites the other. Very common issue. An easy solution would be more newlines, but there's only 25 rows on the screen, it's easy to run out of space. Especially on some other screens in the game that have similar issues with one bit of text overwriting another bit of text, where the entire screen is used up by various different text.

So yeah... a bunch of things to fix, eh... it's really too bad, it seems no matter how many bugs we fix, we keep finding more things that need to be fixed, it's like they're endless... but they CAN'T be endless, there's only a finite amount of source code. You can't have an infinite number of bugs in a finite amount of source code. At least I HOPE not.
Logged
The Liberal Crime Squad wiki is your friend.

Quote from: Lielac
Edit: Figured it out via a little bit of trial and error and oH MY GOD WHAT IS THIS MUSIC WHAT IS THIS MUSIC WHAT THE HECK IS IT SPACEBALLS MUSIC? WHATEVER IT IS IT IS MAGICAL

Liberal Elitist

  • Bay Watcher
  • I'm more liberal than you are!
    • View Profile
    • The Liberal Crime Squad wiki
Re: Some bugs
« Reply #6 on: September 14, 2013, 12:17:25 am »

I just got a new love slave and it gave the standard option of:

 - Come to the abandoned fertilizer plant as a regular member
 - Stay at University district as a sleeper agent

The thing is though I'm not at an abandoned fertilizer plant, I'm at "Ogden Manpower" (Business front)

Fixed this bug in revision 725. Now when you get the prompt on whether or not to make a new LCS operative a Sleeper, the names of your hideout and their work location are both correctly displayed in full, including business front names and what city it's in.

If Ogden Manpower used to be an abandoned fertilizer plant, sometimes the game doesn't use the Front name.  Happens with some raids & raid-warnings as well.

Haven't yet dealt with it for raids or raid-warnings though... still need to fix that.
Logged
The Liberal Crime Squad wiki is your friend.

Quote from: Lielac
Edit: Figured it out via a little bit of trial and error and oH MY GOD WHAT IS THIS MUSIC WHAT IS THIS MUSIC WHAT THE HECK IS IT SPACEBALLS MUSIC? WHATEVER IT IS IT IS MAGICAL

Carlos Gustavos

  • Bay Watcher
    • View Profile
Re: Some bugs
« Reply #7 on: September 14, 2013, 05:09:40 pm »

Why did you change the line endings? Especially for sitemaps.txt they were unix-style to avoid a bug on Linux.
Logged

Liberal Elitist

  • Bay Watcher
  • I'm more liberal than you are!
    • View Profile
    • The Liberal Crime Squad wiki
Re: Some bugs
« Reply #8 on: September 16, 2013, 11:53:22 am »

The majority of users use Windows, and the default editor for .txt files on Windows is Notepad, which can only read files with DOS/Windows-style CRLF line endings. So users on Windows might get confused if init.txt or the .xml files are not editable in Notepad. I DIDN'T change the line endings for any makefiles or scripts, those probably HAVE to be UNIX-style line endings. Line endings in .cpp and .h files can be either way, compilers know how to read both types. Text and documentation files, it make sense for them to be readable on Windows. .Xml files, in them line endings don't matter, since XML is far more advanced than that, it's part of the XML specification. I think Linux text editors are quite well-programmed and able to view files with CRLF line endings quite well nowadays in the various text editors such as Emacs, vim, etc., while Windows is not quite as good at displaying files with UNIX-style line endings, at least not in its default text editor Notepad (which a lot of people still use). And while Windows' WordPad CAN view files with UNIX-style line endings, if you save them it changes them all to DOS/Windows-style line endings. So on Windows the support for UNIX-style line endings is quite bad, at least in everything bundled by Microsoft as part of the operating system. Linux is far more robust at dealing with this sort of thing.

As for sitemaps.txt, there is a bug parsing it on Linux? Well this probably needs to be fixed in the code of Liberal Crime Squad. Can you confirm that this bug is still present? It ought to be fixable in the code. I could write a wrapper function for the getline() function that reads a line of text from a file, and have it remove any CR or LF characters that are at the beginning or end of the line, and then call this wrapper function everywhere the regular function for reading a line of text from a file is used. Or, since getline() is polymorphic and has several variants, I could call a function to remove CR and LF characters right after each call to getline(). That would allow it to work perfectly on Linux, if that bug is present, and then it would have no difficulty parsing files with Windows line-endings on POSIX-compliant operating systems (not just Linux, but Mac OS X and others too). If the game is unable to parse both types of line endings, I would definitely consider that a bug that needs fixing, and luckily I can probably fix it too. The game is supposed to be cross-platform after all, and being unable to read certain types of line endings on certain operating systems is definitely a bug. After all, the plaintext-formatted files have to have either one type of line ending or the other, we can't have both.

UPDATE: The bug with the game not properly parsing CRLF line endings has been fixed in revision 727. Now the game parses both DOS/Windows-style CRLF and UNIX/Linux/Mac OS X-style LF line ending perfectly, and it can even parse files that have an inconsistent mixture of the 2 types of line endings with no difficulty whatsoever, and this code should work on all platforms. Even LFCR line endings (VERY rare) work fine. The only type of commonly used line ending that WON'T work is the type of line ending used on old Macs (up to Mac OS 9) and Commodore 64s, the CR line ending. But that doesn't really matter, since nobody plays the game on those ancient systems anyway, and even if they did somehow manage to port the game to those systems, they wouldn't have any problems with line ending parsing unless they manually edited the configuration files and changed the line ending style to CR, and anyone brilliant enough to successfully port the game to, for instance, Mac OS 9, wouldn't be dumb enough to make a mistake like that. So anyway, yeah, you can use UNIX style line endings on Windows or Windows style line endings on UNIX style operating systems, for any of the LCS configuration files, with no problems now.
« Last Edit: September 16, 2013, 01:43:23 pm by Liberal Elitist »
Logged
The Liberal Crime Squad wiki is your friend.

Quote from: Lielac
Edit: Figured it out via a little bit of trial and error and oH MY GOD WHAT IS THIS MUSIC WHAT IS THIS MUSIC WHAT THE HECK IS IT SPACEBALLS MUSIC? WHATEVER IT IS IT IS MAGICAL

Liberal Elitist

  • Bay Watcher
  • I'm more liberal than you are!
    • View Profile
    • The Liberal Crime Squad wiki
Re: Some bugs
« Reply #9 on: September 16, 2013, 02:56:25 pm »

It seems that the day before my founder comes back from vacation I will always crash whenever waiting, going for a raid etc. Is there anyway to fix this?

Haven't been able to reproduce this bug... when I have my founder spend a week on vacation with someone they're dating it doesn't crash. Do you have any more details about the state of your game when it crashes? I am trying this out in a game where I haven't recruited anyone besides my founder yet. And it doesn't crash for me, I haven't run into that bug at all yet, when I tried having my founder spend a week on vacation with someone. Could you help me reproduce this bug by giving me more details on it? Since it's a crash bug it's pretty serious and needs to be fixed more urgently than some of the other bugs here such as minor text display glitches.
Logged
The Liberal Crime Squad wiki is your friend.

Quote from: Lielac
Edit: Figured it out via a little bit of trial and error and oH MY GOD WHAT IS THIS MUSIC WHAT IS THIS MUSIC WHAT THE HECK IS IT SPACEBALLS MUSIC? WHATEVER IT IS IT IS MAGICAL

KA101

  • Bay Watcher
    • View Profile
Re: Some bugs
« Reply #10 on: September 16, 2013, 06:26:25 pm »

It seems that the day before my founder comes back from vacation I will always crash whenever waiting, going for a raid etc. Is there anyway to fix this?

Haven't been able to reproduce this bug... when I have my founder spend a week on vacation with someone they're dating it doesn't crash. Do you have any more details about the state of your game when it crashes? I am trying this out in a game where I haven't recruited anyone besides my founder yet. And it doesn't crash for me, I haven't run into that bug at all yet, when I tried having my founder spend a week on vacation with someone. Could you help me reproduce this bug by giving me more details on it? Since it's a crash bug it's pretty serious and needs to be fixed more urgently than some of the other bugs here such as minor text display glitches.

Thinking out loud: what version are we looking at?  I recall something about injured Liberals that went into hiding causing crashes--got fixed.  Might have something to do with that?
Logged

Persus13

  • Bay Watcher
  • 6th King of the Mafia
    • View Profile
Re: Some bugs
« Reply #11 on: September 16, 2013, 06:59:35 pm »

I had a game that constantly crashed the day before the November elections one year. I can't remember which one, but I only solved it by disbanding the liberal crime squad for a while.
Logged
Congratulations Persus, now you are forced to have the same personal text for an entire year!
Longbowmen horsearcher doomstacks that suffer no attrition and can navigate all major rivers without ships.
Sigtext

Cheedows

  • Bay Watcher
  • Still a dwarf, right?
    • View Profile
Re: Some bugs
« Reply #12 on: September 16, 2013, 08:35:37 pm »

Unfortunately I deleted the save but I can try to reproduce it. I'l get back to you once I have time to reproduce it (School, ugh.) Thanks for helping.
Logged

Liberal Elitist

  • Bay Watcher
  • I'm more liberal than you are!
    • View Profile
    • The Liberal Crime Squad wiki
Re: Some bugs
« Reply #13 on: September 16, 2013, 10:39:29 pm »

If you're trying to find bugs, please use the latest SVN revision, by going to https://sourceforge.net/p/lcsgame/code/HEAD/tree/... everything is in the trunk directory. The direct link to download the latest SVN revision is https://sourceforge.net/p/lcsgame/code/HEAD/tarball. And the revision history, so you can see a list of changes and bugs fixed, is at https://sourceforge.net/p/lcsgame/code/HEAD/log/.

As for what's in the source code once you download it... crimesquad.exe is in the workspaces\Release and workspaces\Debug subdirectories of that (depending on whether you want a Release build that's optimized to run fast or a Debug build that's full of debugging symbols, gives better error messages, and is suitable for use with debuggers). init.txt is right there in the trunk directory. You'll want to copy the whole art folder and all its contents, it is there too. And the documentation file Jonathan S. Fox also bundles with things, CrimeSquadManual.txt, that's in the docs directory. At the current moment the latest SVN revision number is 728. Anyway, if you are testing for bugs, please use the latest revision. That way if your bug already got fixed, it won't be there anymore and you won't encounter it. If it's a bug that HASN'T been fixed, you'll still encounter it, of course. And there may in fact be NEW bugs that weren't there in earlier revisions (we call these "regressions"), and it's important to know about any regressions that have been introduced, too. There have been a large number of bugs fixed since the last beta release and even more since the last stable release. Oh yeah, and sourceforge, when you browse it, it has different release numbers, but if you use "HEAD" in the URL instead of a number, you'll always get the latest release. If you're on Linux or Mac OS X you'll need to compile and build the program using the instructions in LINUX_README.txt, since obviously the crimesquad.exe files are binaries for Windows.

I only figured out the "HEAD" thing a few days ago, all this time I didn't know about it... it was around the same time that I finally learned how to have the TortoiseSVN client I use to connect to the SVN repository not prompt me for a password 3 or 4 times in a row every time I try to do anything. It was getting annoying typing in my sourceforge passport 3 or 4 times every time I did anything (not just commits, but also downloading code, looking at revision histories, anything at all, I'd get asked for my password a ton of times in a row, really annoying, glad I got that fixed, now the program has my login credentials saved).
Logged
The Liberal Crime Squad wiki is your friend.

Quote from: Lielac
Edit: Figured it out via a little bit of trial and error and oH MY GOD WHAT IS THIS MUSIC WHAT IS THIS MUSIC WHAT THE HECK IS IT SPACEBALLS MUSIC? WHATEVER IT IS IT IS MAGICAL