#Burst Compilation failing with reason 'Unknown'

1 messages · Page 1 of 1 (latest)

junior goblet
#

This is the log message:

Failed to find entry-points:
Burst.Compiler.IL.CompilerExceptionAssemblyResolution: Unable to resolve type `Schnozzle.AI.Data.IExecutionContext`1<Schnozzle.UseCase.Inputs.BasicAIInputType>. Reason: Unknown.`
  at Burst.Compiler.IL.Helpers.CecilExtensions.StrictResolve (Mono.Cecil.TypeReference typeReference) [0x0003b] in <532a8a169e6a4953b5d9a4c213b71772>:0 
  at Burst.Compiler.IL.Server.EntryPointMethodFinder.FindEntryPoints (System.String[] rootAssemblyNames, Burst.Compiler.IL.Hashing.CacheRuntime.HashCacheAssemblyStore assemblyStore, Burst.Compiler.IL.AssemblyLoader assemblyLoader, Burst.Compiler.IL.NativeCompilerOptions options, Burst.Compiler.IL.Server.ProfileDelegate profileCallback, System.Boolean includeRootAssemblyReferences, System.Boolean splitTargets) [0x00662] in <532a8a169e6a4953b5d9a4c213b71772>:0 
  at Burst.Compiler.IL.Server.CompilerServer.FindMethods (Burst.Compiler.IL.Server.CompilationRequest request, Burst.Compiler.IL.Server.Caching.CacheManager cacheManager, Burst.Compiler.IL.CompilerStatistics stats) [0x000f5] in <532a8a169e6a4953b5d9a4c213b71772>:0 
  at Burst.Compiler.IL.Server.CompilerServer+<>c__DisplayClass17_0.<Compile>b__0 (Burst.Compiler.IL.Server.Caching.CacheManager cacheManager) [0x00000] in <532a8a169e6a4953b5d9a4c213b71772>:0 
  at Burst.Compiler.IL.Server.CompilerServer+<>c__DisplayClass26_0`1[TResult].<RunTask>b__0 () [0x00145] in <532a8a169e6a4953b5d9a4c213b71772>:0 
  at Burst.Compiler.IL.Server.CompilerServer.RunTask[TResult] (Burst.Compiler.IL.Server.TargetKey target, System.String taskName, System.String[] assemblyFolders, System.Threading.CancellationToken cancellationToken, System.Func`2[T,TResult] function) [0x00131] in <532a8a169e6a4953b5d9a4c213b71772>:0 
  at Burst.Compiler.IL.Server.CompilerServer.Compile (Burst.Compiler.IL.Server.CompilationRequest request, Burst.Compiler.IL.Server.CompilationMessageStreamer streamer, System.Threading.CancellationToken cancellationToken) [0x0017f] in <532a8a169e6a4953b5d9a4c213b71772>:0 

While compiling job:
TypeManager.Initialize took: 132ms
Mono: successfully reloaded assembly
- Finished resetting the current domain, in  1.938 seconds
Domain Reload Profiling: 2744ms
    BeginReloadAssembly (518ms)
        ExecutionOrderSort (0ms)
        DisableScriptedObjects (29ms)
        BackupInstance (0ms)
        ReleaseScriptingObjects (0ms)
        CreateAndSetChildDomain (379ms)
    RebuildCommonClasses (21ms)
empty basin
#

to start with you might as well try burst 1.8.8, because e.g. - Fix compiler crash when compiling different assemblies that define methods or types with the exact same name and namespace

junior goblet
#

It doesn't seem to have thrown an error yet, ill try instantiating the generic system and jobs

empty basin
#

there are not a ton of examples of it happening internally; it's pretty much either a) when somebody was working on a compilation pipe and screwed it up, or b) burst was asked to burst a parameter type that was crazy in some way

junior goblet
#

Yeah I'm assuming I'm just doing something that's not allowed, this has a lot of generics

#

When registering the job it throws an error now

empty basin
#

paste your system declaration? just the top line with the struct

#

and then the registergeneric lines

junior goblet
#
[assembly: RegisterGenericSystemType(
    typeof(AIExecutionSystem<
        GameContext,
        DecisionSetBuffer<GameContext, BasicAIInputType>,
        BasicAIInputType
    >)
)]
[assembly: RegisterGenericSystemType(
    typeof(AIExecutorJob<
        GameContext,
        DecisionSetBuffer<GameContext, BasicAIInputType>,
        BasicAIInputType
    >)
)]
empty basin
#

errr AIExecutorJob is a system, despite being named job?

junior goblet
#

🙃

#

copy paste

empty basin
#

i may have forgotten to guard against trying to register non-systems as systems

junior goblet
#

Still throws an error though

empty basin
#

wait so what does it look like now

junior goblet
#
[assembly: RegisterGenericSystemType(
    typeof(AIExecutionSystem<
        GameContext,
        DecisionSetBuffer<GameContext, BasicAIInputType>,
        BasicAIInputType
    >)
)]

[assembly: RegisterGenericJobType(
    typeof(AIExecutorJob<
        GameContext,
        DecisionSetBuffer<GameContext, BasicAIInputType>,
        BasicAIInputType
    >)
)]
empty basin
#

ok, and paste top line of AIExecutionSystem?

junior goblet
#
    public partial struct AIExecutionSystem<TExecutionContext, TDecisionSetBuffer, TEnum> : ISystem
        where TExecutionContext : unmanaged, IExecutionContext<TEnum>
        where TDecisionSetBuffer : unmanaged, IDecisionSetBuffer<TExecutionContext, TEnum>
        where TEnum : unmanaged, Enum

empty basin
#

oh dear

junior goblet
#

Yep

#

I think I'm just going to abandon this idea

#

Too many generics

#

Trying to write this so it can live in an assembly above the game code

empty basin
#

i imagine you could make it work but it'd be surprising to me if it was worth it

junior goblet
#

And it's making it very difficult

#

Any idea why it's failing though?

#

Just so I can avoid whatever that is when writing code

empty basin
#

i haven't the foggiest

junior goblet
#

I just started writing this today in a completely separate unity project, I can send it to you if you want. Otherwise Ill just scrap it and try to re-write it some other way

empty basin
#

oh crap

#

i bet this is just my fault for not converting some crap into other stuff when i was supposed to

junior goblet
#

It failed on 1.8.7 as well though

empty basin
#

no not to do with burst

#

i just emitted some bad bad stuff

#

please hold

#

i bet this is a 1-2 line fix

#

internalize the entities package

#

and then edit Packages/com.unity.entities/Unity.Entities.CodeGen/ISystemPostProcessor.cs

#

starting line 185 or so there should be wrapperName = specializedSystemType.FullName.Replace('/', '_') .Replace('`', '_') .Replace('.', '_') .Replace('<', '_') .Replace('>', '_') + "_" + name;

#

which is replacing all these different characters that aren't supposed to be in names with '_'

junior goblet
#

Alright, give me a sec

#

I found it, but what should I change it to?

empty basin
#

change it to this: wrapperName = specializedSystemType.FullName.Replace('/', '_') .Replace('`', '_') .Replace('.', '_') .Replace(',', '_') .Replace(' ', '_') .Replace('=', '_') .Replace('-', '_') .Replace('<', '_') .Replace('>', '_') + "_" + name;

junior goblet
#

That seems to have worked, at least I don't get a compile error anymore

empty basin
#

awesome

junior goblet
#

I get a different error now but it's probably not related

empty basin
#

👍

junior goblet
#

Are you not allowed to use EntityQueryBuilder.WithAll<> on an aspect?

empty basin
#

dunno anything about aspects

#

@delicate sierra tends to know those things probably

junior goblet
#

Yep, I'll ask them

#

Thanks for the help on fixing this ❤️

empty basin
#

np! will try to get this in a patch release

junior goblet
#

What was the issue? The commas in the type declerations?

empty basin
#

yeah

#

i was supposed to convert them to something else and i didnt'

delicate sierra
#

Ayooo, one sec, I'll read

empty basin
#

don't read the whole thing @delicate sierra

#

just the aspect bit

junior goblet
#

I can also open a separate thread

empty basin
#

just that bit

delicate sierra
junior goblet
delicate sierra
#

As for using it inside an aspect, that entirely depends on where you're calling it from, given you would need either a System or an EntityManager to build the query 😅

delicate sierra
junior goblet
# empty basin awesome

The system also appears correctly in the system viewer so everthing seems to be working 👍

#

I'll close this

delicate sierra
#

I will say, nice to see people still tagging me, now that I'm less active in here than I used to be 👀 (don't hesitate to reach out)

junior goblet
#

haha

junior goblet
#

nevermind I'm blind, it is

delicate sierra
#

Good, I would think it were xD

junior goblet
#

I was looking at WithAll which has no constraints

delicate sierra
#

Yeah that makes sense

junior goblet
#

I guess analyzers would help here with making less mistakes, since you cant constraint it to not aspects, but it's probably not a huge deal

#

Since it's immediately noticeable

delicate sierra
#

Yuppp, but I feel like there's so many cool and nice analyzer tool things we can do in the future, tho I'm sure Rider will come there before us xD

junior goblet
#

Yeah rider has a few cool things already

delicate sierra
#

E.g. they accidentally made the partial check analysis a few days after I did 😆