Is StrangeIoC Compatible with PS4 and XB1?

1,019 views
Skip to first unread message

ce...@elinemedia.com

unread,
Dec 12, 2014, 9:13:25 PM12/12/14
to stran...@googlegroups.com
Hello,

I am evaluating StrangeIoC for inclusion in future projects targeting PS4 and XB1 platforms. The examples that are included with StrangeIoC (namely MyFirstProject.unity and SignalsProject.unity) are running well on PC, however I am encountering nothing but trouble getting the same examples to run on consoles. I worry that StrangeIoC is implicitly trying to perform just-in-time compilation but these platforms only allow ahead-of-time compilation. Is StrangeIoC known to run on PS4 and XB1?

If it helps, the debugger hangs when stepping within CrossContext.addCoreComponents, especially at line 87 when invoking IInjectionBinding.To :

injectionBinder.Bind<IEventDispatcher>().To<EventDispatcher>().ToSingleton().ToName(ContextKeys.CROSS_CONTEXT_DISPATCHER).CrossContext();

Thanks,
Chris

Yu He

unread,
Dec 13, 2014, 5:36:15 AM12/13/14
to stran...@googlegroups.com
Strange uses simple reflection (no Expressions/JIT) and works fine on IOS, so that's definitely not the problem. I think the newest Unity version may have changed some of the default runtime settings on AOT platforms, so you have to set something like: -nimt-trampolines=512 (see this thread). DI containers tend to use a lot of trampolines. Might be a different issue for you though, any error messages in the debugger?

wcorwin

unread,
Dec 16, 2014, 12:10:27 AM12/16/14
to stran...@googlegroups.com
That's a great question. Let me poke someone at work tomorrow to figure out how to test on xbone and ps4. Everyone is cranking on 5.0 right now, so I might not get an answer asap.

ce...@elinemedia.com

unread,
Dec 16, 2014, 1:26:30 PM12/16/14
to stran...@googlegroups.com
Thanks for your responses Yu and wcorwin!

First, I forgot to mention that I am using the XB1 UnityEditor 5.0.0b16 to push these examples onto an XB1 with Console OS version 6.2.11797.0, in case those details are relevant.

Yu: unfortunately no error messages are generated while debugging in Visual Studio--execution just leaves after trying to step over/in lines of code while initializing a Context, seemingly at random. Trying to recapture execution with break all generates a vague error window, "Unable to break execution. General Exception", upon which the debugger detaches itself from the XB1. When debugging the XB1 kernel itself, exception breaks occur, but I lack the necessary symbol files to get meaningful callstacks. I will be acquiring those files today.

As for trampolines, I have pushed builds with an ever-increasing number of trampolines allocated, but have seen no noticeable improvement at any quantity. I finally stopped at 8192 trampolines of each type:

ntrampolines=8192,nrgctx-trampolines=8192,nimt-trampolines=8192

wcorwin: thanks for investigating this. I am still in the very early stages of preproduction so getting answers is not time-critical.

Thanks,
Chris

Luke Thompson

unread,
Dec 17, 2014, 3:13:43 PM12/17/14
to stran...@googlegroups.com
Just a +1 for this topic - I haven't tried building to xb1 or ps4 yet but will do in the not-too-distant future so any info you guys find would be super helpful!

wcorwin

unread,
Dec 19, 2014, 4:36:48 PM12/19/14
to stran...@googlegroups.com
Official word is if everything works on other AOT platforms like iOS and WebGL (and it does), we'll be fine on PS4/XB1.

Robert Noack

unread,
Mar 3, 2015, 1:56:04 PM3/3/15
to stran...@googlegroups.com
Hi, 

I'm crashing on the exact line in the first post of this thread attempting to run on Wii U.
The crash happens between .Bind<> and the To<> just as described.


Is there anything I can do to help find a fix for this? We have been developing our game slowly for awhile but not being able to run it at all on the devkit is a problem I guess, and it doesn't work on ps4 / xb1 either? Not sure.

Robert Noack

unread,
Mar 3, 2015, 2:03:21 PM3/3/15
to stran...@googlegroups.com
BTW this is on Unity 4.3 

wcorwin

unread,
Mar 3, 2015, 3:53:06 PM3/3/15
to stran...@googlegroups.com
Whats the error? All AOT should work fine on all platforms.

Robert Noack

unread,
Mar 3, 2015, 4:00:06 PM3/3/15
to stran...@googlegroups.com
The error output basically looks like this. There is no real detail.

Core 1: User-mode Exception 6, OSContext 0x10045298, srr0 0x03C405EC, srr1 0x0002D072

001   46638289 U1  7 .p 0-001            [30] 0x101c560 : <native>

001   46638278 U1  7 .p 0-001            [29] 0x2ffd084 : <native>

001   46638268 U1  7 .p 0-001            [28] 0x29519c4 : <native>

001   46638259 U1  7 .p 0-001            [27] 0x2951464 : <native>

001   46638249 U1  7 .p 0-001            [26] 0x2538ab0 : <native>

001   46638238 U1  7 .p 0-001            [25] 0x25445f0 : <native>

001   46638229 U1  7 .p 0-001            [24] 0x2540b8c : <native>

001   46638219 U1  7 .p 0-001            [23] 0x254594c : <native>

001   46638208 U1  7 .p 0-001            [22] 0x257c3a4 : <native>

001   46638198 U1  7 .p 0-001            [21] 0x26b6610 : <native>

001   46638188 U1  7 .p 0-001            [20] 0x269b3c4 : <native>

001   46638178 U1  7 .p 0-001            [19] 0x269b36c : <native>

001   46638168 U1  7 .p 0-001            [18] 0x269b2ac : <native>

001   46638158 U1  7 .p 0-001            [17] 0x25d34e4 : <native>

001   46638148 U1  7 .p 0-001            [16] 0x2343fec : <native>

001   46638138 U1  7 .p 0-001            [15] 0x234373c : <native>

001   46638128 U1  7 .p 0-001            [14] 0x25d4e38 : <native>

001   46638118 U1  7 .p 0-001            [13] 0x25d2308 : <native>

001   46638108 U1  7 .p 0-001            [12] 0x26105f0 : <native>

001   46638098 U1  7 .p 0-001            [11] 0x260ff68 : <native>

001   46638088 U1  7 .p 0-001            [10] 0x260fea8 : <native>

001   46638078 U1  7 .p 0-001            [ 9] 0x23a9d90 : <native>

001   46638064 U1  7 .p 0-001          n]

001   46638058 U1  7 .p 0-001            [ 8] 0x3dc0a2c :  Assets.Boating.Game.GameRoot:Awake () + 0x3c (IL Offset: 0x0) (3dc09f0 3dc0a50) [1b2f6300 - Unity Root Domai
001   46637952 U1  7 .p 0-001          [1b2f6300 - Unity Root Domain]

001   46637946 U1  7 .p 0-001            [ 7] 0x3dbf0bc :  Assets.Boating.Game.GameContext:.ctor (UnityEngine.MonoBehaviour) + 0x2c (IL Offset: 0x7) (3dbf090 3dbf0d0) 
001   46637820 U1  7 .p 0-001          c0 3e17300) [1b2f6300 - Unity Root Domain]

