Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
Couple bugs
Dec 12, 2017, 5:42 pm
By Remcon
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
Bug in get_exp_worth( )
Oct 10, 2017, 1:26 am
By GatewaySysop
LOP 1.45
Author: Remcon
Submitted by: Remcon
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Users Online
CommonCrawl, Yandex, Yahoo!, Google, Bing

Members: 0
Guests: 13
Stats
Files
Topics
Posts
Members
Newest Member
477
3,705
19,232
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » SmaugFUSS » Crash during memory_cleanup
Forum Rules | Mark all | Recent Posts

Crash during memory_cleanup
< Newer Topic :: Older Topic > A little lost here heh

Pages:<< prev 1 next >>
* #1 Jun 9, 2011, 12:31 am   Last edited Jun 9, 2011, 12:34 am by Aurin
Go to the top of the page
Go to the bottom of the page

Aurin
Magician
GroupMembers
Posts189
JoinedSep 5, 2010

So, here's the deal, game crashed while freeing a bank account in game. The bank accounts are not related to a player character, though the account does have a name and password associated to it that a player can create on their own. Below are the related functions to the crash, with the bt of it.

GDB BT:
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib/libz.so.1...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /lib/libcrypt.so.1...done.
Loaded symbols for /lib/libcrypt.so.1
Reading symbols from /usr/lib/libmysqlclient.so.14...done.
Loaded symbols for /usr/lib/libmysqlclient.so.14
Reading symbols from /lib/libm.so.6...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /usr/lib/libstdc++.so.6...done.
Loaded symbols for /usr/lib/libstdc++.so.6
Reading symbols from /usr/lib/libgcc_s.so.1...done.
Loaded symbols for /usr/lib/libgcc_s.so.1
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/libnsl.so.1...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /lib/libssl.so.0...done.
Loaded symbols for /lib/libssl.so.0
Reading symbols from /lib/libcrypto.so.0...done.
Loaded symbols for /lib/libcrypto.so.0
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /lib/libdl.so.2...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /lib/libnss_files.so.2...done.
Loaded symbols for /lib/libnss_files.so.2
Reading symbols from /lib/libnss_dns.so.2...done.
Loaded symbols for /lib/libnss_dns.so.2
Reading symbols from /lib/libresolv.so.2...done.
Loaded symbols for /lib/libresolv.so.2
#0  free_banks () at bank.c:99
99            bank_next = bank->next;
(gdb) bt
#0  free_banks () at bank.c:99
#1  0x080f64cb in cleanup_memory () at comm.c:665
#2  0x080f6984 in main (argc=0, argv=0x0) at comm.c:896
Current language:  auto; currently c++
(gdb) list
896         cleanup_memory();
897       }
898
899       exit(0);
900       return 0;
901     }
902
903     bool remove_printf(char *fmt, ...)
904     {
905       char                    buf[MSL * 2];
(gdb)

I wonder...since there's a lot of symbol libs being loaded, could it be an issue with a symbol in the bank data?

free_banks function:
void free_banks(void)
{
  BANK_DATA              *bank, *bank_next;
  int                     hash;

  for(hash = 0; hash < 126; hash++)
  {
    for(bank = bank_index[hash]; bank; bank = bank_next)
    {
//**************************************
      bank_next = bank->next;
//^^^Crashes here^^^^^^^^^^^^^^^^
      unlink_bank(bank);
      free_bank(bank);
    }
  }
}

Would this only crash if there was no bank->next? Or, perhaps, a corrupted bank hash? Perhaps someone can help explain this bit of it to me a little more?

For those wondering: Yes, bank->next does exist elsewhere in the code, without issue...so far.

Anyways, any help in furthering my understanding would be greatly appreciated!
       
Pages:<< prev 1 next >>