1

Closed

MoDrive.MemoryValue explicit layout breaks on x64

description

When compiled under x64, the explicit layout defined for MoDrive.MemoryValue causes a TypeLoadException at startup:
 
System.TypeLoadException was unhandled
Message="Could not load type 'MoDrive.MemoryValue' from assembly 'MoDrive, Version=1.0.3056.23276, Culture=neutral, PublicKeyToken=null' because it contains an object field at offset 12 that is incorrectly aligned or overlapped by a non-object field."
Source="MoDrive"
TypeName="MoDrive.MemoryValue"
StackTrace:
   at MoDrive.MemoryEntity..ctor(MemoryWorkspace workspace)
   at MoDrive.MemoryWorkspace.AddEntity() in C:\Users\damienn\Downloads\Dev\CodePlex\MoDrive\MoDrive - 20080515 Alpha\MoDrive\Sources\Domain\Workspace\Workspace.cs:line 241
   at MoDrive.MemoryWorkspace.DefineCore() in C:\Users\damienn\Downloads\Dev\CodePlex\MoDrive\MoDrive - 20080515 Alpha\MoDrive\Sources\Domain\Workspace\Workspace.cs:line 67
   at MoDrive.MemoryWorkspace..ctor() in C:\Users\damienn\Downloads\Dev\CodePlex\MoDrive\MoDrive - 20080515 Alpha\MoDrive\Sources\Domain\Workspace\Workspace.cs:line 58
   at MoDrive.App.Main() in C:\Users\damienn\Downloads\Dev\CodePlex\MoDrive\MoDrive - 20080515 Alpha\MoDrive\Sources\App.cs:line 35
   at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
   at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.ThreadHelper.ThreadStart()
InnerException:
 
Forcing the build to x86 alleviates the problem.
Closed Aug 11, 2008 at 11:53 AM by TEISSEDRE
Explicit layout removed

comments