Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Segmentation fault in lcs  (Read 1108 times)

seth--

  • Bay Watcher
  • We need a slogan!
    • View Profile
Segmentation fault in lcs
« on: April 02, 2013, 08:05:26 pm »

Here is the save.dat http://dropcanvas.com/zfbz0

Tell me if you need gamelog.txt too

The game was downloaded from svn a few hours ago (don't know the exact commit, the source folder was deleted)

How to reproduce:
Press w, the squad will be in the bank
Press down once
Press right until it crashes

This is what it looks like (it always crashes just when the squad is under the loot)
Code: [Select]
American Bank Corp, Level 1
#-CODE NAME------------SKILL---WEAPON---------ARMOR----------HEALTH---TRANSPORT-
1 Sophie Hooker        27/1    AK-47 (21)     Police Uniform Liberal  On Foot
2 Heather Weathers     23/0    Shotgun (3)    Police Uniform Liberal  On Foot
3 Louise Shaw          28/0    Shotgun (4)    Police Uniform Liberal  On Foot
4
5
6
--------------------------------------------------------------------------------
 W,A,D,X - Move  G - Get Loot   M - Map   E - Equip  |                    CAGES|
                 N - Options    S - Wait  L - Reload |                         |
 O - Change the squad's Liberal order     U - Use    |                         |
 # - Check the status of a squad Liberal  V - Evade  |                    CAGES|
 0 - Show the squad's Liberal status      K - Kidnap |                         |
 F - Fight!      T - Talk       R - Release hostage  |                         |
                                                     |          LOOT!          |
                                                     |          SQUAD          |
                                                     |                         |
                                                     |                    CAGES|
                                                     |                         |
                                                     |                         |
                                                     |                         |
                                                     |                     EXT |
                                                     |                     .   |
                                                     Segmentation fault (core dumped)

I'm using linux
Logged
I am confused are you saying you changed the kidnapping so it is less... Saw?
Did Saw consist of you beating them then yelling Ronald Reagan in their face?

SealyStar

  • Bay Watcher
  • Gargoyles! Psychics!
    • View Profile
Re: Segmentation fault in lcs
« Reply #1 on: April 02, 2013, 10:24:25 pm »

That screen mockup...

How long did that take to make? o_o
Logged
I assume it was about cod tendies and an austerity-caused crunch in the supply of good boy points.

Jboy2000000

  • Bay Watcher
  • Hello good people of the interwebs!
    • View Profile
Re: Segmentation fault in lcs
« Reply #2 on: April 02, 2013, 11:05:01 pm »

Well, one thing Im noticing is the cages that shouldn't be there, as well as the single exit. Also the lack of walls. Something besides the crash is definitely wrong with your game.
Logged
"Wanna be a better liberal? Go get shot in the fuckin' face."

Just goes to show, even a Male Doctor that Looks Like a Female and a Criminal with Poor Hygiene Habits can fall in love.

Jonathan S. Fox

  • Bay Watcher
    • View Profile
    • http://www.jonathansfox.com/
Re: Segmentation fault in lcs
« Reply #3 on: April 03, 2013, 01:58:14 am »

I'm not able to reproduce this using the latest SVN, but Jboy is right -- judging by the screenshot, your map appears to be corrupted. Maps aren't saved in the save file directly, so a problem with your map files could explain why I'm not able to reproduce the issue. Given the exit in the bottom right of your screen, this doesn't look like a fallback map being generated when the map can't be loaded. Instead, I suspect your map file for the bank is being read in, but it's either reading incorrectly in the Linux build, or your data files are corrupt.

One test you can do is to check out if the Nuclear Plant in the outskirts of the city is also giving you a weird map layout and potentially segfaulting. It's the only other location that uses CSV files to store map data, the way the Bank does.

If the Nuclear Plant is similarly problematic, then it sounds like the Linux version isn't handling the new maps correctly. They're text files, so it could be another line endings issue; running them through dos2unix may be worth trying (though I don't remember where the Linux version keeps its data files off the top of my head).

If the Nuclear Plant seems fine, it's probably just an issue with one of your files being corrupted. Rebuilding the game or just replacing the two .csv files regarding the Bank should fix it, in that case.

That screen mockup...

How long did that take to make? o_o

Heheh, I assume it's an actual capture of the screen. You can do something similar in Windows by right clicking, selecting "Mark", and dragging the flashing box over the screen. For example, this is what the Bank map SHOULD look like when you first show up:

Code: [Select]
American Bank Corp, Level 1
#-CODE NAME------------SKILL---WEAPON---------ARMOR----------HEALTH---TRANSPORT-
1 Fiona Cheney         15/0    .38 Rev (XX)   Clothes        Liberal  On Foot
2
3
4
5
6
--------------------------------------------------------------------------------
 W,A,D,X - Move  G - Get Loot   M - Map   E - Equip  |                         |
                 N - Options    S - Wait  L - Reload |                         |
 O - Change the squad's Liberal order     U - Use    |                         |
 # - Check the status of a squad Liberal  V - Evade  |                         |
 0 - Show the squad's Liberal status      K - Kidnap | EXT  EXT  EXT  EXT  EXT |
 F - Fight!      T - Talk       R - Release hostage  |                         |
                                                     |                         |
                                                     |          SQUAD      EXT |
                                                     |                         |
                                                     |..........     .....     |
                                                     |..........     ..... EXT |
                                                     |..........     .....     |
                                                     |          -----          |
                                                     |                         |
                                                     |                         |
                                                     ---------------------------
Logged

usr_share

  • Bay Watcher
  • "For great justice!"
    • View Profile
Re: Segmentation fault in lcs
« Reply #4 on: April 03, 2013, 02:01:02 am »

It's likely that some of the files from the art/ directory weren't installed when you typed "make install". Copy them to /usr/local/share/lcs/art manually.

To maintainers: add their names into the Makefile.
Logged

seth--

  • Bay Watcher
  • We need a slogan!
    • View Profile
Re: Segmentation fault in lcs
« Reply #5 on: April 03, 2013, 04:48:58 pm »

That screen mockup...

How long did that take to make? o_o
I copied and pasted

I'm not able to reproduce this using the latest SVN, but Jboy is right -- judging by the screenshot, your map appears to be corrupted. Maps aren't saved in the save file directly, so a problem with your map files could explain why I'm not able to reproduce the issue. Given the exit in the bottom right of your screen, this doesn't look like a fallback map being generated when the map can't be loaded. Instead, I suspect your map file for the bank is being read in, but it's either reading incorrectly in the Linux build, or your data files are corrupt.

One test you can do is to check out if the Nuclear Plant in the outskirts of the city is also giving you a weird map layout and potentially segfaulting. It's the only other location that uses CSV files to store map data, the way the Bank does.
If the Nuclear Plant is similarly problematic, then it sounds like the Linux version isn't handling the new maps correctly. They're text files, so it could be another line endings issue; running them through dos2unix may be worth trying (though I don't remember where the Linux version keeps its data files off the top of my head).

If the Nuclear Plant seems fine, it's probably just an issue with one of your files being corrupted. Rebuilding the game or just replacing the two .csv files regarding the Bank should fix it, in that case.
The nuclear plant is ok, it doesn't segfault and i can find the thing to sabotage.
This is what the map looks like:
Code: [Select]
Nuclear Power Plant, Level 1
#-COD                                                                      PORT-
1 Sop                                   ☺                                  ot
2 Lou                                                                      ot
3 Hea                        █        █                                    ot
4 Ela                        █        █ ███████████                        ot
5                            █████░████ █ █ $ ░ █
6                            ░ █$     █ ░ ░   █ ░
-----                        █ ░      █ █████░█ █                          -----
 W,A,                        █ █      ░ █    $█ █                              |
                            ███████░███ █     █ ███                            |
 O -                           █  ░   █ ███░███ █                              |
 # -                           █  █ $ █ █!$   █ █                              |
 0 -                           ██░█████ █░█████ ██░█                           |
 F -                           ░      █ █  ░  █ █                              |
                               █      █ █  █  █ █                              |
                                                                               |
                                                                               |
                                                                               |
                                                                               |
                                                                               |
                                                                               |
                                                                               |
                                                                               |
                                                     ---------------------------
I think it's the fallback map you mentioned, because after copying the csv files it became bigger and with more "!" points.
The bank looks like yours now.

Does the fallback bank map fail for anyone else?

I didn't had the csv files in /usr/share/lcs/art but I had them in the source dir. Maybe it's because of this part of the makefile?
Code: [Select]
SUBDIRS = src
lcsdir = $(datadir)/lcs
artdir = $(lcsdir)/art
dist_art_DATA = art/abort.cmv  art/glamshow.cmv  art/largecap.cpc  art/newspic.cpc\
 art/anchor.cmv  art/lacops.cmv    art/newscast.cmv  art/newstops.cpc\
 art/clips.xml  art/weapons.xml art/deptstore.xml  art/loot.xml  art/vehicles.xml\
 art/armors.xml  art/masks.xml  art/pawnshop.xml  art/armsdealer.xml  art/sitemaps.txt\
 art/oubliette.xml

Logged
I am confused are you saying you changed the kidnapping so it is less... Saw?
Did Saw consist of you beating them then yelling Ronald Reagan in their face?

usr_share

  • Bay Watcher
  • "For great justice!"
    • View Profile
Re: Segmentation fault in lcs
« Reply #6 on: April 04, 2013, 10:40:59 am »

Yes, exactly. It's missing the csv files. Please just copy them manually.
Logged

seth--

  • Bay Watcher
  • We need a slogan!
    • View Profile
Re: Segmentation fault in lcs
« Reply #7 on: April 05, 2013, 07:03:16 pm »

Yes, exactly. It's missing the csv files. Please just copy them manually.
I did and it worked but the makefile should be fixed
Logged
I am confused are you saying you changed the kidnapping so it is less... Saw?
Did Saw consist of you beating them then yelling Ronald Reagan in their face?