001   46637813 U1  7 .p 0-001            [ 6] 0x3e172ec :  strange.extensions.context.impl.MVCSContext:.ctor (UnityEngine.MonoBehaviour) + 0x2c (IL Offset: 0x7) (3e172
001   46637686 U1  7 .p 0-001          300 - Unity Root Domain]

001   46637680 U1  7 .p 0-001            [ 5] 0x3e15a4c :  strange.extensions.context.impl.CrossContext:.ctor (object) + 0x2c (IL Offset: 0x7) (3e15a20 3e15a60) [1b2f6
001   46637563 U1  7 .p 0-001           Unity Root Domain]

001   46637557 U1  7 .p 0-001            [ 4] 0x3e150f0 :  strange.extensions.context.impl.Context:.ctor (object) + 0x30 (IL Offset: 0x8) (3e150c0 3e15110) [1b2f6300 -
001   46637445 U1  7 .p 0-001          0xf4 (IL Offset: 0x3e) (3e14f60 3e150c0) [1b2f6300 - Unity Root Domain]

001   46637437 U1  7 .p 0-001            [ 3] 0x3e15054 :  strange.extensions.context.impl.Context:.ctor (object,strange.extensions.context.api.ContextStartupFlags) + 
001   46637301 U1  7 .p 0-001          nity Root Domain]

001   46637294 U1  7 .p 0-001            [ 2] 0x3dbf148 :  Assets.Boating.Game.GameContext:addCoreComponents () + 0x28 (IL Offset: 0x6) (3dbf120 3dbf230) [1b2f6300 - U
001   46637182 U1  7 .p 0-001          1b2f6300 - Unity Root Domain]

001   46637176 U1  7 .p 0-001            [ 1] 0x3e17828 :  strange.extensions.context.impl.MVCSContext:addCoreComponents () + 0x28 (IL Offset: 0x6) (3e17800 3e17d80) [
001   46637038 U1  7 .p 0-001           [1b2f6300 - Unity Root Domain]

001   46637032 U1  7 .p 0-001            [ 0] 0x3e15cb8 :  strange.extensions.context.impl.CrossContext:addCoreComponents () + 0xf8 (IL Offset: 0x31) (3e15bc0 3e15e00)


When I edit the code to add Debug.Log between various lines, I was able to pinpoint the exact spot to the call to the .To method just like the original poster said.

The original code looked like this:
if (firstContext == this)
         {
            var x = injectionBinder.Bind<IEventDispatcher>().To<EventDispatcher>().ToSingleton().ToName(ContextKeys.CROSS_CONTEXT_DISPATCHER).CrossContext();
            injectionBinder.Bind<CrossContextBridge> ().ToSingleton ().CrossContext();
         }

I changed the code to look like this:
if (firstContext == this)
         {
             Debug.Log("Inside if block");
            var x = injectionBinder.Bind<IEventDispatcher>();
             Debug.Log("Made it back");
                Debug.Log(x);
                x.To<EventDispatcher>().ToSingleton().ToName(ContextKeys.CROSS_CONTEXT_DISPATCHER).CrossContext();
            injectionBinder.Bind<CrossContextBridge> ().ToSingleton ().CrossContext();
         }

When running this code, I see the debug message "Made it back"  and the log of X which is of the correct type InjectionBinding. 
But, the very first line of the .To method which I changed to  
Debug.Log("Inside To");  never executes / never prints out.

wcorwin

unread,
Mar 3, 2015, 7:34:09 PM3/3/15
to stran...@googlegroups.com
What stripping level do you have? This is the very first call to a binding, so this specific call isn't necessarily the problem. I feel like I'm missing some information from the crash. Exception 6 isn't very helpful :P

Robert Noack

unread,
Mar 3, 2015, 11:50:14 PM3/3/15
to stran...@googlegroups.com
Sorry if this is a dumb question, but where exactly do I define the stripping level? Before you mentioned it I didn't even know what it was.

but it's not so useful.... I didn't do anything to change the stripping level so as far as I know I'm using the default.
There is no documentation there how to change the stripping level, nor do I know what stripping level I should be using or why if I should be using a different one.

So, if you can suggest which stripping level to use, and also how to go about setting it, I will gladly change the level and try again and report back, and I will be very grateful regardless.

As far as Exception 6, I am as in the dark as you, I have absolutely no clue what that means, it's something internally from the Wii U or Unity, but I don't have those details nor does Nintendo provide them or Unity provide them as far as I know.
to be honest, I was mostly sure this was a problem with the Wii U until I came upon this thread on the StrangeIoC board. But, now that someone else reported the same thing with Ps4/Xb1 it seems like there could be a problem inside Unity, or I guess inside StrangeIoC itself, but I don't really know... still, it would be great to solve this, I'm just saying, it seems to be a real issue, not isolated to one user, it's probably likely that no one has successfully used StrangeIoC on Wii U, and on whatever platform the original poster was actually testing on. There seems to be an issue here.

I don't know what else I can provide to help, I would be very open to whatever we can do to solve this, providing more info... I can even share my screen or something if that would be helpful, but I don't know really. The exception doesn't make any sense to me.  they are simulataneously investigating at Nintendo, maybe I can provide the code to them, but I feel they can become stuck because StrangeIoc is... strange :)? to them. But I agree, there is nothing special about the code, it is using basic .NET things which should be supported, so who knows where the real bug is.  Still... maybe we can solve it together, that would be a real success , for me but also for anyone else who wants to use strangeioc :)   please let me know, what i can do to help.

Robert Noack

unread,
Mar 7, 2015, 10:44:05 AM3/7/15
to stran...@googlegroups.com
I finally found the stripping level under Player Settings.
It is set to "Disabled"

I'm assuming that means this is not the issue ?

wcorwin

unread,
Mar 9, 2015, 2:02:49 PM3/9/15
to stran...@googlegroups.com
Yeah, I didn't expect it was stripping but good to make sure. I'm not totally sure how to proceed on this, but I'm happy to continue helping however I can.

ce...@elinemedia.com

unread,
Mar 9, 2015, 2:09:50 PM3/9/15
to stran...@googlegroups.com
Hi again everyone,

Unfortunately, business circumstances have rendered me unable to directly investigate this problem since my last post, but my studio still plans to develop Unity 5 projects targeting new-generation consoles later this year. Hopefully we can keep StrangeIoC in those plans!

There is an dissonance between the "official word" and what Robert and I are seeing; though StrangeIoC should work on PS4, WiiU, and XB1, that is not the actual result. wcorwin, has anyone on your team launched StrangeIoC's example scenes on any of these new-generation consoles? What are your results?

Thanks,
Chris

wcorwin

unread,
Mar 9, 2015, 9:40:58 PM3/9/15
to stran...@googlegroups.com
I don't own (or work on) any of those consoles, and I know for sure Marc doesn't either. We'll figure it out, but without the ability to test/debug it, I'm flying a little blind.

What we know for sure, is that is the very first line involving InjectionBinding.To<T>

I'd encourage someone to test a very basic case that doesn't involve an entire context. First I would test Binding .To<T> and ensure that works, as well as the generic version. Then I would test InjectionBinding, then I would test InjectionBinder itself. Somewhere in there we'll find our solution.

Alternatively, if there's some sort of simulator like with iOS simulator I'm happy to dive in and give it a shot now. But I don't have access to any consoles.


Robert Noack

unread,
Mar 12, 2015, 10:22:02 PM3/12/15
to stran...@googlegroups.com
If you have a very simple sample (needs to open in unity 4.3) I can try to run it and let you know the output. 

Or I can try to create one, i mean, it doesnt seem that it should be so hard to create apart from the fact that I'm not sure the details about what is or isn't required. Should the simple example context extend MVCSContext or something else? And are you suggesting to remove the call to base.addCoreComponents() and try to bind something different ? Or, to edit the line that is crashing and use the non-generic version and see what happens?

Sorry to be confusing, I guess the part that I'm not following is the " that doesn't involve an entire context", I just don't know which parts to exclude and which parts are needed.

wcorwin

unread,
Mar 13, 2015, 5:33:43 PM3/13/15
to stran...@googlegroups.com
Not using a context.

Robert Noack

unread,
Mar 13, 2015, 11:14:57 PM3/13/15
to stran...@googlegroups.com
Ok... but then how to do even include strangeioc at all? The way that I usually include strangeioc in my project is by placing a script inside the scene with a single line in it for example:

using JetBrains.Annotations;
using strange.extensions.context.impl;
 
namespace Assets.Game
{
    internal class GameRoot : ContextView
    {
        [UsedImplicitly]
        protected void Awake()
        {
            context = new GameContext(this);
        }
    }
}


if we bypass this GameContext altogether, that means we aren't ever instantiating a class which has an injectionbinder object in it.
Therefore, how do we ever invoke a method on injection binder?
Therefore, how do we ever use strangeioc?

So if there is no context, what is the alternative? How do we invoke these methods without a context?

do you mean to inside the GameRoot script above simply include the line for example:

var obj = new CrossContextInjectionBinder(); ?

And then continue with this? 
Or would you prefer an instance of one of the base classes ? and if so which one?

wcorwin

unread,
Mar 14, 2015, 12:16:28 AM3/14/15
to stran...@googlegroups.com
A context is just a collection of binders. Throw some binders in to a monobehaviour somewhere and see what happens.

Our goal while debugging is to reduce the number of variables that are affecting the situation. The less unknowns we have, the more we find out!

Robert Noack

unread,
Apr 16, 2015, 10:43:06 PM4/16/15
to stran...@googlegroups.com
Sorry I never got back to this but I just wanted to give an update. We updated to unity 5 but the wii u Dev kit doesn't have unity 5 yet. I'm hoping that somehow magically this will resolve all the issues. Because I was totally unable to get it working with strange ioc on unity 4. When unity 5 for wii u comes out I will put some more effort into this, but, if I don't succeed we will probably migrate off of strange ioc.

Luke Thompson

unread,
Apr 17, 2015, 12:59:04 PM4/17/15
to stran...@googlegroups.com
Hi all,

I should be trying out my current project on an XB1 dev kit about a week from now, on Unity 5. I have to say - I'm currently very worried. If there's no way to get Strange working on consoles, I'll have to migrate away from it which will have serious negative effects on the project this late in.

That said (assuming there are still issues on the XB1 devkit with Unity 5 (and on the PS4 devkit, one of which I should be receiving in about a month)) I'm very keen to try and fix strangeioc on console. So if others (especially Will and Marc) are available to help with debugging and fixing during that time, it could be very beneficial not only for me but for strange in general!

Cheers,
Luke

wcorwin

unread,
Apr 17, 2015, 1:04:02 PM4/17/15
to stran...@googlegroups.com
MS has been slow getting me my devkit. Should have had it two weeks ago. Following up.

Luke Thompson

unread,
Apr 17, 2015, 1:17:12 PM4/17/15
to stran...@googlegroups.com
Yeah, ours has been delayed as well. Hopefully this delayed date won't itself be delayed... anyway, good to hear you're getting one, very positive news :)

