Giter Site home page Giter Site logo

Strange GC behaviour about berry HOT 14 CLOSED

AlixANNERAUD avatar AlixANNERAUD commented on June 17, 2024
Strange GC behaviour

from berry.

Comments (14)

s-hadinger avatar s-hadinger commented on June 17, 2024 1

You mean calling be_free() on a null pointer? I can indeed add a test.

from berry.

s-hadinger avatar s-hadinger commented on June 17, 2024 1

Done.

from berry.

s-hadinger avatar s-hadinger commented on June 17, 2024

Can you share the function Berry_Instruction_Class_Initialize?

from berry.

AlixANNERAUD avatar AlixANNERAUD commented on June 17, 2024

Yes, here it is :

void *Berry_Instruction_Class_Initialize(bvm* V)
{
    void* Pointer = be_malloc(V, sizeof(Instruction_Class));
 
    Log_Verbose("Initialize instruction : %p", Pointer);
    
    return Pointer;
}
BE_FUNC_CTYPE_DECLARE(Berry_Instruction_Class_Initialize, "+_p", "@");

What does this have to do with anything? Is this function not supposed to intervene? Because the object is already instantiated by Berry_This_Get_Instruction

from berry.

s-hadinger avatar s-hadinger commented on June 17, 2024

I wanted to check how you did the allocation as well. I can't reproduce the problem, I'm doing exactly the same scheme with int64 and it works flawleslly.

Can you also share the full stacktrace? What's calling be_realloc is what's most interesting. It can't be be_free() because in such case this portion of code is not reachable.

from berry.

AlixANNERAUD avatar AlixANNERAUD commented on June 17, 2024

Well, here is the full file Instruction_Type file :

#include "Software/Berry/Berry.hpp"
extern "C"
{
#include "be_constobj.h"
#include "be_mapping.h"
}

using namespace Xila_Namespace;

void *Berry_Instruction_Class_Initialize(bvm* V, Module_Class *Sender = NULL, Module_Class *Receiver = NULL)
{
    void* Pointer = be_malloc(V, sizeof(Instruction_Class));
    if ((Sender == NULL) && (Receiver == NULL))
        Pointer = new (Pointer) Instruction_Class();
    else
        Pointer = new (Pointer) Instruction_Class(Sender, Receiver);

    Log_Verbose("Instruction", "Initialize instruction : %p / %p / %p", Pointer, Sender, Receiver);
    
    return Pointer;
}

BE_FUNC_CTYPE_DECLARE(Berry_Instruction_Class_Initialize, "+_p", "@[..");

void Berry_Instruction_Class_Deinitialize(bvm* V, Instruction_Class *Instruction)
{
    Log_Verbose("Instruction", "Deinitialize : %p", Instruction);
    be_free(V, Instruction, sizeof(Instruction_Class));
}
BE_FUNC_CTYPE_DECLARE(Berry_Instruction_Class_Deinitialize, "", "@.");

void Berry_Instruction_Class_Set_Sender(Instruction_Class *Instruction, Module_Class *Sender)
{
    Instruction->Set_Sender(Sender);
}
BE_FUNC_CTYPE_DECLARE(Berry_Instruction_Class_Set_Sender, "", "..");

void Berry_Instruction_Class_Set_Receiver(Instruction_Class *Instruction, Module_Class *Receiver)
{
    Instruction->Set_Receiver(Receiver);
}
BE_FUNC_CTYPE_DECLARE(Berry_Instruction_Class_Set_Receiver, "", "..");

void *Berry_Instruction_Class_Get_Sender(Instruction_Class *Instruction)
{
    return Instruction->Get_Sender();
}
BE_FUNC_CTYPE_DECLARE(Berry_Instruction_Class_Get_Sender, "c", ".");

void *Berry_Instruction_Class_Get_Receiver(Instruction_Class *Instruction)
{
    return Instruction->Get_Receiver();
}
BE_FUNC_CTYPE_DECLARE(Berry_Instruction_Class_Get_Receiver, "c", ".");

int Berry_Instruction_Class_Graphics_Get_Code(Instruction_Class *Instruction)
{
    return (int)Instruction->Graphics.Get_Code();
}
BE_FUNC_CTYPE_DECLARE(Berry_Instruction_Class_Graphics_Get_Code, "i", ".");

