Memory Manager - error

Tio Akima

New member
Messages
349
Points
0
Age
36
Discord
TioAkima#0636
Github
Tio Akima
Emulator
Hi guys, I'm having this error when I use a skill.

The skill TK_RUN ..

What does this mistake mean?

error.jpg


 
you using any plugins or mods? if yes, try on clean hercules.

error mostly mean memory corruption, but it not say where and why. In windows i not sure what exists any simple way to debug this.

 
you using any plugins or mods? if yes, try on clean hercules.

error mostly mean memory corruption, but it not say where and why. In windows i not sure what exists any simple way to debug this.
Thanks for answering.
This error is coming from the TK skill.
TK_RUN ...

I put a function in the skill. in Status.c
in case SC_RUN I put this call:

struct mob_data *md = bl;
skill->castend_nodamage_id(&md->bl, &md->bl, NPC_SELFDESTRUCTION, 1, timer->gettick(), 0); //mob explode


and it was thus:

case SC_RUN:
            {                    
                struct unit_data *ud = unit->bl2ud(bl);
                bool begin_spurt = true;
                // Note: this int64 value is stored in two separate int32 variables (FIXME)
                int64 starttick  = (int64)sce->val3&0x00000000ffffffffLL;
                      starttick |= ((int64)sce->val4<<32)&0xffffffff00000000LL;


                if (ud) {
                    if(!ud->state.running)
                        begin_spurt = false;
                    printf("enter 1 \n");  //console message
                    ud->state.running = 0;


                        struct mob_data *md = bl;               
                        skill->castend_nodamage_id(&md->bl, &md->bl, NPC_SELFDESTRUCTION, 1, timer->gettick(), 0);      
 //mob explode            
                
                    if (ud->walktimer != INVALID_TIMER){
                        unit->stop_walking(bl, STOPWALKING_FLAG_FIXPOS);
                        printf("enter 2 \n");  //console message                        
                        clif->specialeffect(bl, 223, AREA);        
                         printf("enter 3 \n");  //console message

                    }
                    
                }
                if (begin_spurt && sce->val1 >= 7
                 && DIFF_TICK(timer->gettick(), starttick) <= 1000
                 && (!sd || (sd->weapontype1 == W_FIST && sd->weapontype2 == W_FIST))
                )
                    sc_start(bl, bl,SC_STRUP,100,sce->val1,skill->get_time2(status->sc2skill(type), sce->val1));    
            }
            break;


-----------------------------------------------------------------------------------------------------------------------

Is it possible to correct this error?
Am I making the wrong call?

 
then yes this is your issue. you cast player to mob. and calling mod skill on player.

memory corruption is hercules issue, but normally no one call mob skill on player.

 
then yes this is your issue. you cast player to mob. and calling mod skill on player.

memory corruption is hercules issue, but normally no one call mob skill on player.
I understand...
I'm calling SC_RUN on a mob ... And then, when SC_RUN stops, I call that function highlighted in red.

The skill is: the player calling SC_RUN in mob.
But this is working. The memory problem is when I put the highlighted call in red.

Is there any way to fix it? any way to make that call without error?
Thanks for that help. <3

 
red code show call skill on PLAYER. this is not mob. this is your error.

 
Back
Top