Luke Thompson

unread,
Apr 30, 2015, 10:19:05 AM4/30/15
to stran...@googlegroups.com
I've got my xdk and will be trying out my project on it shortly!

Robert Noack

unread,
May 1, 2015, 11:09:35 AM5/1/15
to stran...@googlegroups.com
I'm really excited to find out if it works. Does the XDK support unity 5 yet or is it still on unity 4?

Luke Thompson

unread,
May 1, 2015, 1:17:28 PM5/1/15
to stran...@googlegroups.com
Yep, Unity 5.

wcorwin

unread,
May 1, 2015, 1:54:01 PM5/1/15
to stran...@googlegroups.com
Still haven't received mine :( They sent it to a wrong address, apparently. Maybe next week.

Robert Noack

unread,
May 20, 2015, 3:32:04 PM5/20/15
to stran...@googlegroups.com
Just wondering if there was any update to this, maybe from Luke who said he was planning to try it?

They recently released the "beta" unity 5 for wii u, but it's based on pre 5.0.2 which I just updated to, and has some breaking changes for me, so since I migrated to 5.0.2 I can't run on the older 5 versions anymore. If they update the wii u unity to 5.0.2 I plan to give this a try again, but that might be a little while.

Luke Thompson

unread,
May 20, 2015, 5:10:26 PM5/20/15
to stran...@googlegroups.com
Apologies for the radio silence! I've received my devkit but there've been problems getting my account set up so not been able to test yet. Should only be a couple more days though... fingers crossed.

Luke Thompson

unread,
May 28, 2015, 2:10:59 PM5/28/15
to stran...@googlegroups.com
Taking a bit longer than I hoped, sorry...

wcorwin

unread,
Jun 2, 2015, 3:10:32 PM6/2/15
to stran...@googlegroups.com
Likewise, I ran in to a roadblock with the devkit and 5.1/5.2 are taking huge priority right now so haven't had the chance. Hopefully soon!

Robert Noack

unread,
Jun 8, 2015, 8:35:55 PM6/8/15
to stran...@googlegroups.com
Definitely still anxious to hear about this.  

BTW I'm not sure if anyone here tried creating the build with WebGL but I would recommend trying that also. I tried it the other day and I couldn't get it working. It crashed around the same places, so it's possibly it can be somewhat related.

Either way, I'm pretty sure both issues , what I saw with WebGL and what I saw with the WiiU version is that the compiler is trying to optimize the build by removing methods it believes are never called. I think it has something to do with using reflection in certain times, because when for example calling a method using MethodInfo it doesn't look like that method is actually called until the code is run. 

I was trying for a bit to add [UsedImplictly] attributes on things to see if this would help, but then I started getting WebGL out of memory errors, and it's really hard to tell if it's because StrangeIoC, or the fact that Unity WebGL is just still in beta or my browser, or my game, or what.

If anyone else has a non-strange game they could build in webGL, then slowly add a few strangeioc components to and see if it breaks, I think that could be useful potentially for figuring this out , if the issues indeed end up being related.

wcorwin

unread,
Jun 11, 2015, 1:52:42 PM6/11/15
to stran...@googlegroups.com
Feel free to report any il2cpp bugs using the official bug reporting. The il2cpp team is really responsive and have worked with many strange devs to get things working.

ce...@elinemedia.com

