Jump to content

[Steam] Buttloads of access violations on img2tex.exe when exporting PNGs from Substance Designer


Recommended Posts

When I go to import .pngs I get one access violation on img2tex.exe per .png file I export from Substance Designer. It doesn't happen for .tga as far as I can tell so I think I'll just use that format for now.

 

To reproduce:

 

- Export bitmaps from Substance Designer into the Leadwerks Materials directory, saving as .png.

- Export bitmaps from Substance Designer into the Leadwerks Materials directory a second time.

 

You can get a trial of Substance Designer here:

 

http://www.allegorithmic.com/download

 

Once you've installed it, open one of the sample .sbs files. To export the bitmaps, right-click on the thing I circled and click "Export outputs as bitmaps" on the drop-down menu, then use the dialog box to tell Substance Designer where to put the files.

 

 

JqAKsgd.png

 

 

If you do this twice, you should get access violations on img2tex.exe. Let me know if you can reproduce.

 

System information:

 

Processor Information:

Vendor: AuthenticAMD

CPU Family: 0x10

CPU Model: 0xa

CPU Stepping: 0x0

CPU Type: 0x0

Speed: 3193 Mhz

6 logical processors

6 physical processors

HyperThreading: Unsupported

FCMOV: Supported

SSE2: Supported

SSE3: Supported

SSSE3: Unsupported

SSE4a: Supported

SSE41: Unsupported

SSE42: Unsupported

 

Network Information:

Network Speed:

 

Operating System Version:

Windows 8.1 (64 bit)

NTFS: Supported

Crypto Provider Codes: Supported 311 0x0 0x0 0x0

 

Video Card:

Driver: NVIDIA GeForce GTX 780

 

DirectX Driver Name: nvd3dum.dll

Driver Version: 9.18.13.3221

DirectX Driver Version: 9.18.13.3221

Driver Date: 19 Dec 2013

OpenGL Version: 4.4

Desktop Color Depth: 32 bits per pixel

Monitor Refresh Rate: 59 Hz

DirectX Card: NVIDIA GeForce GTX 780

VendorID: 0x10de

DeviceID: 0x1004

Number of Monitors: 2

Number of Logical Video Cards: 2

No SLI or Crossfire Detected

Primary Display Resolution: 1920 x 1200

Desktop Resolution: 3840 x 1200

Primary Display Size: 21.50" x 13.86" (25.55" diag)

54.6cm x 35.2cm (64.9cm diag)

Primary Bus: PCI Express 16x

Primary VRAM: 3071 MB

Supported MSAA Modes: 2x 4x 8x

 

Sound card:

Audio device: Speakers (High Definition Audio

 

Memory:

RAM: 8163 Mb

 

Miscellaneous:

UI Language: English

Microphone: Not set

Media Type: DVD

Total Hard Disk Space Available: 1106365 Mb

Largest Free Hard Disk Block: 289086 Mb

OS Install Date: Dec 31 1969

Game Controller: Gamepad detected

Link to comment
Share on other sites

Hi JedTheKrampus

 

I too have had issues with this, as discussed in this thread http://www.leadwerks.com/werkspace/topic/7900-save-png-exception/

it also happens when I save a png from crazybump too.

 

I've noticed with substance if you lower the size of the output node sometimes it works. I usually change the default format to RGBA and no mipmap.

 

If you save the png from those programs in a Project folder the exception happens, however if you reload the editor the file imports.

 

The only current solution I have for you is to save the file elsewhere and then move it into the LE folder.

 

Cheers

trindieprod.png?dl=0spacer.png?dl=0steam-icon.png?dl=0twitter-icon.png?dl=0spacer.png?dl=0
Link to comment
Share on other sites

I, too, are sometimes problems to import textures I generated in World Machine (especially the grey-scale heightmaps):

 

1) I get an error that the found mipmap is fifferent than the expected one which gets me an AccessError. Opening and saving the file in Gimp helps.

 

2) It seems LE doesn't like it when you're saving an asset from another tool right into the asset folders (AccessError again). I guess it acts upon a change event from the OS and tries to import the asset right way although it's still being written.

Link to comment
Share on other sites

Can everyone confirm this is caused when the file is being written to, not due to the file format itself?

 

That makes it sort of a tricky situation. We could add an arbitrary delay, but that's not exactly a fool-proof solution.

 

 

Link to comment
Share on other sites

Somehow I've only been able to reproduce it with .png files from Substance Designer. Are you testing on a system with an HDD or an SSD?

 

I think that the problem is that the editor is trying to read the file before the other process is done writing it. Maybe there's some way you could poll the OS to see whether the file has been closed for writing by the other process before starting to read, and make sure that no new assets have been written in the last second before Leadwerks starts to import things? Easier said than done I bet.

 

You can get the file I'm testing with here: https://mega.co.nz/#!lQF0kSaB!Bi09s24vTGPnrrxugLctElIpftNrVNPI_0oU8JMLrx0

 

Try exporting as .png, .tga, and .bmp at least, and at both high resolutions and low. You can increase the resolution of the output by double-clicking on the empty space in the node graph in the middle (if you've selected any nodes), then going to the right panel and adjusting the Output Size parameters under Base Parameters.

Link to comment
Share on other sites

Jed, can you confirm this?

-Files imported when they are being exported from another program can have errors.

-The same files, if saved while Leadwerks is not running, and then imported, work fine?

 

If you can confirm this, a simple solution might be to attempt to open the file with write permissions, and then wait if the file can't be opened.

 

 

Link to comment
Share on other sites

FYI, this is a harder problem to solve that requires a lot of testing, so I will be focusing on simpler stuff first I can fix quickly. However this is still important and definitely needs some redesign to accomodate these apps.

 

I think I never caught it before because most paint programs write to a temporary file and then rename it.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

  • 3 months later...
Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...