void *Berry_Instruction_Class_Graphics_Get_Target(bvm* V, Instruction_Class *Instruction)
{
    Graphics_Types::Object_Type *Pointer = (Graphics_Types::Object_Type *)be_malloc(V, sizeof(Graphics_Types::Object_Type));
    return new (Pointer) Graphics_Types::Object_Type(Instruction->Graphics.Get_Target());
}
BE_FUNC_CTYPE_DECLARE(Berry_Instruction_Class_Graphics_Get_Target, "Graphics.Object_Type", "@.");

void *Berry_Instruction_Class_Graphics_Get_Current_Target(bvm* V, Instruction_Class *Instruction)
{
    Graphics_Types::Object_Type *Pointer = (Graphics_Types::Object_Type *)be_malloc(V, sizeof(Graphics_Types::Object_Type));
    return new (Pointer) Graphics_Types::Object_Type(Instruction->Graphics.Get_Current_Target());
}
BE_FUNC_CTYPE_DECLARE(Berry_Instruction_Class_Graphics_Get_Current_Target, "Graphics.Object_Type", "@.");

int Berry_Instruction_Class_Softwares_Get_Code(Instruction_Class *Instruction)
{
    return (int)Instruction->Softwares.Get_Code();
}
BE_FUNC_CTYPE_DECLARE(Berry_Instruction_Class_Softwares_Get_Code, "i", ".");

/* @const_object_info_begin
class be_class_Berry_Instruction_Type(scope:global, name:Instruction_Type)
{
    _p, var
    init, ctype_func(Berry_Instruction_Class_Initialize)
    deinit, ctype_func(Berry_Instruction_Class_Deinitialize)
    Set_Sender, ctype_func(Berry_Instruction_Class_Set_Sender)
    Set_Receiver, ctype_func(Berry_Instruction_Class_Set_Receiver)
    Get_Sender, ctype_func(Berry_Instruction_Class_Get_Sender)
    Get_Receiver, ctype_func(Berry_Instruction_Class_Get_Receiver)
    Graphics_Get_Code, ctype_func(Berry_Instruction_Class_Graphics_Get_Code)
    Graphics_Get_Target, ctype_func(Berry_Instruction_Class_Graphics_Get_Target)
    Graphics_Get_Current_Target, ctype_func(Berry_Instruction_Class_Graphics_Get_Current_Target)
    Softwares_Get_Code, ctype_func(Berry_Instruction_Class_Softwares_Get_Code)
}
@const_object_info_end */

extern "C"
{
#include "../generate/be_fixed_be_class_Berry_Instruction_Type.h"
}

Here the This module file :

#include "Software/Berry/Berry.hpp"
extern "C"
{
#include "be_constobj.h"
#include "be_mapping.h"
}

using namespace Xila_Namespace;

void *Berry_This_Get_Instruction(bvm *Virtual_Machine_Instance)
{
    Log_Verbose("This", "VM : %p", Virtual_Machine_Instance);

    void* Pointer = be_malloc(Virtual_Machine_Instance, sizeof(Instruction_Type));

    Log_Verbose("This", "Get_Instruction : %p ", Pointer);

    return new (Pointer) Instruction_Type(Berry_Class::Get_Instance(Virtual_Machine_Instance)->Get_Instruction());
}
BE_FUNC_CTYPE_DECLARE(Berry_This_Get_Instruction, "Instruction_Type", "@");

int Berry_This_Instruction_Available(bvm *Instance)
{
    return (int)Berry_Class::Get_Instance(Instance)->Instruction_Available();
}
BE_FUNC_CTYPE_DECLARE(Berry_This_Instruction_Available, "i", "@");

Graphics_Types::Window_Type *Berry_This_Get_Window(bvm *Virtual_Machine)
{
    void* Pointer = be_malloc(Virtual_Machine, sizeof(Graphics_Types::Window_Type));
    Log_Verbose("This", "Get_Window : %p / %p", Berry_Class::Get_Instance(Virtual_Machine), &Berry_Class::Get_Instance(Virtual_Machine)->Window);
    return new (Pointer) Graphics_Types::Window_Type(Berry_Class::Get_Instance(Virtual_Machine)->Window);
}
BE_FUNC_CTYPE_DECLARE(Berry_This_Get_Window, "Graphics.Window_Type", "@")

void Berry_This_Delay(bvm* Instance, int Delay)
{
    Berry_Class::Get_Instance(Instance)->Main_Task.Delay(Delay);
}
BE_FUNC_CTYPE_DECLARE(Berry_This_Delay, "", "@i");


void* Berry_This_Get_This(bvm* Instance)
{
    Module_Class* Pointer = (Module_Class*)Berry_Class::Get_Instance(Instance);
    Log_Verbose("This", "Get_This : %p", Pointer);
    return Pointer;
}
BE_FUNC_CTYPE_DECLARE(Berry_This_Get_This, "c", "@");