unread,
Aug 3, 2015, 10:33:18 PM8/3/15
to StrangeIoC
Hi everyone,

Now that my studio has completed our other projects and is now in pre-production for the next, I am able to investigate this compatibility issue again.

As wcorwin suggested five months ago, I wrote a quick MonoBehavior to test individual parts of the binding chain that was causing the application to crash (note: no part of the Strange framework was initialized other than what is included here):

using UnityEngine;
using strange.extensions.injector.api;
using strange.extensions.injector.impl;
using strange.extensions.dispatcher.eventdispatcher.api;
using strange.extensions.dispatcher.eventdispatcher.impl;
using strange.extensions.context.api;
using strange.framework.api;

public class StrangeBehavior : MonoBehaviour
{
private void Update( )
{
if( Input.GetButtonDown( "Submit" ) )
{
TestBindings( );
}
}

private void OnGUI( )
{
if( GUILayout.Button( "Begin Test" ) )
{
TestBindings( );
}
}

private void TestBindings( )
{
Debug.Log( "Beginning binding tests..." );

// Example Code from CrossContext.addCoreComponents, line 87.
//ICrossContextInjectionBinder injectionBinder = new CrossContextInjectionBinder( )
//injectionBinder.Bind<IEventDispatcher>().To<EventDispatcher>().ToSingleton().ToName(ContextKeys.CROSS_CONTEXT_DISPATCHER).CrossContext();

//--------//--------//--------//--------
// TEST 00: BINDINGS
//--------//--------//--------//--------

// TEST 00a: Binding.To<T>( )
// RESULT: PASS
IBinding iBinding00a   = new EventBinding( );
IBinding iBindingTo00a = iBinding00a.To<EventDispatcher>( );

// TEST 00b: Binding.To( System.Type )
// RESULT: PASS
IBinding iBinding00b   = new EventBinding( );
IBinding iBindingTo00b = iBinding00b.To( typeof( EventDispatcher ) );

// TEST 01a: InjectionBinding.To<T>
// RESULT: PASS
IInjectionBinding iInjectionBinding01a   = new InjectionBinding( null );
IInjectionBinding iInjectionBindingTo01a = iInjectionBinding01a.To<EventDispatcher>( );

// TEST 01b: InjectionBinding.To( System.Type )
// RESULT: PASS
IInjectionBinding iInjectionBinding01b   = new InjectionBinding( null );
IInjectionBinding iInjectionBindingTo01b = iInjectionBinding01b.To( typeof( EventDispatcher ) );

//--------//--------//--------//--------
// TEST 10: BINDERS
//--------//--------//--------//--------

// TEST 10a: InjectionBinder.Bind<T>( )
// RESULT: PASS
IInjectionBinder  iInjectionBinder10a  = new InjectionBinder( );
IInjectionBinding iInjectionBinding10a = iInjectionBinder10a.Bind<IEventDispatcher>( );

// TEST 10b: InjectionBinder.Bind( System.Type )
// RESULT: PASS
IInjectionBinder  iInjectionBinder10b  = new InjectionBinder( );
IInjectionBinding iInjectionBinding10b = iInjectionBinder10b.Bind( typeof( IEventDispatcher ) );

// TEST 10c: InjectionBinder.Bind<T>( ).To<T>( )
// RESULT: FAIL
//IInjectionBinder  iInjectionBinder10c      = new InjectionBinder( );
//IInjectionBinding iInjectionBindingBind10c = iInjectionBinder10c.Bind<IEventDispatcher>( ); // Execution fails here on XB1!
//IInjectionBinding iInjectionBindingTo10c   = iInjectionBindingBind10c.To<IEventDispatcher>( );

// TEST 10d: InjectionBinder.Bind<T>( ).To( System.Type )
// RESULT: FAIL
//IInjectionBinder  iInjectionBinder10d      = new InjectionBinder( );
//IInjectionBinding iInjectionBindingBind10d = iInjectionBinder10d.Bind<IEventDispatcher>( ); // Execution fails here on XB1!
//IInjectionBinding iInjectionBindingTo10d   = iInjectionBindingBind10d.To( typeof( IEventDispatcher ) );

// TEST 10e: InjectionBinder.Bind( System.Type ).To<T>( )
// RESULT: FAIL
//IInjectionBinder  iInjectionBinder10e      = new InjectionBinder( );
//IInjectionBinding iInjectionBindingBind10e = iInjectionBinder10e.Bind( typeof( IEventDispatcher ) );
//IInjectionBinding iInjectionBindingTo10e   = iInjectionBindingBind10e.To<IEventDispatcher>( ); // Execution fails here on XB1!

// TEST 10f: InjectionBinder.Bind( System.Type ).To( System.Type )
// RESULT: PASS
IInjectionBinder  iInjectionBinder10f      = new InjectionBinder( );
IInjectionBinding iInjectionBindingBind10f = iInjectionBinder10f.Bind( typeof( IEventDispatcher ) );
IInjectionBinding iInjectionBindingTo10f   = iInjectionBindingBind10f.To( typeof( IEventDispatcher ) );

//--------//--------//--------//--------
// TEST 100: FULL BIND CHAIN
//--------//--------//--------//--------

ICrossContextInjectionBinder iCrossContextInjectionBinder  = new CrossContextInjectionBinder( );
IInjectionBinding            iInjectionBindingBind         = iCrossContextInjectionBinder.Bind<IEventDispatcher>( );
//IInjectionBinding            iInjectionBindingTo           = iInjectionBindingBind.To<EventDispatcher>( );        // Execution fails here on XB1!
IInjectionBinding            iInjectionBindingTo           = iInjectionBindingBind.To( typeof( EventDispatcher ) ); // Execution succeeds here on XB1!
IInjectionBinding            iInjectionBindingToSingleton  = iInjectionBindingTo.ToSingleton( );
IInjectionBinding            iInjectionBindingToName       = iInjectionBindingToSingleton.ToName( ContextKeys.CROSS_CONTEXT_DISPATCHER );
IInjectionBinding            iInjectionBindingCrossContext = iInjectionBindingToName.CrossContext( );
}
}

I am no expert on the internal workings of Strange, so please inform me if these tests' coverage is lacking. With that said, I found the crash to occur most often when calling the generic methods (for example, IInjectionBinder.Bind<T> and IInjectionBinding.To<T>, the latter of which only fails if the binding has a binder to work with); replacing the generic method calls with calls to alternate method signatures avoided the crash in all cases (for example, IInjectionBinder.Bind( System.Type ) and IInjectionBinding.To( System.Type )).

Having acquired these results, I revisited MyFirstProject.unity and replaced the generic methods with typical methods:

// CrossContext.cs

protected override void addCoreComponents()
{
base.addCoreComponents();
if (injectionBinder.CrossContextBinder == null)  //Only null if it could not find a parent context / firstContext
{
injectionBinder.CrossContextBinder = new CrossContextInjectionBinder();
}

if (firstContext == this)
{
#region ElsEdit
//injectionBinder.Bind<IEventDispatcher>().To<EventDispatcher>().ToSingleton().ToName(ContextKeys.CROSS_CONTEXT_DISPATCHER).CrossContext(); // Execution fails here on XB1!
//injectionBinder.Bind<CrossContextBridge> ().ToSingleton ().CrossContext();                                                                // Execution fails here on XB1, too!

injectionBinder.Bind( typeof( IEventDispatcher ) ).To( typeof( EventDispatcher ) ).ToSingleton().ToName(ContextKeys.CROSS_CONTEXT_DISPATCHER).CrossContext();
injectionBinder.Bind( typeof( CrossContextBridge ) ).ToSingleton().CrossContext();
#endregion // ElsEdit
}
}

