Fatal mx2cc error, why?

About Monkey 2 Forums Monkey 2 Programming Help Fatal mx2cc error, why?

Tagged: 

This topic contains 10 replies, has 4 voices, and was last updated by  MikeHart 2 years, 4 months ago.

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #5379

    MikeHart
    Participant

    What should this compiler error tell me?

    Mx2cc version 1.1.01

    ***** Building app ‘C:/Monkey2/modules/fantomX2/examples/Objects/Hierachy/ParentChild/ParentChild.monkey2’ *****

    Parsing…
    Semanting…
    Translating…
    Compiling…
    Build error: System command ‘g++ -I”C:/Monkey2/modules/” -I”C:/Monkey2/modules/monkey/native” -I”C:/Monkey2/modules/fantomX2/examples/Objects/Hierachy/ParentChild/” -std=c++11 -m32 -I”C:/Monkey2/modules/freetype/freetype-2.6.3/include/” -I”C:/Monkey2/modules/openal/openal-soft/include/” -I”C:/Monkey2/modules/gles20/angle/include/” -I”C:/Monkey2/modules/sdl2/SDL/include/” -c -o “C:/Monkey2/modules/fantomX2/examples/Objects/Hierachy/ParentChild/ParentChild.buildv1.1.01/windows_debug/build/_1include_2_0r.cpp.o” “C:/Monkey2/modules/fantomX2/examples/Objects/Hierachy/ParentChild/ParentChild.buildv1.1.01/windows_debug/include/_r.cpp”‘ failed.

    g++ -I”C:/Monkey2/modules/” -I”C:/Monkey2/modules/monkey/native” -I”C:/Monkey2/modules/fantomX2/examples/Objects/Hierachy/ParentChild/” -std=c++11 -m32 -I”C:/Monkey2/modules/freetype/freetype-2.6.3/include/” -I”C:/Monkey2/modules/openal/openal-soft/include/” -I”C:/Monkey2/modules/gles20/angle/include/” -I”C:/Monkey2/modules/sdl2/SDL/include/” -c -o “C:/Monkey2/modules/fantomX2/examples/Objects/Hierachy/ParentChild/ParentChild.buildv1.1.01/windows_debug/build/_1include_2_0r.cpp.o” “C:/Monkey2/modules/fantomX2/examples/Objects/Hierachy/ParentChild/ParentChild.buildv1.1.01/windows_debug/include/_r.cpp”

    In file included from C:/Monkey2/modules/monkey/native/bbmonkey.h:12:0,

    from C:/Monkey2/modules/fantomX2/examples/Objects/Hierachy/ParentChild/ParentChild.buildv1.1.01/windows_debug/include/_r.cpp:1:

    C:/Monkey2/modules/monkey/native/bbgc.h: In instantiation of ‘void bbGCVar<T>::enqueue() [with T = t_fantomX2_cftObject_ftObject]’:

    C:/Monkey2/modules/monkey/native/bbgc.h:229:10: required from ‘bbGCVar<T>::bbGCVar(T*) [with T = t_fantomX2_cftObject_ftObject]’

    C:/Monkey2/modules/fantomX2/examples/Objects/Hierachy/ParentChild/ParentChild.buildv1.1.01/windows_debug/include/ParentChild_ParentChild.h:41:85: required from here

    C:/Monkey2/modules/monkey/native/bbgc.h:221:18: error: cannot dynamic_cast ‘((bbGCVar<t_fantomX2_cftObject_ftObject>*)this)->bbGCVar<t_fantomX2_cftObject_ftObject>::_ptr’ (of type ‘struct t_fantomX2_cftObject_ftObject*’) to type ‘struct bbGCNode*’ (source is a pointer to incomplete type)

    bbGC::enqueue( dynamic_cast<bbGCNode*>( _ptr ) );

    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    ***** Fatal mx2cc error *****

    Internal mx2cc build error

    #5384

    MikeHart
    Participant

    Ok, found it. This NULL assigment to an object declaration was causing it:

    Make it

    and it works.

    #5398

    therevills
    Participant

    Looks like a bug to me. Could you post it on GitHub?

    #5415

    MikeHart
    Participant

    I am not sure. I think it is by design. For whatever odd reason it might be.

    #5416

    Jesse
    Participant

    It’s a bug. Monkey2 should have caught it.

    #5417

    MikeHart
    Participant

    ok. No problem. I can work around it.

    #5421

    therevills
    Participant

    Can you recreate it in a simple example?

    This compile okay using v1.1.01:

    #5435

    MikeHart
    Participant

    I will see what I can do.

    #5436

    MikeHart
    Participant

    Here you go. Offending line is #15:

    #5438

    Mark Sibly
    Keymaster

    Thanks for posting sample code!

    It appears to be fixed now (due to fixes to related stuff) although only in the develop branch which I wouldn’t recommended using just yet.

    #5440

    MikeHart
    Participant

    Thanks!

Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.