Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#39 Segfault with bg2

closed-fixed
nobody
None
7
2005-06-07
2005-02-14
Suggs bill
No

After creating a character in bg2 I'm getting a
segfault as the game starts. Here's the results of a bt
full in gdb.

Cache::DecRef (this=0x804a01c, data=0xa852d60, key=0x0,
remove=false) at Cache.cpp:239
239 if(pAssoc->data==data) {
(gdb) bt full
#0 Cache::DecRef (this=0x804a01c, data=0xa852d60,
key=0x0, remove=false) at Cache.cpp:239
pAssoc = (Cache::MyAssoc *) 0x42
#1 0x4007ed44 in Interface::FreeItem (this=0x804a008,
itm=0xa852d60, name=0x0, free=false) at Interface.cpp:2659
res = 0
#2 0x4008fb3d in Inventory::CalculateWeight
(this=0xa5f55c8) at Inventory.cpp:78
itm = (Item *) 0x42
i = 9
#3 0x4007021b in Map::DrawMap (this=0x88aa268,
viewport={x = 64, y = 0, w = 512, h = 390},
gc=0x877cec8) at Map.cpp:406
actor = (class Actor *) 0xa5f4ac8
ca = (CharAnimations *) 0xa5f55c8
anim = (Animation *) 0xa83d8b0
q = 1
i = 8
ipCount = 39
video = (class Video *) 0x805c390
vp = {x = 3485, y = 2606, w = 640, h = 480}
Screen = {x = 64, y = 0, w = 640, h = 480}
#4 0x4005aa9f in GameControl::Draw (this=0x877cec8,
x=64, y=0) at GameControl.cpp:237
game = (class Game *) 0x8286360
video = (class Video *) 0x805c390
viewport = {x = 3485, y = 2606, w = 512, h = 390}
vp = {x = 64, y = 0, w = 512, h = 390}
area = (class Map *) 0x88aa268
p = {x = 24484, y = 16463}
#5 0x400667ba in Window::DrawWindow (this=0x881be60)
at stl_iterator.h:602
video = (class Video *) 0x805c390
clip = {x = 64, y = 0, w = 512, h = 390}
m =
{<std::iterator<std::random_access_iterator_tag,
Control*, int, Control**, Control*&>> = {<No data
fields>},
_M_current = 0x83a83e8}
#6 0x4007c12b in Interface::DrawWindows
(this=0x804a008) at stl_vector.h:151
i = 0
t =
{<std::iterator<std::random_access_iterator_tag, int,
int, int*, int&>> = {<No data fields>},
current =
{<std::iterator<std::random_access_iterator_tag, int,
int, int*, int&>> = {<No data fields>}, _M_current =
0x8421dc4}}
#7 0x08048bfa in main (argc=0, argv=0x0) at GemRB.cpp:69
fps = (Font *) 0x812b458
fpsstring = '\0' <repeats 384 times>,
"ČÎ\r@dí˙żÄb\000@˘\1773@ÔÎ\r@", '\0' <repeats 44
times>,
" Ě\r@\000\000\000\000\000\000\000\000˘\1773@hE2@",
'\0' <repeats 32 times>, "@H2@Ří˙żÄb\000@Iľ2@LH2@",
'\0' <repeats 44 times>,
"lf\001@\000\000\000\000\000\000\000\000Iľ2@xB2@", '\0'
<repeats 52 times>, "@H2@`î˙żÄb\000@ŢY2@LH2@", '\0'
<repeats 44 times>,
"lf\001@\000\000\000\000\000\000\000\000ŢY2@\000@2@",
'\0' <repeats 44 times>, "@H2@ŕî˙żÄb"...
fpsblack = {r = 0 '\0', g = 0 '\0', b = 0 '\0',
a = 255 '˙'}
frame = 0
time = 0
timebase = 265462265
bg = {x = 0, y = 0, w = 50, h = 20}
palette = (Color *) 0x8263100

I'm compiling from CVS using the following :
Athlon XP 1600
Linux kernel 2.6.4
Debian/Unstable
gcc 3.3.5
python 2.3.5
automake 1.7
autoconf 2.59

Discussion

  • Logged In: YES
    user_id=98628

    Hi,
    this is a known problem caused by introduction of Cache.
    Unfortunately there's no fix for it atm. You have to load
    bg2 from saved game and avoid areas with actor scripts.

    Affrects 0.2.3 release as well :(

    Edheldil

     
    • priority: 5 --> 7
    • status: open --> open-accepted
     
  • Laszlo Toth
    Laszlo Toth
    2005-02-20

    Logged In: YES
    user_id=885460

    Most likely cause is that a resref isn't converted to upper
    case.
    I'm working on the issue.
    Scripts are already fixed.

     
  • Logged In: YES
    user_id=98628

    Hi, this should be fixed. Please check.

     
    • status: open-accepted --> open-fixed
     
  • Suggs bill
    Suggs bill
    2005-06-07

    • status: open-fixed --> closed-fixed
     
  • Suggs bill
    Suggs bill
    2005-06-07

    Logged In: YES
    user_id=736400

    Sorry for the long (very long) delay in checking this bug
    again. Yes it is fixed for me and I'm closing the bug now.

    Thanks for taking the time to address this issue.