Starcounter / Home

Starcounter is an in-memory database application engine.
https://starcounter.io
27 stars 1 forks source link

Internal property in database class fails with surprising exception #401

Closed Mackiovello closed 4 years ago

Mackiovello commented 6 years ago
using Starcounter;

namespace StarcounterApplication26
{
    [Database]
    public class Person
    {
        internal string Name { get; set; }
    }
    class Program
    {
        static void Main()
        {

        }
    }
}

Throws on start:

The debugging sequence failed with an unexpected error. Consult the Visual Studio activity log for additional information. Error summary: Either body string, body bytes, body stream or resource can be set for Response. (ScErrDebugSequenceFailUnexpect (SCERR12016))

I expected ScErrNonPublicFieldNotExposed (SCERR4285)

Starcounter 2.4.0.5815

miyconst commented 6 years ago

cc @per-samuelsson

per-samuelsson commented 6 years ago

Looks like there is some problem when error message is marshaled from tooling -> VS. Do you see a ScErrNonPublicFieldNotExposed in the log at least?

Mackiovello commented 6 years ago

Yea, these are in the log:

System.Exception: ScErrCantBindAppWithPrivateData (SCERR2149): The application can not start because it contains at least one database class with private data. See separate errors with ID "ScErrNonPublicFieldNotExposed". 1 illegal fields exist. Version: 2.4.0.5815. Help page: https://docs.starcounter.io/?q=SCERR2149. 
   at Starcounter.Server.Commands.StartExecutableCommandProcessor.<>c__DisplayClass4_0.<Execute>b__3(CommandTask task) in C:\TeamCity\BuildAgent\work\sc-17275\Level1\src\Server\Starcounter.Server\Commands\Processors\StartExecutableCommandProcessor.cs:line 178
   at Starcounter.Server.Commands.CommandProcessor.<>c__DisplayClass68_0.<WithinTask>b__0(CommandTask t) in C:\TeamCity\BuildAgent\work\sc-17275\Level1\src\Server\Starcounter.Server\Commands\CommandProcessor.cs:line 487
   at Starcounter.Server.Commands.CommandProcessor.WithinTask(CommandTask task, Func`2 func) in C:\TeamCity\BuildAgent\work\sc-17275\Level1\src\Server\Starcounter.Server\Commands\CommandProcessor.cs:line 515
   at Starcounter.Server.Commands.CommandProcessor.ProcessCommand(NotifyCommandStatusChangedCallback notifyStatusChangedCallback) in C:\TeamCity\BuildAgent\work\sc-17275\Level1\src\Server\Starcounter.Server\Commands\CommandProcessor.cs:line 301
HResult=-2146233088
HelpLink=https://docs.starcounter.io/?q=SCERR2149
ScErrNonPublicFieldNotExposed (SCERR4285): The database field was not public and no public property exist that expose it. StarcounterApplication26.Person.<Name>k__BackingField not exposed
Version: 2.4.0.5815.
Help page: https://docs.starcounter.io/?q=SCERR4285.
per-samuelsson commented 6 years ago

OK, then my assumption was right. Something is buggy in marshaling errors between processes then.

I guess I need to schedule this to fix it, but unsure how to prio. @miyconst, you decide please 😄

miyconst commented 6 years ago

@miyconst, you decide please 😄

Sure, feel free to ignore the issue for now.

miyconst commented 4 years ago

Closing as won't fix in Starcounter 2.4 and not applicable in Starcounter 3.0.