void Berry_This_Delay_Microseconds(int Delay)
{
    Task_Type::Delay_Microseconds(Delay);
}
BE_FUNC_CTYPE_DECLARE(Berry_This_Delay_Microseconds, "", "i");

/*
@const_object_info_begin
module This (scope:global)
{
    Get_Instruction, ctype_func(Berry_This_Get_Instruction)
    Instruction_Available, ctype_func(Berry_This_Instruction_Available)
    Get_Window, ctype_func(Berry_This_Get_Window)
    Get_This, ctype_func(Berry_This_Get_This)
    Delay, ctype_func(Berry_This_Delay)
    Delay_Microseconds, ctype_func(Berry_This_Delay_Microseconds)
}
@const_object_info_end
*/

extern "C"
{
    #include "../generate/be_fixed_This.h"
}

and here the full stack trace :

| 175813 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 175813 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe67bc 
| 175933 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 175933 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe67fc 
| 176002 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 176003 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe683c 
| 176073 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 176073 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe687c 
| 176142 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 176143 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe1cac 
| 176213 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 176213 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe1cec 
| 176282 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 176283 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe1d2c 
| 176353 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 176353 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe1d6c 
| 176422 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 176423 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe1dac 
| 176493 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 176493 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe1dec 
| 176562 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 176563 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe1e2c 
| 176633 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 176633 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe1e6c 
| 176702 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 176703 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe68f4 
| 176773 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 176773 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe6934 
| 176842 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 176843 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe6974 
| 176913 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 176913 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe69b4 
| 176982 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 176983 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe69f4 
| 177053 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 177053 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe6a34 
| 177122 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 177123 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe6a74 
| 177193 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 177193 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe6acc 
| 177262 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 177263 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe6b0c 
| 177333 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 177333 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe6b4c 
| 177402 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 177403 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe6b8c 
| 177473 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 177473 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe6bcc 
| 177542 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 177543 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe6c0c 
| 177613 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 177613 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe6c4c 
| 177682 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 177683 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe6c8c 
| 177753 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 177753 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe7304 
| 177822 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 177823 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe7344 
| 177893 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 177893 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe7384 
| 177962 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 177963 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe73c4 
| 178033 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 178033 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe7404 
| 178102 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 178103 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe7444 
| 178173 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 178173 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe7484 
| 178243 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 178243 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe74dc 
| 178312 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 178313 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe751c 
| 178382 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 178383 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe755c 
| 178452 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 178453 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe759c 
| 178523 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 178523 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe75dc 
| 178592 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 178593 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe761c 
| 178663 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 178663 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe765c 
| 178732 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 178733 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe769c 
| 178803 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 178803 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe7004 
| 178872 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 178873 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe7044 
| 178942 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 178943 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe7084 
Instruction received : Instruction_Type
Graphics instruction
Execute instruction end
Instruction executed
Instruction available
Execute instruction
| 179012 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 179013 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe70c4 
Instruction received : Instruction_Type
Graphics instruction
Execute instruction end
Instruction executed
Instruction available
Execute instruction
| 179083 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 179083 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe7104 
| 179152 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 179153 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe7144 
| 179223 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 179223 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe7184 
| 179292 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 179293 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe8164 
| 179362 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 179363 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe81a4 
| 179432 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 179433 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe81e4 
| 179503 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 179503 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe8224 
| 179572 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 179573 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe8264 
| 179642 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 179643 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe82a4 
| 179712 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 179713 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe82e4 
| 179782 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 179783 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe8324 
| 179852 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 179853 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe7f74 
| 179923 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 179923 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe7fb4 
| 179992 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 179993 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe7ff4 
| 180062 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 180063 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe8034 
| 180132 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 180133 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe8074 
| 180202 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 180203 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe80b4 
| 180272 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 180273 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe80f4 
| 180342 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 180343 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe856c 
| 180412 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 180413 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe85ac 
| 180482 ms | This.Berry_This_Get_Instruction() | (This.cpp:12) |  Verbose | VM : 0x3ffdfd58
| 180483 ms | This.Berry_This_Get_Instruction() | (This.cpp:16) |  Verbose | Get_Instruction : 0x3ffe85ec 
| 180493 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe85ac
| 180504 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe856c
| 180515 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe80f4
| 180526 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe80b4
| 180537 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe8074
| 180548 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe8034
| 180559 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe7ff4
| 180570 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe7fb4
| 180581 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe7f74
| 180592 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe8324
| 180603 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe82e4
| 180615 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe82a4
| 180626 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe8264
| 180637 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe8224
| 180648 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe81e4
| 180659 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe81a4
| 180670 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe8164
| 180681 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe7184
| 180692 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe7144
| 180703 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe7104
| 180715 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe70c4
| 180726 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe7084
| 180737 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe7044
| 180748 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe7004
| 180759 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe769c
| 180770 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe765c
| 180781 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe761c
| 180792 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe75dc
| 180804 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe759c
| 180815 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe755c
| 180826 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe751c
| 180837 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe74dc
| 180848 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe7484
| 180859 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe7444
| 180870 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe7404
| 180881 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe73c4
| 180892 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe7384
| 180903 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe7344
| 180915 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe7304
| 180926 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe6c8c
| 180937 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe6c4c
| 180948 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe6c0c
| 180959 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe6bcc
| 180970 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe6b8c
| 180981 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe6b4c
| 180992 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe6b0c
| 181003 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe6acc
| 181015 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe6a74
| 181026 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe6a34
| 181037 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe69f4
| 181048 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe69b4
| 181059 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe6974
| 181070 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe6934
| 181081 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe68f4
| 181092 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe1e6c
| 181103 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe1e2c
| 181115 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe1dec
| 181126 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe1dac
| 181137 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe1d6c
| 181148 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe1d2c
| 181159 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe1cec
| 181170 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe1cac
| 181181 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe687c
| 181192 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe683c
| 181203 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe67fc
| 181215 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe67bc
Throw exception: 2
| 181228 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe85ac
| 181239 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe856c
| 181250 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe80f4
| 181261 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe80b4
| 181272 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe8074
| 181283 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe8034
| 181294 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe7ff4
| 181305 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe7fb4
| 181316 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe7f74
| 181327 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe8324
| 181339 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe82e4
| 181350 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe82a4
| 181361 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe8264
| 181372 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe8224
| 181383 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe81e4
| 181394 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe81a4
| 181405 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe8164
| 181416 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe7184
| 181427 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe7144
| 181439 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe7104
| 181450 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe70c4
| 181461 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe7084
| 181472 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe7044
| 181483 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe7004
| 181494 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe769c
| 181505 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe765c
| 181516 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe761c
| 181527 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe75dc
| 181539 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe759c
| 181550 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe755c
| 181561 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe751c
| 181572 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe74dc
| 181583 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe7484
| 181594 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe7444
| 181605 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe7404
| 181616 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe73c4
| 181627 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe7384
| 181639 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe7344
| 181650 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe7304
| 181661 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe6c8c
| 181672 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe6c4c
| 181683 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe6c0c
| 181694 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe6bcc
| 181705 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe6b8c
| 181716 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe6b4c
| 181727 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe6b0c
| 181739 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe6acc
| 181750 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe6a74
| 181761 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe6a34
| 181772 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe69f4
| 181783 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe69b4
| 181794 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe6974
| 181805 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe6934
| 181816 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe68f4
| 181827 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe1e6c
| 181839 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe1e2c
| 181850 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe1dec
| 181861 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe1dac
| 181872 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe1d6c
| 181883 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe1d2c
| 181894 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe1cec
| 181905 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe1cac
| 181916 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe687c
| 181927 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe683c
| 181939 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe67fc
| 181950 ms | Instruction.Berry_Instruction_Class_Deinitialize() | (Instruction.cpp:27) |  Verbose | Deinitialize : 0x3ffe67bc
Throw exception: 2

