Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Segfault in create_table with create_level.patch #1

Closed
shazame opened this issue Feb 18, 2013 · 2 comments
Closed

Segfault in create_table with create_level.patch #1

shazame opened this issue Feb 18, 2013 · 2 comments
Assignees
Labels

Comments

@shazame
Copy link
Collaborator

shazame commented Feb 18, 2013

#0 0x081c1d8d in create_table (td=0x0, table_name=0x81fdd22 "doors") at ../../src/database_manager.c:235
#1 0x081c2062 in add_game_result (gr=0x981d738) at ../../src/database_manager.c:279
#2 0x081c0e6d in statistic_add_sdoor (line=37, column=16) at ../../src/game_statistics.c:127
#3 0x081c0d16 in pfa_add_sdoor (line=37, column=16) at ../../src/pfamain.c:100
#4 0x08165214 in create_door (dd=0x981d728, broom=0x8227dc0) at sp_lev.c:662
#5 0x08167b98 in build_room (r=0x981d640, pr=0x0) at sp_lev.c:1641
#6 0x08168ed6 in load_rooms (fd=0x981d4c8) at sp_lev.c:2017
#7 0x0816b4d6 in load_special (name=0xbfc11908 "ring.lev") at sp_lev.c:2655
#8 0x080e89c0 in makemaz (s=0xbfc11908 "ring.lev") at mkmaze.c:549
#9 0x080e3757 in makelevel () at mklev.c:627
#10 0x080e494e in mklev () at mklev.c:927
#11 0x0804adf9 in newgame () at allmain.c:525
#12 0x081b6350 in main (argc=2, argv=0xbfc11bf4) at ../sys/unix/unixmain.c:278

@ghost ghost assigned medrimonia and shazame Feb 18, 2013
@medrimonia
Copy link
Owner

at #0, td value is 0x0, it seems that program doesn't go through td = doors_table, line 270 of database_manager.c?
table_name seems to be "doors", if so, why strcmp in 269 doesn't return 0?
Another possible source of this problem is that doors_table hasn't been initialized, it's needed to check if program goes through gs_init before.
The most plausible issue is that with a specific map, add_sdoor is called before pfa_init, if this is verified I'll fix it as soon as possible with data storing in game_statistics (storing doors, doors discovery etc... and sending all the datas when game is ended).

@medrimonia
Copy link
Owner

Fixed in statistics_cache branch, will be merged once some cleaning has been made in dev.

The issue is closed, if the fix doesn't work, it should be opened again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants