Search Unity

need help on custom build Mono-Unity lib !!!!!

Discussion in 'Scripting' started by givemedoor, Apr 22, 2015.

  1. givemedoor

    givemedoor

    Joined:
    Mar 5, 2015
    Posts:
    5
    hi guys ,
    I get mono-unity source code from follow link

    https://github.com/Unity-Technologies/mono/tree/unity-4.6

    then,I build it by eglib mode. then I replace mono.dll with custom building.
    editor works perfect with Angry-bird before I import UnityVS2013 plugin.
    Game will crash in GC at follow function if I import that plugin.

    process object is
    + name_space 0x0cb3519b "System.Runtime.Remoting.Messaging" const char *
    field name is
    + name 0x0cb5ef84 "call_message" const char *

    this function
    mono_field_get_value (object, field, &val) get error val 0x00000000b at field offset 0x44

    src = (char*)obj + field->offset;
    set_value (field->type, value, src, TRUE);

    cause follow crash

    static void mono_add_process_object (MonoObject* object, LivenessState* state)
    {
    if (object && !IS_MARKED(object)) crash here object is invaild value
    {
    gboolean has_references = GET_VTABLE(object)->klass->has_references;
    if(has_references || should_process_value(object,state) != LIVENESS_DONT_PROCESS)
    ......

    But the original release version Mono.dll works fine.
    I build mono.dll with MSVS 2010 BTW.

    I have two question.
    1 https://github.com/Unity-Technologies/mono/ has so many branches. which one is final branch for 4.6.4f?

    2 If I choose correct branch, why I has those kind bug? cause by compiler?

    thanks
     
    Last edited: Apr 24, 2015
  2. givemedoor

    givemedoor

    Joined:
    Mar 5, 2015
    Posts:
    5
    can anyone throw me a light?
     
  3. Tak

    Tak

    Joined:
    Mar 8, 2010
    Posts:
    1,001
    This is exactly what we do (except that it happens on a farm of build machines).

    You should file a bug report with your project - it could just be a timing issue or similar that's preventing this crash in the released library.

    As do we.


    The unity-4.6 branch is used for 4.6 releases.

    That's a good question. If you send us a bug report, we can investigate.
     
  4. givemedoor

    givemedoor

    Joined:
    Mar 5, 2015
    Posts:
    5
    thanks very much!,

    I can 100% reproduce this bug.here is step

    1 Install Unity 4.6.2f release package.
    2 Download https://github.com/Unity-Technologies/mono/tree/unity-4.6 ,without any change ,and compiler it using Debug_eglib or releae_eglib.
    3 lauch 4.6.2f and import Visual Studio 2013 Tools.unitypackage from MS websit.,(I can upload one.)
    4 at this time , unity works fine with original mono.dll, lauch the game in editor then quit.(test game, angry-bot)
    5 replace custom build out lib at folder.( Editor\Data\Mono\EmbedRuntime) mono.dll mono.bsc
    6 lauch the editor and run game in editor,(still fine), then stop play in editor. crash happen!,Then crash will keep happen when you open this project .

    I can update minidump when I attach from VS debug in mono, unity can't fire a crash report, because it's happen in Mono and directly quit.
     

    Attached Files:

    Last edited: Apr 27, 2015
  5. givemedoor

    givemedoor

    Joined:
    Mar 5, 2015
    Posts:
    5
    any news? can you reproduce this case?
     
  6. hakudzx

    hakudzx

    Joined:
    May 5, 2015
    Posts:
    1
    I have faced the same problem. Has any official reply?