abort() was called at PC 0x4018ab13 on core 1


Backtrace: 0x400844e9:0x3ffe6340 0x4008fd05:0x3ffe6360 0x400961e9:0x3ffe6380 0x4018ab13:0x3ffe6400 0x4018c646:0x3ffe6420 0x401cc80a:0x3ffe6440 0x4019a0af:0x3ffe6460 0x4019a236:0x3ffe64c0 0x401911f0:0x3ffe64e0 0x40191449:0x3ffe6500 0x4018b635:0x3ffe6520 0x4018b931:0x3ffe6540 0x401913d9:0x3ffe6560 0x400dac38:0x3ffe6580 0x400ddefd:0x3ffe65a0 0x400ddf45:0x3ffe65d0 0x400de2f5:0x3ffe65f0 0x400fb34d:0x3ffe6640

  #0  0x400844e9:0x3ffe6340 in panic_abort at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/esp_system/panic.c:408
  #1  0x4008fd05:0x3ffe6360 in esp_system_abort at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/esp_system/esp_system.c:137
  #2  0x400961e9:0x3ffe6380 in abort at /Users/ficeto/Desktop/ESP32/ESP32S2/esp-idf-public/components/newlib/abort.c:46
  #3  0x4018ab13:0x3ffe6400 in be_throw at lib/berry/src/be_exec.c:87
  #4  0x4018c646:0x3ffe6420 in be_realloc at lib/berry/src/be_mem.c:108
  #5  0x401cc80a:0x3ffe6440 in Berry_Object_Class_Deinitialize_607AD9B3_9A5E_4076_89DD_81ED8038C914(bvm*, Xila_Namespace::Graphics_Types::Object_Class*) at lib/Xila/src/Software/Berry/Interpreter/Generator/Generated/Graphics.cpp:33
  #6  0x4019a0af:0x3ffe6460 in be_call_c_func at lib/berry_mapping/src/be_class_wrapper.c:464 (discriminator 1)