This edit allowed execution to successfully travel through the whole of addCoreComponents, only the crash immediately afterward in MVCSContext.addCoreComponents instead. It seems like XB1 (and I assume PS4) has real difficulty with the generic methods, but the generic methods are used throughout the core of Strange's binding framework. I will try replacing all use of the generic methods with their alternatives tomorrow.

Thanks,
Chris

Robert Noack

unread,
Aug 3, 2015, 11:07:58 PM8/3/15
to StrangeIoC
Nice :)

BTW this is definitely entirely related to the generic methods because I also was able to eventually get the WebGL build working, although it kept running out of memory (unrelated i guess).
I think this is in line with what we all thought (at least with what I thought). The bugs are (I guess) in il2cpp like will said.

But I did report issues there on the official bug tracker and heard absolutely NOTHING back even with a pro license.
Anyway, it would be great if we can work around the issues by just not using generic methods, since I'm not sure it's high on unity priority list to fix these things unfortunately... or maybe it is but they just aren't saying anything ?

wcorwin

unread,
Aug 4, 2015, 2:18:11 AM8/4/15
to StrangeIoC
Awesome! Thanks for the report!

I'm unsure where this is breaking down on the console. il2cpp of course supports generics. Most of the generic issues we had in strange/il2cpp were fixed long ago but this has stubbornly stayed around.

ce...@elinemedia.com

unread,
Aug 4, 2015, 4:27:35 PM8/4/15
to StrangeIoC
Hi again,

I was able to replace all use of generic methods in Strange's framework and examples. As a result, MyFirstProject.unity was finally able to run on XB1! This greatly advances the cause of Strange in my studio, but I would prefer to see the underlying problem solved so I need not merge with any future versions of Strange.

In the meantime, what is the issue ID of your report, Mr. Noack? I will spend votes on it accordingly.

Thanks,
Chris 


Robert Noack

unread,
Aug 4, 2015, 4:37:27 PM8/4/15
to StrangeIoC
I just tried to look it up, but I actually don't know how to find my issues on the unity website. Actually it's possible I didn't post it to the public issue tracker because I attached my project to it.
Anyway I guess I likely didn't provide as much specific detail there anyway which can be part of the reason I never heard anything back  (however I feel someone could have downloaded + run the project to see the crash, but thats fine).

It might be worth just creating a new issue on the public tracker, with the additional details and possibly even directly related to using strangeioc?

What do you think?

ce...@elinemedia.com

unread,
Aug 5, 2015, 7:17:28 PM8/5/15
to StrangeIoC
I know how to code around the problem, but have a difficult time accurately describing what the problem is--something about il2cpp not supporting the flavor of generic methods that Strange needs? Accidental stripping of methods from an assembly? If someone with better understanding of the intersection between Strange, generics, and il2cpp could provide that description, then I would happily create a new issue.

Thanks,
Chris

Robert Noack

unread,
Aug 5, 2015, 7:21:40 PM8/5/15
to StrangeIoC
In a way I am just guessing, but, I think what us happening is that it is trying to analyze the code and find all of the unused code before it converts the c# code into native code so that it can run on the target system. During the analysis something about the generic methods confuses it and it believes some types are unused that in fact are actually used so it removes those types entirely from the compilation . Then when the code is running it tries to use those types and they are not there so it has an error.

At least that is my understanding

ce...@elinemedia.com

unread,
Aug 12, 2015, 3:54:55 PM8/12/15
to StrangeIoC
Hi everyone,

I believe I have reached a point where I can no longer code around the mystery incompatibility between Strange and consoles. Using a version of Strange with generic methods removed allows my project to run on XB1, but the behavior of my project changes when using the non-generic alternatives, where objects--particularly signals--are failing to be bound across contexts and are failing to be injected. I would not be surprised to learn that I inadvertently introduced this change, but the fact remains that the amount of work I am putting into adopting Strange is reaching a point where it is not worth the effort.

Meanwhile, I experimented with getting the "StrangeRocks" demo running, as-is, on XB1. I adjusted the "Scripting Backend", "API Compatibility Level", and "Stripping Level" settings to determine what, if any, combination would allow the demo to run. Some combinations ran but with progression-blocking errors, others hung at launch, while the rest crashed at launch.

RESULTS (Target: XB1, Build Type: Development Player, Deploy Method: Package, Script Debugging: enabled. Built with Windows Unity 5.2.0b5)

[IL2CPP, .NET 2.0 Subset] - runtime error
[IL2CPP, .NET 2.0 Subset, Strip Engine Code] - runtime error
[IL2CPP, .NET 2.0]  - runtime error
[IL2CPP, .NET 2.0, Strip Engine Code] - runtime error
[Mono2x, .NET 2.0 Subset, Disabled] - hang at launch

[Mono2x, .NET 2.0 Subset, Strip Assemblies] - hang at launch
[Mono2x, .NET 2.0 Subset, Strip Bytecode] - crash at launch
[Mono2x, .NET 2.0 Subset, Micro Mscorlib] - hang at launch
[Mono2x, .NET 2.0, Disabled] - hang at launch
[Mono2x, .NET 2.0, Strip Assemblies] - hang at launch
[Mono2x, .NET 2.0, Strip Bytecode] - crash at launch
[Mono2x, .NET 2.0, Micro Mscorlib] - crash at launch

The combinations that resulted in runtime errors would display all three additive scenes (Main.unity, Game.unity, UI.unity) simultaneously in a non-functional "zombie" state. The console displayed the following:

ReflectionException: the reflector requires concrete classes.
Type UnityEngine.Camera has no constructor. Is it an interface?

InjectorException: attempt to instantiate a null binding.
    target: strange.examples.strangerocks.ScreenUtil
    type: UnityEngine.Camera
    name: GAME_CAMERA

