Error: Attempted to read or write protected memory

9 replies [Last post]
User offline. Last seen 2 days 14 hours ago.
Posts: 28

I've been using xNormal v3.17.5 for a long time. Everything was just fine.
Now, I have updated to v3.17.9 to try this plugin (it's designed to create normal maps that will work properly in Unity).

But even before I install this plugin, when I try to simply bake normal map, the subject error appears:

Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

If I reinstall v3.17.5 it again works as expected. I also tried v3.17.8 - the same as in v3.17.9, this error appears.

Here's what I do:

  • Export hipoly mesh as obj from Maya.
  • Export lowpoly mesh with tangents and binormals to FBX from Maya.
  • As usual, add them both to corresponding tabs in xNormal.
  • Enable baking to normal map, size - 512*512, bucket size - 32, Default bucket renderer (for x86). I have to use x86 version since the plugin is compiled for x86 only. I tried both under XP and Seven.
  • Press "Generate Maps" button.
  • As usual, "Preview" window appears. It completes 2 steps: Analyzing and Reading. And then this error pops up.

What do I need to do to make the last versions of xNormal work?

User offline. Last seen 3 days 5 hours ago.
Posts: 599

What happens if you use a .OBJ lowpoly file instead, pls?

Can you also try with the mkttspace tangent basis calculator and not with that 3rd party plug-in, pls?

------------------------------------------------------

http://www.xnormal.net

http://santyhammer.blogspot.com

http://www.ratgpu.com

User offline. Last seen 2 days 14 hours ago.
Posts: 28

Thank you for fast response.

jogshy wrote:

Can you also try with the mkttspace tangent basis calculator and not with that 3rd party plug-in, pls?

I even haven't installed it yet. The only reason I mentioned this plugin is to explain why I have updated to new version of xNormal.

jogshy wrote:

What happens if you use a .OBJ lowpoly file instead, pls?

Just tried that - it works fine. It calculates normal map as usually. No errors, no artifacts. But, AFAIK, OBJ doesn't allow to export tangents and binormals. And I need it to calculate the map that will display properly in unity.

BtW: what about native support of Unity's normals?

User offline. Last seen 3 days 5 hours ago.
Posts: 599

Ok so the problems seems related to the FBX mesh importer.

Could you send me your lowpoly FBX file to test , pls?

------------------------------------------------------

http://www.xnormal.net

http://santyhammer.blogspot.com

http://www.ratgpu.com

User offline. Last seen 2 days 14 hours ago.
Posts: 28

Here's the same lowpoly mesh exported to both FBX and OBJ.
Additionaly, here's also highpoly mesh just in case you need it: http://www.sendspace.com/file/2hi4lp (I had to upload it to external file hosting due to 2mb limit here).

And, finally, here's my computer configuration (again, just in case you may need it):
Intel dual-core E5400 2.7GHz*2.7GHz
2 Gb RAM
NVIDIA  GeForce 9600 GT @ 512Mb

AttachmentSize
wagon-cap.fbx 33.16 KB
wagon-cap.obj 3.37 KB
User offline. Last seen 3 days 5 hours ago.
Posts: 599

Thanks a lot, Lex. I'll debug in depth the problem with your files.

------------------------------------------------------

http://www.xnormal.net

http://santyhammer.blogspot.com

http://www.ratgpu.com

User offline. Last seen 2 days 14 hours ago.
Posts: 28

Thank you for all your replies.

I'd also appreciate if you let me know as soon as this problem is solved. Because this normals issue is the only thing that currently keeps our game from beta release.

User offline. Last seen 3 days 5 hours ago.
Posts: 599

Confirmed. It's a bug. I've fixed it and I'll release a patch with the 3.17.10 soon.

Thanks!

 

------------------------------------------------------

http://www.xnormal.net

http://santyhammer.blogspot.com

http://www.ratgpu.com

User offline. Last seen 7 weeks 5 days ago.
Posts: 2

Hi  suffer from the same problem.
long story short trying to bake directionmap  from a zbrush sculpt onto a retopolized mesh.

choosing .exr format no outrages settings in xnormals. i hit render and "Attemped to read or write protected memory. This is often an indication that other memory is corrupt." appears.

the low version is 11244 triangles.

the sculpt is around 1.426 milions in zbrush.

uisng the latest xnormals 3.17.13

my computer has win 7 x64 .
8 gig ram.

tried  .fbx and .obj

// RipNic

User offline. Last seen 3 days 5 hours ago.
Posts: 599

Are you using the Unity's plugin? or the mkktspace?

if you change to the default tangent basis calculator and works ok then may be a problem with the Unity plugin.

------------------------------------------------------

http://www.xnormal.net

http://santyhammer.blogspot.com

http://www.ratgpu.com

This Post needs Your Comment!

The content of this field is kept private and will not be shown publicly.
CAPTCHA
Are you human?