Yardım Game.Core

  • Konuyu açan Konuyu açan Escobar1453
  • Açılış Tarihi Açılış Tarihi
  • Yanıt Yanıt 9
  • Gösterim Gösterim 121
Konu sahibi bu konuda soru soruyor. Sorusu ile ilgili bilgisi olanların yanıtlamasını bekliyor.

Escobar1453

Üye
Üye
Mesaj
46
Çözümler
1
Beğeni
13
Puan
299
Ticaret Puanı
0
1760884060611.webp


Random belirli belirsiz zamanlarda bu coreyi alıyorum sebebi ne olabilir?
 
Şuanda attığınız debug çıktısından herhangi bir şey anlamak mümkün değil, bundan dolayı MakeFile içerisindeki -g flagını -g3, -O flagını da -O0 yapıp compile ederseniz bir sonraki crash verdiğinde daha detaylı çıktı alabilirsiniz.
 
CFLAGS = -m32 -g -Wall -O2 -pipe -fexceptions -fno-strict-aliasing -pthread -D_THREAD_SAFE -DNDEBUG
CFLAGS += -Wno-deprecated-declarations -Wno-nonnull-compare -Wno-deprecated-declarations -Wno-array-bounds -Wno-address
CFLAGS += -Wno-int-in-bool-context -Wno-format-truncation -Wno-stringop-truncation -Wno-sign-compare
CXXFLAGS = -std=c++20 -Wl,-rpath=/usr/local/lib/gcc10


BENDE BU ŞEKİLDE ŞU AN -g3 -Wall -O0 yapayım mı?
 
CFLAGS = -m32 -g -Wall -O2 -pipe -fexceptions -fno-strict-aliasing -pthread -D_THREAD_SAFE -DNDEBUG
CFLAGS += -Wno-deprecated-declarations -Wno-nonnull-compare -Wno-deprecated-declarations -Wno-array-bounds -Wno-address
CFLAGS += -Wno-int-in-bool-context -Wno-format-truncation -Wno-stringop-truncation -Wno-sign-compare
CXXFLAGS = -std=c++20 -Wl,-rpath=/usr/local/lib/gcc10


BENDE BU ŞEKİLDE ŞU AN -g3 -Wall -O0 yapayım mı?
Evet -g3 ve -O0 haline getirin.
 
Evet -g3 ve -O0 haline getirin.
Öncesi char_manager:
Genişlet Daralt Kopyala
void CHARACTER_MANAGER::FlushPendingDestroy()
{
    using namespace std;

    m_bUsePendingDestroy = false;

    if (!m_set_pkChrPendingDestroy.empty())
    {
        sys_log(0, "FlushPendingDestroy size %d", m_set_pkChrPendingDestroy.size());

        CHARACTER_SET::iterator it = m_set_pkChrPendingDestroy.begin(),
            end = m_set_pkChrPendingDestroy.end();
        for ( ; it != end; ++it) {
            M2_DESTROY_CHARACTER(*it);
        }

        m_set_pkChrPendingDestroy.clear();
    }
}


Sonrası CHAR MANAGER:
Genişlet Daralt Kopyala
void CHARACTER_MANAGER::FlushPendingDestroy()
{
    using namespace std;
    m_bUsePendingDestroy = false;

    if (m_set_pkChrPendingDestroy.empty())
        return;

    sys_log(0, "FlushPendingDestroy size %zu", m_set_pkChrPendingDestroy.size());

    for (auto it = m_set_pkChrPendingDestroy.begin(); it != m_set_pkChrPendingDestroy.end(); ++it)
    {
        LPCHARACTER ch = *it;

        // 1?? Null pointer kontrolü
        if (!ch)
        {
            sys_err("FlushPendingDestroy: null pointer found in pending destroy list!");
            continue;
        }

        // 2?? Bu karakter hâlâ kayıtlı mı (çifte destroy kontrolü)
        bool found = false;
        for (const auto &kv : m_map_pkChrByVID)
        {
            if (kv.second == ch)
            {
                found = true;
                break;
            }
        }

        if (!found)
        {
            sys_err("FlushPendingDestroy: dangling pointer %p (already destroyed)", ch);
            continue; // zaten silinmiş, tekrar dokunma
        }

        // 3?? Gerçek silme işlemi (artık güvenli)
        M2_DESTROY_CHARACTER(ch);
    }

    m_set_pkChrPendingDestroy.clear();
}


char managerde bu şekilde bir düzenleme yaptım da sizce mantıklı mı?
 
Öncesi char_manager:
Genişlet Daralt Kopyala
void CHARACTER_MANAGER::FlushPendingDestroy()
{
    using namespace std;

    m_bUsePendingDestroy = false;

    if (!m_set_pkChrPendingDestroy.empty())
    {
        sys_log(0, "FlushPendingDestroy size %d", m_set_pkChrPendingDestroy.size());

        CHARACTER_SET::iterator it = m_set_pkChrPendingDestroy.begin(),
            end = m_set_pkChrPendingDestroy.end();
        for ( ; it != end; ++it) {
            M2_DESTROY_CHARACTER(*it);
        }

        m_set_pkChrPendingDestroy.clear();
    }
}


Sonrası CHAR MANAGER:
Genişlet Daralt Kopyala
void CHARACTER_MANAGER::FlushPendingDestroy()
{
    using namespace std;
    m_bUsePendingDestroy = false;

    if (m_set_pkChrPendingDestroy.empty())
        return;

    sys_log(0, "FlushPendingDestroy size %zu", m_set_pkChrPendingDestroy.size());

    for (auto it = m_set_pkChrPendingDestroy.begin(); it != m_set_pkChrPendingDestroy.end(); ++it)
    {
        LPCHARACTER ch = *it;

        // 1?? Null pointer kontrolü
        if (!ch)
        {
            sys_err("FlushPendingDestroy: null pointer found in pending destroy list!");
            continue;
        }

        // 2?? Bu karakter hâlâ kayıtlı mı (çifte destroy kontrolü)
        bool found = false;
        for (const auto &kv : m_map_pkChrByVID)
        {
            if (kv.second == ch)
            {
                found = true;
                break;
            }
        }

        if (!found)
        {
            sys_err("FlushPendingDestroy: dangling pointer %p (already destroyed)", ch);
            continue; // zaten silinmiş, tekrar dokunma
        }

        // 3?? Gerçek silme işlemi (artık güvenli)
        M2_DESTROY_CHARACTER(ch);
    }

    m_set_pkChrPendingDestroy.clear();
}


char managerde bu şekilde bir düzenleme yaptım da sizce mantıklı mı?
Önce core vermesini bekleyin, böyle yapay zeka işlemleri saçma sapan şeyler ortaya çıkarır bu işlere girmeyin.
 
CFLAGS = -m32 -g3 -Wall -O0 -pipe -fexceptions -fno-strict-aliasing -pthread -D_THREAD_SAFE -DNDEBUG
CFLAGS += -Wno-deprecated-declarations -Wno-nonnull-compare -Wno-deprecated-declarations -Wno-array-bounds -Wno-address
CFLAGS += -Wno-int-in-bool-context -Wno-format-truncation -Wno-stringop-truncation -Wno-sign-compare
CXXFLAGS = -std=c++20 -Wl,-rpath=/usr/local/lib/gcc10

bunu luginanın dediği gibi yaptım, start verince sunucuya fotoğraftaki hatayı aldım, lib değiştirince start verebildim. Eksik ya da hatalı olan ne burada?
 
Geri
Üst