ReflectionException: The reflector requires concrete classes.
Type UnityEngine.Camera has no constructor. Is it an interface?
  at strange.extensions.reflector.impl.ReflectionBinder.mapPreferredConstructor (IReflectedClass reflected, IBinding binding, System.Type type) [0x00000] in <filename unknown>:0 
  at strange.extensions.reflector.impl.ReflectionBinder.Get (System.Type type) [0x00000] in <filename unknown>:0 
  at strange.extensions.injector.impl.Injector.Inject (System.Object target, Boolean attemptConstructorInjection) [0x00000] in <filename unknown>:0 
  at strange.extensions.injector.impl.Injector.getValueInjection (System.Type t, System.Object name, System.Object target) [0x00000] in <filename unknown>:0 
  at strange.extensions.injector.impl.Injector.performSetterInjection (System.Object target, IReflectedClass reflection) [0x00000] in <filename unknown>:0 
  at strange.extensions.injector.impl.Injector.Inject (System.Object target, Boolean attemptConstructorInjection) [0x00000] in <filename unknown>:0 
  at strange.extensions.injector.impl.Injector.Instantiate (IInjectionBinding binding) [0x00000] in <filename unknown>:0 
  at strange.extensions.injector.impl.Injector.getValueInjection (System.Type t, System.Object name, System.Object target) [0x00000] in <filename unknown>:0 
  at strange.extensions.injector.impl.Injector.performSetterInjection (System.Object target, IReflectedClass reflection) [0x00000] in <filename unknown>:0 
  at strange.extensions.injector.impl.Injector.Inject (System.Object target, Boolean attemptConstructorInjection) [0x00000] in <filename unknown>:0 
  at strange.extensions.mediation.impl.MediationBinder.injectViewAndChildren (IView view) [0x00000] in <filename unknown>:0 
  at strange.extensions.mediation.impl.MediationBinder.Trigger (MediationEvent evt, IView view) [0x00000] in <filename unknown>:0 
  at strange.extensions.mediation.impl.MediationBinder.injectViewAndChildren (IView view) [0x00000] in <filename unknown>:0 
  at strange.extensions.mediation.impl.MediationBinder.Trigger (MediationEvent evt, IView view) [0x00000] in <filename unknown>:0 
  at strange.extensions.context.impl.MVCSContext.postBindings () [0x00000] in <filename unknown>:0 
  at strange.examples.strangerocks.ui.UIContext.postBindings () [0x00000] in <filename unknown>:0 
  at strange.extensions.context.impl.Context.Start () [0x00000] in <filename unknown>:0 
  at strange.extensions.context.impl.Context..ctor (System.Object view, ContextStartupFlags flags) [0x00000] in <filename unknown>:0 
  at strange.examples.strangerocks.ui.UIBootstrap.Start () [0x00000] in <filename unknown>:0 
  at System.Collections.Generic.Dictionary`2+KeyCollection[TKey,TValue].System.Collections.Generic.ICollection<TKey>.get_IsReadOnly () [0x00000] in <filename unknown>:0 
  at System.Collections.Generic.Dictionary`2+KeyCollection[TKey,TValue].System.Collections.Generic.ICollection<TKey>.get_IsReadOnly () [0x00000] in <filename unknown>:0 
  at System.Collections.Generic.Dictionary`2+KeyCollection[TKey,TValue].System.Collections.Generic.ICollection<TKey>.get_IsReadOnly () [0x00000] in <filename unknown>:0 
  at System.Collections.Generic.Dictionary`2+KeyCollection[TKey,TValue].System.Collections.Generic.ICollection<TKey>.get_IsReadOnly () [0x00000] in <filename unknown>:0 
  at System.Collections.Generic.Dictionary`2+KeyCollection[TKey,TValue].System.Collections.Generic.ICollection<TKey>.get_IsReadOnly () [0x00000] in <filename unknown>:0 
  at System.Collections.Generic.Dictionary`2+KeyCollection[TKey,TValue].System.Collections.Generic.ICollection<TKey>.get_IsReadOnly () [0x00000] in <filename unknown>:0 
  at System.Collections.Generic.Dictionary`2+KeyCollection[TKey,TValue].System.Collections.Generic.ICollection<TKey>.get_IsReadOnly () [0x00000] in <filename unknown>:0 
  at System.Collections.Generic.Dictionary`2+KeyCollection[TKey,TValue].System.Collections.Generic.ICollection<TKey>.get_IsReadOnly () [0x00000] in <filename unknown>:0 
  at System.Collections.Generic.Dictionary`2+KeyCollection[TKey,TValue].System.Collections.Generic.ICollection<TKey>.get_IsReadOnly () [0x00000] in <filename unknown>:0 
  at System.Collections.Generic.Dictionary`2+KeyCollection[TKey,TValue].System.Collections.Generic.ICollection<TKey>.get_IsReadOnly () [0x00000] in <filename unknown>:0 
System.Collections.Generic.KeyCollection:System.Collections.Generic.ICollection<TKey>.get_IsReadOnly()
System.Collections.Generic.KeyCollection:System.Collections.Generic.ICollection<TKey>.get_IsReadOnly()
System.Collections.Generic.KeyCollection:System.Collections.Generic.ICollection<TKey>.get_IsReadOnly()
System.Collections.Generic.KeyCollection:System.Collections.Generic.ICollection<TKey>.get_IsReadOnly()
System.Collections.Generic.KeyCollection:System.Collections.Generic.ICollection<TKey>.get_IsReadOnly()
System.Collections.Generic.KeyCollection:System.Collections.Generic.ICollection<TKey>.get_IsReadOnly()
System.Collections.Generic.KeyCollection:System.Collections.Generic.ICollection<TKey>.get_IsReadOnly()
System.Collections.Generic.KeyCollection:System.Collections.Generic.ICollection<TKey>.get_IsReadOnly()
 
(Filename: currently not available on il2cpp Line: -1)

InjectionException: Attempt to Instantiate a null binding.
target: strange.examples.strangerocks.ScreenUtil
type: UnityEngine.Camera
name: GAME_CAMERA
  at strange.extensions.injector.impl.Injector.failIf (Boolean condition, System.String message, InjectionExceptionType type, System.Type t, System.Object name, System.Object target) [0x00000] in <filename unknown>:0 
  at strange.extensions.injector.impl.Injector.getValueInjection (System.Type t, System.Object name, System.Object target) [0x00000] in <filename unknown>:0 
  at strange.extensions.injector.impl.Injector.performSetterInjection (System.Object target, IReflectedClass reflection) [0x00000] in <filename unknown>:0 
  at strange.extensions.injector.impl.Injector.Inject (System.Object target, Boolean attemptConstructorInjection) [0x00000] in <filename unknown>:0 
  at strange.extensions.injector.impl.Injector.Instantiate (IInjectionBinding binding) [0x00000] in <filename unknown>:0 
  at strange.extensions.injector.impl.Injector.getValueInjection (System.Type t, System.Object name, System.Object target) [0x00000] in <filename unknown>:0 
  at strange.extensions.injector.impl.Injector.performSetterInjection (System.Object target, IReflectedClass reflection) [0x00000] in <filename unknown>:0 
  at strange.extensions.injector.impl.Injector.Inject (System.Object target, Boolean attemptConstructorInjection) [0x00000] in <filename unknown>:0 
  at strange.extensions.mediation.impl.MediationBinder.injectViewAndChildren (IView view) [0x00000] in <filename unknown>:0 
  at strange.extensions.mediation.impl.MediationBinder.Trigger (MediationEvent evt, IView view) [0x00000] in <filename unknown>:0 
  at strange.extensions.context.impl.MVCSContext.AddView (System.Object view) [0x00000] in <filename unknown>:0 
  at strange.extensions.mediation.impl.View.bubbleToContext (UnityEngine.MonoBehaviour view, Boolean toAdd, Boolean finalTry) [0x00000] in <filename unknown>:0 
  at strange.extensions.mediation.impl.View.Start () [0x00000] in <filename unknown>:0 
  at System.Collections.Generic.Dictionary`2+KeyCollection[TKey,TValue].System.Collections.Generic.ICollection<TKey>.get_IsReadOnly () [0x00000] in <filename unknown>:0 
  at System.Collections.Generic.Dictionary`2+KeyCollection[TKey,TValue].System.Collections.Generic.ICollection<TKey>.get_IsReadOnly () [0x00000] in <filename unknown>:0 
  at System.Collections.Generic.Dictionary`2+KeyCollection[TKey,TValue].System.Collections.Generic.ICollection<TKey>.get_IsReadOnly () [0x00000] in <filename unknown>:0 
  at System.Collections.Generic.Dictionary`2+KeyCollection[TKey,TValue].System.Collections.Generic.ICollection<TKey>.get_IsReadOnly () [0x00000] in <filename unknown>:0 
  at System.Collections.Generic.Dictionary`2+KeyCollection[TKey,TValue].System.Collections.Generic.ICollection<TKey>.get_IsReadOnly () [0x00000] in <filename unknown>:0 
  at System.Collections.Generic.Dictionary`2+KeyCollection[TKey,TValue].System.Collections.Generic.ICollection<TKey>.get_IsReadOnly () [0x00000] in <filename unknown>:0 
  at System.Collections.Generic.Dictionary`2+KeyCollection[TKey,TValue].System.Collections.Generic.ICollection<TKey>.get_IsReadOnly () [0x00000] in <filename unknown>:0 
  at System.Collections.Generic.Dictionary`2+KeyCollection[TKey,TValue].System.Collections.Generic.ICollection<TKey>.get_IsReadOnly () [0x00000] in <filename unknown>:0 
  at System.Collections.Generic.Dictionary`2+KeyCollection[TKey,TValue].System.Collections.Generic.ICollection<TKey>.get_IsReadOnly () [0x00000] in <filename unknown>:0 
  at System.Collections.Generic.Dictionary`2+KeyCollection[TKey,TValue].System.Collections.Generic.ICollection<TKey>.get_IsReadOnly () [0x00000] in <filename unknown>:0 
