PDA

View Full Version : Trace post of my spell loading crash, why is spell_us loaded twice? is this normal?


Dakaar
09-24-2005, 12:38 PM
FIXED!

Seperator is buggy as hell, for new spells_us.txt you need 202 arguments not 200.
Last 200 lines shown, above this block is a open,memset,etc section similar to those right before the segfault, it opens spells_us.txt

read(5, "tion IV^PLAYER_1^0^^^Your body f"..., 4096) = 4096
read(5, "0^0^0^1^1^0\r\n7846^Wurine Distanc"..., 4096) = 4096
read(5, "254^254^254^254^254^6^0^14^-1^0^"..., 4096) = 4096
read(5, " Shadows^PLAYER_1^^^^^^^100^^0^0"..., 4096) = 4096
read(5, "3^0^-1^^0^0^0^0^0^0^0^0^0^0^0^0^"..., 4096) = 4096
read(5, "00^100^100^100^0^1^^0^254^254^25"..., 4096) = 4096
read(5, "^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0"..., 4096) = 4096
read(5, "^254^254^254^254^254^254^254^6^0"..., 4096) = 4096
read(5, "^3^10^0^0^0^5^0^0^0^0^0^0^0^0^0^"..., 4096) = 4096
read(5, "001^39186^^0^-1^-1^0^0^0^0^0^0^0"..., 4096) = 4096
read(5, "00^100^100^0^1^0^0^124^134^137^1"..., 4096) = 4096
read(5, "^10000^10000^10000^0^0^0^0^0^0^0"..., 4096) = 4096
read(5, "0^0^0^0^0^0^0^0^0^0^0^0^0^0^1^0\r"..., 4096) = 4096
read(5, "54^254^254^254^5^0^5^-1^0^0^255^"..., 4096) = 4096
read(5, "our skin burns.^\'s skin burns.^^"..., 4096) = 4096
read(5, "0^2^0^0^0^0^0^0^0^0^0^0^0^0^0^0^"..., 4096) = 4096
read(5, "^255^254^255^255^255^255^255^255"..., 4096) = 4096
read(5, "^0^0^0^0^0^0^0^0^0^0^0^0^0^2504^"..., 4096) = 4096
read(5, "1^-1^-1^-1^100^100^100^100^100^1"..., 4096) = 4096
read(5, "^0^255^255^255^255^255^255^255^2"..., 4096) = 4096
read(5, "^100^0^1^0^0^0^254^254^254^254^2"..., 4096) = 4096
read(5, "en exposed.^\'s defenses faulter."..., 4096) = 4096
read(5, "^1^1^1^-1^-1^-1^-1^100^100^100^1"..., 4096) = 4096
read(5, "55^255^255^42^13^0^51^0^0^0^0^0^"..., 4096) = 4096
read(5, "0^1^2250^2250^3^360^0^0^0^0^1800"..., 4096) = 4096
read(5, "^255^255^255^255^44^13^0^31^0^0^"..., 4096) = 4096
read(5, "0^0^0^0^60^0^0^0^0^0^0^0^0^0^0^0"..., 4096) = 4096
read(5, "100^100^100^100^100^100^100^100^"..., 4096) = 4096
read(5, "7^2116^-1^-1^-1^-1^1^1^1^1^-1^-1"..., 4096) = 4096
read(5, "1^^^^You have been hit by a tran"..., 4096) = 4096
read(5, "^254^254^254^254^254^254^5^0^98^"..., 4096) = 4096
read(5, "0\r\n8162^Pyromantic Ignition^PLAY"..., 4096) = 4096
read(5, "^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0"..., 4096) = 4096
read(5, "45^^0^0^0^0^0^0^0^0^0^0^0^0^0^0^"..., 4096) = 4096
read(5, "00^100^100^100^100^100^100^0^1^0"..., 4096) = 4096
read(5, "^0^0^0^0^0^0^0^0^0^0^2519^2053^-"..., 4096) = 4096
read(5, "mand^PLAYER_1^^^^You have been c"..., 4096) = 4096
read(5, "4^254^254^5^0^14^-1^8^0^255^255^"..., 4096) = 4096
read(5, "^-1^-1^1^1^1^1^-1^-1^-1^-1^100^1"..., 4096) = 4096
read(5, "0^1^1^0\r\n8216^Greater Rabid Bear"..., 4096) = 4096
read(5, "g mites have been killed.^0^150^"..., 4096) = 4096
read(5, "0^0^0^0^2503^2119^-1^-1^-1^-1^1^"..., 4096) = 4096
read(5, "000^0^0^0^300^-1002^-750^48^245^"..., 4096) = 4096
read(5, " Pin^PLAYER_1^^^^You are pricked"..., 4096) = 4096
read(5, "5^255^255^255^255^255^255^255^25"..., 4096) = 4096
read(5, "^-1^-1^1^1^1^1^-1^-1^-1^-1^100^1"..., 4096) = 4096
read(5, "ers a deep sleep.^You shake off "..., 4096) = 4096
read(5, "^0^51^^0^0^0^0^0^0^0^0^0^0^0^0^0"..., 4096) = 4096
read(5, "^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0^0"..., 4096) = 4096
read(5, "255^42^0^0^7^0^0^0^0^0^0^0^0^0^0"..., 4096) = 4096
read(5, ".^The vitality fades.^100^^0^0^5"..., 4096) = 4096
read(5, "^0^0^100^0^16^211^0^0^0^1^0^0^0^"..., 4096) = 4096
read(5, "0^0^0^0^2507^2116^-1^-1^-1^-1^1^"..., 4096) = 4096
read(5, "^15^0^0^0^0^0^0^0^0^0^0^0^0^0^0^"..., 4096) = 4096
read(5, "^5000^2250^2250^10^5^0^0^1^0^0^0"..., 4096) = 4096
read(5, "255^255^44^^0^12^0^0^0^0^0^0^0^0"..., 4096) = 4096
read(5, "^1000^2250^12000^0^0^0^20^4000^0"..., 4096) = 4096
read(5, "1^-1^-1^-1^100^100^100^100^100^1"..., 4096) = 4096
--- SIGPROF (Profiling timer expired) @ 0 (0) ---
sigreturn() = ? (mask now [])
read(5, "ng body is wrapped in darkness.^"..., 4096) = 4096
read(5, "1^1^1^1^-1^-1^-1^-1^100^100^100^"..., 4096) = 4096
read(5, "ggers.^^200^^0^0^6000^2500^2250^"..., 4096) = 4096
read(5, "100^100^100^100^100^100^100^100^"..., 4096) = 4096
read(5, "513^^^^0^0^0^0^0^0^0^0^0^0^0^0^0"..., 4096) = 4096
read(5, "5^255^255^255^255^255^255^255^42"..., 4096) = 4096
read(5, "n.^ is encased in the corona of "..., 4096) = 4096
read(5, "100^100^100^100^100^0^1^0^0^132^"..., 4096) = 4096
read(5, "0^0^0^0^1^0\r\n8397^Rite of Draygu"..., 4096) = 3464
read(5, "", 4096) = 0
close(5) = 0
munmap(0xb4542000, 4096) = 0
time([1127605535]) = 1127605535
write(1, "[Status] libEMuShareMem.so loade"..., 34) = 34
write(4, "17378 [09.24. - 18:45:35] libEMu"..., 51) = 51
stat64(".", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
semget(1392738321, 1, 0666) = -1 ENOENT (No such file or directory)
semget(1392738321, 1, IPC_CREAT|0666) = 10387464
semctl(10387464, 0, IPC_64|SETVAL, 0xbf893b34) = 0
shmget(1392738321, 7462132, IPC_CREAT|IPC_EXCL|0600) = 8781829
shmat(8781829, 0, 0x180) = 0xb3e25000
semctl(10387464, 0, IPC_64|IPC_RMID, 0xbf893b34) = 0
--- SIGPROF (Profiling timer expired) @ 0 (0) ---
sigreturn() = ? (mask now [])
--- SIGPROF (Profiling timer expired) @ 0 (0) ---
sigreturn() = ? (mask now [])
--- SIGPROF (Profiling timer expired) @ 0 (0) ---
sigreturn() = ? (mask now [])
--- SIGPROF (Profiling timer expired) @ 0 (0) ---
sigreturn() = ? (mask now [])
--- SIGPROF (Profiling timer expired) @ 0 (0) ---
sigreturn() = ? (mask now [])
--- SIGPROF (Profiling timer expired) @ 0 (0) ---
sigreturn() = ? (mask now [])
--- SIGPROF (Profiling timer expired) @ 0 (0) ---
sigreturn() = ? (mask now [])
--- SIGPROF (Profiling timer expired) @ 0 (0) ---
sigreturn() = ? (mask now [])
--- SIGPROF (Profiling timer expired) @ 0 (0) ---
sigreturn() = ? (mask now [])
--- SIGPROF (Profiling timer expired) @ 0 (0) ---
sigreturn() = ? (mask now [])
--- SIGPROF (Profiling timer expired) @ 0 (0) ---
sigreturn() = ? (mask now [])
--- SIGPROF (Profiling timer expired) @ 0 (0) ---
sigreturn() = ? (mask now [])
--- SIGPROF (Profiling timer expired) @ 0 (0) ---
sigreturn() = ? (mask now [])
--- SIGPROF (Profiling timer expired) @ 0 (0) ---
sigreturn() = ? (mask now [])
--- SIGPROF (Profiling timer expired) @ 0 (0) ---
sigreturn() = ? (mask now [])
--- SIGPROF (Profiling timer expired) @ 0 (0) ---
sigreturn() = ? (mask now [])
--- SIGPROF (Profiling timer expired) @ 0 (0) ---
sigreturn() = ? (mask now [])
time([1127605535]) = 1127605535
write(1, "[Status] FileLoadSPDat() Loading"..., 61) = 61
write(4, "17378 [09.24. - 18:45:35] FileLo"..., 78) = 78
open("./spells_us.txt", O_RDONLY|O_LARGEFILE) = 5
fstat64(5, {st_mode=S_IFREG|0664, st_size=4771208, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb3e24000
read(5, "0^^BLUE_TRAIL^^^^^^^^^0^0^0^0^0^"..., 4096) = 4096
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++

Dakaar
09-24-2005, 01:29 PM
Update!
I put a debug message in my fileloadspdat() function.
During the run where I crash, it reaches the fgets(spell_line, sizeof(spell_line), sf);
twice, after the 2nd run, it crashes.

Is this because my SPDAT_RECORDS is > 0 and the spellspointer is equal to 0?

Okay I was looking at the trace again.

Only the second open has the following lines:
write(1, "[Status] FileLoadSPDat() Loading"..., 61) = 61
write(4, "17466 [09.24. - 19:10:40] FileLo"..., 78) = 78


Seems to me that its crashing in zone\net.cpp after the first line is read, and probably cant find the sp pointer or similar.

I wonder if i have a problem with the seperator object, as its not used in the dll load that may have something to do with it?

Is the first open the DLL open and the second the zone binary open? Are both supposed to load spells?

Dakaar
09-24-2005, 02:57 PM
Fixed! Seperator sep and int y = 0 are redefined every step of the loot.

Declare y in the beginning of the function and seperator sep must become a pointer!

edit: i get a fault with my delete , what am I doing wrong?
I think the problem is that on the last line, the new seperator does not return a correct pointer.



Zone loads fine if i have no delete, I put it at the end of the while loop, so not entirely sure what i did wrong.

add:
+ Seperator *sep = NULL;
+ int y = 0;

in the top of the function

change
- Seperator sep(spell_line, '^', 200, 100, false, 0, 0, false);
+ sep = new Seperator(spell_line, '^', 200, 100, false, 0, 0, false);

+ if(sep != NULL)
+ delete sep;


change all sep.(whatever) to sep->(whatever)
and add an additional if(sep) delete sep; line at the end of the function after the loop exits.