from berry.

s-hadinger avatar s-hadinger commented on June 17, 2024

Thanks. The stacktrace shows that the crash appears in Berry_Object_Class_Deinitialize. You haven't included the source code for this one.

Please bear in mind that deinit() is a last chance and very constraint: you cannot allocate memory, and you cannot throw an exception.

What appears here is that an exception is thrown during GC, which aborts the last phase of cleaning. This is why a new GC is triggered right after, and wrongly deinits objects a second time.

from berry.

AlixANNERAUD avatar AlixANNERAUD commented on June 17, 2024

Sorry,
Here is object_type init / deinit functions :

// - - Constructors
void * Berry_Object_Class_Initialize_2B5424F9_44C1_4FA2_B80F_7EB25FFE776A(bvm* V)
{
void* Pointer = be_malloc(V, sizeof(Graphics_Types::Object_Class));
return new (Pointer) Graphics_Types::Object_Class(); 
}
BE_FUNC_CTYPE_DECLARE(Berry_Object_Class_Initialize_2B5424F9_44C1_4FA2_B80F_7EB25FFE776A, "+_p", "@");


// - - Destructors
void Berry_Object_Class_Deinitialize_D25EB128_E2A0_4832_80B6_61F7808EA1F7(bvm* V, Xila_Namespace::Graphics_Types::Object_Class* I)
{
I->~Object_Class();
be_free(V, I, sizeof(Graphics_Types::Object_Class));
}
BE_FUNC_CTYPE_DECLARE(Berry_Object_Class_Deinitialize_D25EB128_E2A0_4832_80B6_61F7808EA1F7, "", "@.");

(It's generated automaticaly using a python script and Pygccxml library)
Is the duplicate deallocation not due to the inheritance phenomenon ? As Object_Type has derived classes. This would explain why deinit is called several times.

from berry.

s-hadinger avatar s-hadinger commented on June 17, 2024

No, the double deallocation is not due to inheritance. C++ inheritance is unknown by Berry. Calling a destructor is not related to calling deinit.

It's due to an exception happening during GC -- which is forbidden.

I think that the problem is what happens when I->~Object_Class(); is called.

from berry.

AlixANNERAUD avatar AlixANNERAUD commented on June 17, 2024

I'm talking about inheritance within berry, since Object_Class is declared as a class of name Object_Type within berry, and other berry class depends on it.
Anyway, I've removed the destructor call I->~Object_Class(); and I get the same exception.
I've discovered that the VM try to free a null pointer in Berry_Object_Class_Deinitalize_... function, but I don't understand how it's possible.

from berry.

s-hadinger avatar s-hadinger commented on June 17, 2024

Hmmm. I have never tried deinit with Berry inheritance. But indeed, inheritance is implemented with multiple instances, so I suppose that each level of inheritance receives a call to deinit() if such function is defined.

I still don't see how be_realloc at lib/berry/src/be_mem.c:108 could be reached by a call to be_free(). In such call new_size is equal to 0 and the code stops at "Case 2: deallocate".

from berry.

s-hadinger avatar s-hadinger commented on June 17, 2024

Thinking again, the call to be_free() should be done at the same level of sub-class that when it was allocated. Doing be_free() at multiple levels would be wrong.

from berry.

AlixANNERAUD avatar AlixANNERAUD commented on June 17, 2024

I think so ...
Maybe add an if statement to check if the pointer is null ?

from berry.

AlixANNERAUD avatar AlixANNERAUD commented on June 17, 2024

I just checked, adding an if statement solves the problem. However, I am surprised that this is not supported directly in be_mem.h ?
Anyway, thank you for your help and your project, it's awsome !

from berry.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.