System.Collections.Generic.KeyCollection:System.Collections.Generic.ICollection<TKey>.get_IsReadOnly()
System.Collections.Generic.KeyCollection:System.Collections.Generic.ICollection<TKey>.get_IsReadOnly()
System.Collections.Generic.KeyCollection:System.Collections.Generic.ICollection<TKey>.get_IsReadOnly()
System.Collections.Generic.KeyCollection:System.Collections.Generic.ICollection<TKey>.get_IsReadOnly()
System.Collections.Generic.KeyCollection:System.Collections.Generic.ICollection<TKey>.get_IsReadOnly()
System.Collections.Generic.KeyCollection:System.Collections.Generic.ICollection<TKey>.get_IsReadOnly()
System.Collections.Generic.KeyCollection:System.Collections.Generic.ICollection<TKey>.get_IsReadOnly()
System.Collections.Generic.KeyCollection:System.Collections.Generic.ICollection<TKey>.get_IsReadOnly()
 
(Filename: currently not available on il2cpp Line: -1)

In spite of our suspicions about IL2CPP, at least it allows a small part of the demo to run. As for combinations that hung at launch, the console displayed the following:

PMEM [T276]: Could not map profile memory (8).  ProfilingMode might be disabled. Use xbconfig to enable it.
0110:0114 @ 00004531 - LdrpNameToOrdinal - WARNING: Procedure "DllGetActivationFactory" could not be located in DLL at base 0x0000010175F40000.
0110:0114 @ 00004531 - LdrpReportError - WARNING: Locating export "DllGetActivationFactory" for DLL "Unknown" failed with status: 0xc0000139.
Connect to pipe \SEVPipe\ac5565c4a08ce91b
Named pipe listen \\.\SEVPipe\15_aff8719e8f3f4a55
Connect to pipe \SEVPipe\489865be4cf25161
Unity for Xbox built on XDK 13004.
Connect to pipe \SEVPipe\8e7396e60d08ec24
Application Path: G:/XboxOnePlayer.exe
G:/XboxOnePlayer.exePlayerConnection initialized from G:/Data (debug = 0)
PlayerConnection initialized network socket : 0.0.0.0 4600
Multi-casting "[IP] 192.168.0.36 [Port] 4600 [Flags] 3 [Guid] 1438739884 [EditorId] 3316863107 [Version] 1048832 [Id] XboxOnePlayer(192.168.0.36):4601 [Debug] 1" to [225.0.0.222:34997]...
Waiting for connection from host on [192.168.0.36:4600]...
PlayerConnection accepted from [192.168.0.26] handle:0x1a8
[PlayerPrefs] PlayerPrefs cannot be used.  Ensure that you have setup your
TitleID, SCID in the PlayerSettings window and that your DevKit is setup to use the proper sandbox.
GfxDevice: creating device client; threaded=1
PMEM [T320]: Could not map profile memory (8).  ProfilingMode might be disabled. Use xbconfig to enable it.
Failed to initialize profiling memory.
---------------------------------------------------------
Xbox User Mode Driver for Direct3D 11.1 / Game
Copyright (C) Microsoft Corporation. All rights reserved.
---------------------------------------------------------
Using Direct3D 11.X Monolithic (Instrumented)
XboxOne Direct3D:
    Version:  Xbox One Direct3D 11.1
    Renderer: Microsoft Xbox One Renderer (ID=0x0)
    Vendor:   Microsoft
    VRAM:     6144 MB
Mono path[0] = 'G:/Data/Managed'
Mono config path = 'G:/Data/Managed'
PlayerConnection already initialized - listening to [192.168.0.36:4600]
Using monoOptions --debugger-agent=transport=dt_socket,embedding=1,defer=y,address=0.0.0.0:4601
Connect to pipe \SEVPipe\5450104eaf24bf49
Initialize engine version: 5.2.0b5 (ee847a19704b)
---------------------------------------------------------
Xbox User Mode Driver for Direct3D 11.1 / Game
Copyright (C) Microsoft Corporation. All rights reserved.
---------------------------------------------------------
Using Direct3D 11.X Monolithic (Instrumented)
0110:0140 @ 00006125 - LdrpNameToOrdinal - WARNING: Procedure "DllGetActivationFactory" could not be located in DLL at base 0x0000010178070000.
0110:0140 @ 00006125 - LdrpReportError - WARNING: Locating export "DllGetActivationFactory" for DLL "Unknown" failed with status: 0xc0000139.
Begin MonoManager ReloadAssembly
Platform assembly: G:\Data\Managed\UnityEngine.dll (this message is harmless)
Platform assembly: G:\Data\Managed\System.dll (this message is harmless)
Platform assembly: G:\Data\Managed\Mono.Security.dll (this message is harmless)
Platform assembly: G:\Data\Managed\System.Configuration.dll (this message is harmless)
Platform assembly: G:\Data\Managed\System.Xml.dll (this message is harmless)
Platform assembly: G:\Data\Managed\System.Security.dll (this message is harmless)
Platform assembly: G:\Data\Managed\System.Core.dll (this message is harmless)
Platform assembly: G:\Data\Managed\Mono.Posix.dll (this message is harmless)
Platform assembly: G:\Data\Managed\Assembly-CSharp.dll (this message is harmless)
Platform assembly: G:\Data\Managed\UnityEngine.UI.dll (this message is harmless)
Platform assembly: G:\Data\Managed\UnityEngine.Networking.dll (this message is harmless)
Platform assembly: G:\Data\Managed\UnityEngine.Analytics.dll (this message is harmless)
- Completed reload, in  1.190 seconds
  . [ 0.137853 ] seconds to load first level          
