Building in 32-bit vs 64-bit

.NET obfuscator and automated error reporting

Moderators: Luke Jefferson, melvyn.harbour, dom.smith

Building in 32-bit vs 64-bit

Postby dave.wolfe » Wed Apr 24, 2013 10:15 pm

I'm writing a plugin for AutoCAD. I recently moved from a 64-bit to 32-bit development environment. I am now updating one of my plugins, and when I build the plugin in 32-bit, it won't load in 64-bit even though it runs fine in 32-bit. Is there a way around that?

I can build the same file in 64-bit and it works, but I really want to develop everything in 32-bit.
dave.wolfe
 
Posts: 4
Joined: Wed Apr 24, 2013 10:09 pm

Postby james.billings » Fri Apr 26, 2013 9:17 am

I can't quite tell from your message where Smartassembly is fitting into the problem- do you mean that Smartassembly cannot process the assembly now it's built for 32-bit? Or AutoCAD won't load the plugin after you've run it through SA?

If you can let us know the errors you're seeing and at what point it fails, we can maybe advise further...
james.billings
 
Posts: 1146
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.

Postby dave.wolfe » Fri Apr 26, 2013 12:14 pm

AutoCAD won't load the plugin on x64, but the same plugin will load on 32 bit.

Also, weird is that including the dynamic proxy reference option causes a memory leak in x64, whenever the plugin is loaded with that option. Is that normal?
dave.wolfe
 
Posts: 4
Joined: Wed Apr 24, 2013 10:09 pm

Postby james.billings » Fri Apr 26, 2013 12:21 pm

Do you get any error message that may be helpful in understanding what's happening?

I've not heard of references dynamic proxy introducing a memory leak; but in combination with user code which we can't test, of course anything is possible. How are you diagnosing this?
james.billings
 
Posts: 1146
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.

Postby dave.wolfe » Fri Apr 26, 2013 1:37 pm

No error messages.

My project loads/runs without leaks without using SmartAssembly. I even demoed Memory Profiler to try to find an issue, and there was none, on an un-SA'd assembly.

I did an SA project in 32-bit using just merging/embedding since that seems to introduce the least amount of change to my code. The dll loads and runs fine on 32-bit. Then I copied the dlls, to 64-bit (built with AnyCPU). The dlls would not load. Finally, I copied the SA settings and transferred my license to the 64-bit, and compiled a new SA assembly. This one loads and runs on 32-bit and 64-bit, which led me to my conclusion.

For the memory leak, it never occurred on 32-bit. On 64-bit I went through starting with only embedding/merging and the leak did not occur. The leak only occurred when Dynamic proxy references were included.
dave.wolfe
 
Posts: 4
Joined: Wed Apr 24, 2013 10:09 pm

Postby james.billings » Fri Apr 26, 2013 1:55 pm

Without knowing more about how the Plugins are loaded or getting some sort of error it's impossible to really say what would cause this.
Smartassembly /should/ output the assembly the same as the input.

I can check this end for any known issues around bitness- can you tell me the version of SA you're using, along with the versions of Windows both for the dev machine and a deployment where it worked/failed?
james.billings
 
Posts: 1146
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.

Postby dave.wolfe » Fri Apr 26, 2013 3:27 pm

Smart Assembly Standard Version 6.7.0.239.

Windows 7 32-bit
Windows 7 64-bit
dave.wolfe
 
Posts: 4
Joined: Wed Apr 24, 2013 10:09 pm

Postby james.billings » Fri Apr 26, 2013 3:38 pm

Thanks-

I've had some colleagues check over this thread as well and we don't really have any idea as to what would be causing this.

Are you able to share the assembly (both before and after(s))? If so, can you zip them up and send them to support@red-gate.com adding F0072243 in the subject line.
james.billings
 
Posts: 1146
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.


Return to SmartAssembly 6

Who is online

Users browsing this forum: No registered users and 0 guests