Segmentation Fault (Core Dumbed) - Błąd se...
NoLiFeR
26.11.2015
PS Tak, nie wiedziałem jak nazwać temat
Witam.
Problem pojawia się specyficznie, nie o jakiejs określonej godzinie, ani podczas wywoływania określonych czynności.
W logach nie ma żadnych błędów. Tak samo w konsoli
Debugując metodą "diodową?" udało mi się ustalić który public powoduje blad, lecz nie moge znaleść w nim żadnego uszkodzenia które mogło by powodować wyciek pamięci..
public fw_touch(bullet, ent) { #if defined DEBUG log_to_file("paintballgun.log", "fw_touch pre"); #endif new class[20]; pev(bullet, pev_classname, class, 19); if (!equali(class, "pbBullet") && !equali(class, "pbHarmlessBullet")) return FMRES_IGNORED; new owner = pev(bullet, pev_owner); new Float:origin[3], class2[20]; pev(ent, pev_classname, class2, 19); pev(bullet, pev_origin, origin); new hit; hit = random(15); if (equali(class, "pbExplosive")){ //it is a nade new Float:gametime = get_gametime(); //if it hits something after this time, explode if (gametime-lastshot[owner] > 0.5){ act_explode(bullet); set_pev(bullet, pev_velocity, Float:{0.0, 0.0, 0.0}); set_pev(bullet, pev_classname, "pbPaint"); set_pev(bullet, pev_solid, 0); set_pev(bullet, pev_movetype, 0); engfunc(EngFunc_SetModel, bullet, "sprites/paintball.spr"); new a, findpb = 0; while (a++ < g_pbcount && !findpb) if (g_paintballs[a] == bullet) findpb = g_pbstatus[a] = 2; remove_task(bullet); remove_task(bullet+TASK_PB_RESET); paint_reset(bullet+TASK_PB_RESET); return FMRES_HANDLED; } else if (!equali(class2, "pbBullet")&&!equali(class2, "pbHarmlessBullet")&&get_pcvar_num(gravity)){ //make it bounce and loose some velocity new Float:vel[3]; pev(bullet,pev_velocity,vel); vel[0] /= 5.0; vel[1] /= 5.0; vel[2] /= 5.0; set_pev(bullet, pev_velocity, vel); if (!is_user_alive(ent)) //make damage to world stuff ExecuteHam(Ham_TakeDamage, ent, owner, owner, get_pcvar_float(damage), 10); return FMRES_IGNORED; } } //The bullet hits or bounces if (IsPlayer(ent)) //make damage { if (owner == ent || pev(ent, pev_takedamage) == DAMAGE_NO) return FMRES_IGNORED; if (get_user_team(owner) == get_user_team(ent)) if (!get_pcvar_num(friendlyfire)) return FMRES_IGNORED; if (hit != 0 && !equali(class, "pbHarmlessBullet")){ if(ochronka[ent] == 0) { ExecuteHam(Ham_TakeDamage, ent, owner, owner, get_pcvar_float(damage), 4098); } else { if (get_pcvar_num(gravity)){ new Float:vel[3]; pev(bullet,pev_velocity,vel); vel[0] /= 10.0; vel[1] /= 10.0; vel[2] /= 10.0; set_pev(bullet, pev_velocity, vel); } set_pev(bullet, pev_classname, "pbHarmlessBullet"); ochronka[ent]-- return FMRES_IGNORED; } } } if (!equali(class2, "pbBullet")&&!equali(class2, "pbHarmlessBullet")) if (hit != 0 || !get_pcvar_num(pellets_real)) { //stop the pellet and make a splat set_pev(bullet, pev_velocity, Float:{0.0, 0.0, 0.0}); set_pev(bullet, pev_classname, "pbPaint"); set_pev(bullet, pev_solid, 0); set_pev(bullet, pev_movetype, 0); engfunc(EngFunc_SetModel, bullet, "sprites/paintball.spr"); new a, findpb = 0; while (a++ < g_pbcount && !findpb) if (g_paintballs[a] == bullet) findpb = g_pbstatus[a] = 2; remove_task(bullet); remove_task(bullet+TASK_PB_RESET); if (get_pcvar_num(sound)) { static wav[20]; formatex(wav, 20, is_user_alive(ent) ? "player/pl_pain%d.wav" : "misc/pb%d.wav", is_user_alive(ent) ? random_num(4,7) : random_num(1,4)); emit_sound(bullet, CHAN_AUTO, wav, 1.0, ATTN_NORM, 0, PITCH_NORM); } new bool:valid_surface = (IsPlayer(ent) || containi(class2, "door") != -1) ? false : true; if (pev(ent, pev_health) && !IsPlayer(ent)) { ExecuteHam(Ham_TakeDamage, ent, owner, owner, float(pev(ent, pev_health)), 0); valid_surface = false; } if (valid_surface) { paint_splat(bullet); set_task(float(get_pcvar_num(blife)), "paint_reset", bullet+TASK_PB_RESET); } else paint_reset(bullet+TASK_PB_RESET); return FMRES_HANDLED; }else { //the pellet bounces, reduce its speed if (get_pcvar_num(gravity)){ new Float:vel[3]; pev(bullet,pev_velocity,vel); vel[0] /= 10.0; vel[1] /= 10.0; vel[2] /= 10.0; set_pev(bullet, pev_velocity, vel); } //A bullet that bounces becomes harmless to players set_pev(bullet, pev_classname, "pbHarmlessBullet"); return FMRES_IGNORED; } /*else { paint_reset(bullet+TASK_PB_RESET); return FMRES_HANDLED; } */ #if defined DEBUG log_to_file("paintballgun.log", "paint_fire post"); #endif return FMRES_IGNORED; }
Dzięki i cześć.
Dopisywałem -dev, i nadal nic poza przepelnieniem bufora wiadomości, który udało mi się już naprawić.
Na serwerze znajduje się tylko pb oraz amxbans, który nie może powodować błędów (jest na 3 innych serwerach.)
Użytkownik NoLiFeR edytował ten post 26.11.2015 17:09
NoLiFeR
26.11.2015
Powie mi ktoś po co za każdą zmianą modelu plugin wymusza "myślenie" bytów ? :q
public fw_setmodel(ent, model[]) { if (get_pcvar_num(death) && pev_valid(ent)) { new id = pev(ent, pev_owner); if ((!is_user_alive(id) || task_exists(id + 200)) && equali(model, "models/w_", 9) && !equali(model, "models/w_weaponbox.mdl")) { new classname[16]; pev(ent, pev_classname, classname, 15); if (equal(classname, "weaponbox") && !equal(model, "models/w_backpack.mdl")) for (new i = maxplayers + 1; i < engfunc(EngFunc_NumberOfEntities) + 5; i++) if (pev_valid(i)) if (ent == pev(i, pev_owner)) { dllfunc(DLLFunc_Think, ent); return FMRES_IGNORED; } } } return FMRES_IGNORED; }
NoLiFeR
27.11.2015
A także 'Too many entities in visible packet list'
Może to coś oznaczać ?
NoLiFeR
28.11.2015
Tamten błąd udało mi się zniwelować, ale pojawił się nowy : Got a velocity too low on pbBullet.
Coś z prędkością kuli ?
NoLiFeR
28.11.2015
Python Exception <class 'gdb.MemoryError'> Cannot access memory at address 0x43010004:
debug.cmds:1: Error in sourced command file:
Cannot access memory at address 0x43010004
Pojawił się taki błąd.
NoLiFeR
30.11.2015
Jakimś cudem przez 2 dni nie było crasha, lecz dzisiaj pare minut temu znowu mnie on spotkał Sypiąc takimi logami
Najbardziej niepokoi mnie to
bottomcolor unchanged for HLTV Proxy topcolor unchanged for HLTV Proxy
oraz
Too many entities in visible packet list.
jakieś 40-50 razy pod rząd w konsoli. Nie dzieje się to bezpośrednio przed crashem, ale chb ma z nim związek.