Window has gained focus
PlayerConnection accepted from [192.168.0.26] handle:0x580

Nothing immediately wrong here, from what I can tell. Finally, the combinations that resulted in crashes at launch displayed no console output at all.

Today, I will send a bug report to Unity Tech that contains StrangeRocks. At best, I can only describe the problem to them as "generic methods seem to cause exceptions, hangs, and/or crashes on XB1 under these configurations."

Thanks,
Chris


ce...@elinemedia.com

unread,
Aug 13, 2015, 2:55:31 PM8/13/15
to StrangeIoC
I submitted a bug report to Unity: (Case 719456) Virtual Generic Methods in StrangeIoC Cause Instability on XB1. I have been unable to locate it on http://issuetracker.unity3d.com/ despite checking the "Share description in the Public Issue Tracker" button in the Unity Bug Reporter tool. If it does appear, I will post a link.

Thanks,
Chris

wcorwin

unread,
Aug 13, 2015, 4:07:36 PM8/13/15
to StrangeIoC
Yup I see it internally. QA has ahold of it. I'll poke someone if we dont't get activity in a reasonable amount of time. I'm also lucky enough to have (some of?) our xbone team relocating to the Seattle office so I should be able to ask some questions.

wcorwin

unread,
Aug 18, 2015, 7:03:17 PM8/18/15
to StrangeIoC
Starting to ask around internally for help on this issue, we'll get it figured out.

Luke Thompson

unread,
Aug 19, 2015, 1:17:44 PM8/19/15
to StrangeIoC
Hi all, apologies I haven't been able to help on this as planned. The usual case of other things being, if not more important, then more urgent. But really glad to see things happening! I know a few people at Unity (mostly on the UK side), and if it'd help I can get them to put out feelers internally too.

wcorwin

unread,
Sep 10, 2015, 1:27:00 PM9/10/15
to StrangeIoC
To follow up on this, turns out my xbone was hosed and needs to be returned. I guess this happens a lot? Lol. I'll get another one and try it out.

Luke Thompson

unread,
Sep 10, 2015, 2:06:23 PM9/10/15
to StrangeIoC
That increases my suspicions mine might be dodgy too... I've yet to manage to connect to it.

Luke Thompson

unread,
Oct 26, 2015, 8:48:41 AM10/26/15
to StrangeIoC
Hi all. Any progress? We've released the PC version of our game, so we're looking toward the console versions now.

Robert Noack

unread,
Oct 26, 2015, 10:22:51 AM10/26/15
to StrangeIoC
Well, Nintendo finally posted a version of unity based on 5.2, so, I may actually be able to try this out again soon. (but no status update currently from me)

ce...@elinemedia.com

unread,
Oct 26, 2015, 12:44:35 PM10/26/15
to StrangeIoC
I have had to implement my own alternative to Strange, one that avoids the AOT exceptions thrown on consoles.

Luke Thompson

unread,
Oct 28, 2015, 5:47:08 PM10/28/15
to StrangeIoC
As in, a modification to Strange? Or an entirely new solution?

Nicholas DiMucci

unread,
Dec 12, 2015, 7:43:51 PM12/12/15
to StrangeIoC
Just poking my head in. I'll also be getting ready to do console ports of my game, so I'm eager to see if any progress is being made on this. 

Robert Noack

unread,
Dec 12, 2015, 7:52:13 PM12/12/15
to StrangeIoC
I was still unable to get it to work using the unity 5 based wii u version. As far as I know strangeioc needs major Refactoring to remove generic type usage, or, unity backend needs to change to be better at stripping assemblies.

Unity even in 5.3 also can not seem to create a working Web gl build either. As far as I can tell it is the exact same issue. Probably, if someone can get it to work on webgl, the same would work for the consoles.

Nicholas DiMucci

unread,
Dec 13, 2015, 9:24:47 AM12/13/15
to StrangeIoC
Interesting that generics would be the culprit, since IL2CPP supports them. I imagine there would be issues not just in the Strange code, but in the UnityEngine namespace as well. But I haven't debugged anything yet so I'm just making educated assumptions at this point.

I think the proper solution is to handle it at the IL2CPP layer. Though I'm not hopeful the Unity team will find time soon to look into this, given how long the issue has remained outstanding. This is a huge showstopper for my studio. When the time comes to start the console ports in the coming months, I'll start debugging the issue myself, and hopefully I can help shed some light on the issue. 

wcorwin

unread,
Dec 18, 2015, 9:16:43 PM12/18/15
to StrangeIoC
It's not il2cpp, and it's not "generics" in the broader sense. It appears to be a vtable stripping issue but I can't figure out why or how and honestly, I've been way too busy to devote work hours to this. I'll download 5.3.1 and mess with it a bit this weekend and see if webgl is working properly. I always assumed iOS was the toughest use case, with hard and fast AOT rules. The fact that consoles didn't work took me by surprise.

I took a bit of time setting up my xbone at work today, but sadly the xdk is 8gb so I didn't get the download finished before I had to leave. Once that's on I should be able to debug a bit. 

Luke Thompson

unread,
Dec 18, 2015, 9:22:19 PM12/18/15
to StrangeIoC
Many thanks Will - got all sets of fingers crossed that you can figure it out!

wcorwin

unread,
Dec 23, 2015, 4:28:36 PM12/23/15
to StrangeIoC
Basic functionality seems to work fine.

Just include a link in your link.xml like:

<type fullname="strange.*" preserve="all"/>

I was under the impression everyone had been doing this since they tried it the first time. AOT builds will require link.xml for most generic implementations. Or janky code. let's use link.xml. Keep in mind to include whatever namespaces you want to flag in your own code, as well.

Implicit binder is not working. I'll dig more deeply. Isn't throwing any errors, which is bizarre.

Also those of you who are xbox one developers should be using the official unity xbox one platform forums for these issues. Searching on strangeioc yields no hits, so none of you even tried to reach the xbox devs :/ Hoping that's not the case for some of you using wii/ps4. This is actually a listed issue in the FAQ on that forum. Let me know if you don't have access. I'm not sure how to grant it, though. I think it has something to do with your xbox dev license, so it's hidden.

I'll make implicit binder work.

wcorwin

unread,
Dec 23, 2015, 5:08:08 PM12/23/15
to StrangeIoC
Regarding implicitBinder, I'll have a chat with colleagues on xbox one after the holidays. GetExecutingAssembly() isn't returning what is to be expected.

In your Context, instead of doing this:
implicitBinder.Assembly = Assembly.GetExecutingAssembly();

do this:
this.GetType().Assembly; (this is unnecessary, I just use it for clarity/standards)

If you all have any other issues, please let me know. I'm going to assume this issue is resolved until you let me know specific details about what is broken.

wcorwin

unread,
Dec 23, 2015, 5:20:28 PM12/23/15
to StrangeIoC
One final note: I built a StrangeIoC dll in my Assets folders. I don't copy the strange source in to my games.
Reply all
Reply to author
Forward
0 new messages