Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Odd weaver error when extending class in different assembly #88

Closed
mtornwall opened this issue Apr 20, 2017 · 3 comments
Closed

Odd weaver error when extending class in different assembly #88

mtornwall opened this issue Apr 20, 2017 · 3 comments

Comments

@mtornwall
Copy link

mtornwall commented Apr 20, 2017

OK, this is a perplexing one.

To reproduce, create two projects so that the below database classes are defined in different assemblies:

// Assembly 1
[Database] public abstract class Base { }
// Assembly 2
[Database] public class Derived : Base { }

Build it. If all goes well, make a trivial change in Derived and do a regular Build, not a Rebuild. The weaver should now fail with:

1>C:\Program Files\Starcounter\Starcounter.MsBuild.targets(73,5): error SCERR6066: System.Exception: ScErrUnhandledWeaverException (SCERR6066): An unhandled, unidentified (non-Starcounter) exception occurred in the weaver.
1>C:\Program Files\Starcounter\Starcounter.MsBuild.targets(73,5): error SCERR6066: Version: 2.4.0.1315.
1>C:\Program Files\Starcounter\Starcounter.MsBuild.targets(73,5): error SCERR6066: Help page: https://github.com/Starcounter/Starcounter/wiki/SCERR6066. ---> System.NullReferenceException: Object reference not set to an instance of an object.
1>C:\Program Files\Starcounter\Starcounter.MsBuild.targets(73,5): error SCERR6066:    at Starcounter.Internal.Weaver.BackingInfrastructure.TypeSpecificationEmit.AssignInstanceLevelFields() in C:\TeamCity\BuildAgent\work\sc-3592\Level1\src\Starcounter.Weaver\Starcounter.Internal.Weaver\BackingInfrastructure\TypeSpecificationEmit.cs:line 168
1>C:\Program Files\Starcounter\Starcounter.MsBuild.targets(73,5): error SCERR6066:    at Starcounter.Internal.Weaver.BackingInfrastructure.AssemblySpecificationEmit.IncludeDatabaseClass(TypeDefDeclaration databaseClassTypeDef) in C:\TeamCity\BuildAgent\work\sc-3592\Level1\src\Starcounter.Weaver\Starcounter.Internal.Weaver\BackingInfrastructure\AssemblySpecificationEmit.cs:line 80
1>C:\Program Files\Starcounter\Starcounter.MsBuild.targets(73,5): error SCERR6066:    at Starcounter.Internal.Weaver.ScTransformTask.Execute() in C:\TeamCity\BuildAgent\work\sc-3592\Level1\src\Starcounter.Weaver\Starcounter.Internal.Weaver\ScTransformTask.cs:line 276
1>C:\Program Files\Starcounter\Starcounter.MsBuild.targets(73,5): error SCERR6066:    at PostSharp.Sdk.Extensibility.Project.ExecutePhase(String phase)
1>C:\Program Files\Starcounter\Starcounter.MsBuild.targets(73,5): error SCERR6066:    at PostSharp.Hosting.PostSharpObject.ExecuteProjects()
1>C:\Program Files\Starcounter\Starcounter.MsBuild.targets(73,5): error SCERR6066:    at PostSharp.Hosting.PostSharpObject.ProcessAssemblies(ModuleLoadStrategy[] modules)
1>C:\Program Files\Starcounter\Starcounter.MsBuild.targets(73,5): error SCERR6066:    at Starcounter.Weaver.CodeWeaver.Execute() in C:\TeamCity\BuildAgent\work\sc-3592\Level1\src\Starcounter.Weaver\CodeWeaver.cs:line 257
1>C:\Program Files\Starcounter\Starcounter.MsBuild.targets(73,5): error SCERR6066:    at Starcounter.Weaver.CodeWeaver.ExecuteCurrent(CodeWeaver weaver) in C:\TeamCity\BuildAgent\work\sc-3592\Level1\src\Starcounter.Weaver\CodeWeaver.cs:line 82
1>C:\Program Files\Starcounter\Starcounter.MsBuild.targets(73,5): error SCERR6066:    --- End of inner exception stack trace ---

I really have no idea what's going on, but the essential ingredients seem to be:

  1. Not rebuilding the entire solution.
  2. Putting the classes in different projects (presumably related to the first point?).
  3. One class extends the other.
  4. The derived class has a nontrivial constructor.
@per-samuelsson
Copy link

This is certainly a 2.4-specific bug, probably caused by the rewrite of the weaver from runtime to buildtime.

Like I've stated many times before: 2.4 is to be considered bleeding edge, and using it at this time is going to be shaky. Just want everybody to really understand that: you can't expect the same level of stability as in 2.3.

Really appreciate the reports coming in though, so if you can live with the bumpy ride, please keep using it and report all abnormalities like this and we can eventually address them.

@per-samuelsson
Copy link

One good thing: I can repro this one using the exact above instructions. I'll deal with it shortly, as part of my 2.4 stabilizing work.

@miyconst
Copy link
Member

miyconst commented Dec 6, 2019

Closing as won't fix in Starcounter 2 and the issue is not applicable for the upcoming Starcounter 3.

@miyconst miyconst closed this as completed Dec 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants