• Welcome to SC4 Devotion Forum Archives.

Batch Png to Fsh tool

Started by null45, June 05, 2009, 09:29:16 PM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

Swordmaster

I've tested the texture and it works fine. So you may be missing something (DLLs?)


Cheers
Willy

null45

Quote from: Rayden on April 05, 2013, 01:20:58 AM
No, just that. I also tried your other tool Multifsh and it gave me the same error, but I remember it show some more info. I'm not home now but I'll try to get that info later. Anyway, if you could just test that texture yourself, you may get that info as well. Thx for your help.

What version are you using?
If you are using Photoshop 6.0 or later you could use the Fsh format plugin as a workaround.

Quote from: Swordmaster on April 05, 2013, 01:40:40 AM
I've tested the texture and it works fine. So you may be missing something (DLLs?)

It works for me also, without the stack trace I have no clue what is crashing. &mmm

vortext

The same happens for me when I try to process a large number of textures at once. Try breaking it down into smaller batches.
time flies like a bird
fruit flies like a banana

Rayden

#83
With me it happens regardless I try to process one or several images. I tried Multifsh and when the program starts it gives me this error:



And the text is:

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at loaddatfsh.Multifshfrm.RandomHexString(Int32 length)
   at loaddatfsh.Multifshfrm.Multifshfrm_Load(Object sender, EventArgs e)
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5466 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
----------------------------------------
Multifshview
    Assembly Version: 1.3.0.8
    Win32 Version: 1.3.0.8
    CodeBase: file:///C:/Users/Silvio/Desktop/MultiFsh/Multifshview.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5468 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5467 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5467 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Microsoft.WindowsAPICodePack.Shell
    Assembly Version: 1.1.0.0
    Win32 Version: 1.1.0.0
    CodeBase: file:///C:/Users/Silvio/Desktop/MultiFsh/Microsoft.WindowsAPICodePack.Shell.DLL
----------------------------------------
FshDatIO
    Assembly Version: 1.2.0.8
    Win32 Version: 1.2.0.8
    CodeBase: file:///C:/Users/Silvio/Desktop/MultiFsh/FshDatIO.DLL
----------------------------------------
System.Core
    Assembly Version: 3.5.0.0
    Win32 Version: 3.5.30729.5420 built by: Win7SP1
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
Microsoft.WindowsAPICodePack
    Assembly Version: 1.1.0.0
    Win32 Version: 1.1.0.0
    CodeBase: file:///C:/Users/Silvio/Desktop/MultiFsh/Microsoft.WindowsAPICodePack.DLL
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.




If I ignore and try to process an image, then the message "Index was outside the bounds of the array" comes up like in the other tool BatchPng to Fish



By the way, I use Photoshop CS5 Extended and the images where made from slicing an image on PNG format.

null45

That should now be fixed in both tools, file version updated to 1.5.1.2.

Rayden

#85
Still the same :'(

This time, as I have a dual system boot, I tried from within Windows XP. As you cam see from the image attached, I have the NET Framework installed (3.5 SP1) and from the files details from MultiFSH that it's the right version. Still the same kind of message ()what().

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at loaddatfsh.Multifshfrm.RandomHexString(Int32 length) in C:\Dev_projects\sc4\loaddatfsh\Multifshfrm.cs:line 2223
   at loaddatfsh.Multifshfrm.Multifshfrm_Load(Object sender, EventArgs e) in C:\Dev_projects\sc4\loaddatfsh\Multifshfrm.cs:line 2037
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Form.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ContainerControl.WndProc(Message& m)
   at System.Windows.Forms.Form.WmShowWindow(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3643 (GDR.050727-3600)
    CodeBase: file:///D:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
Multifshview
    Assembly Version: 1.3.0.9
    Win32 Version: 1.3.0.9
    CodeBase: file:///D:/Documents%20and%20Settings/Propriet%E1rio/Ambiente%20de%20trabalho/MultiFsh/Multifshview.exe
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3645 (GDR.050727-3600)
    CodeBase: file:///D:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3644 (GDR.050727-3600)
    CodeBase: file:///D:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3644 (GDR.050727-3600)
    CodeBase: file:///D:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
FshDatIO
    Assembly Version: 1.2.0.9
    Win32 Version: 1.2.0.9
    CodeBase: file:///D:/Documents%20and%20Settings/Propriet%E1rio/Ambiente%20de%20trabalho/MultiFsh/FshDatIO.DLL
----------------------------------------
Microsoft.WindowsAPICodePack.Shell
    Assembly Version: 1.1.0.0
    Win32 Version: 1.1.0.0
    CodeBase: file:///D:/Documents%20and%20Settings/Propriet%E1rio/Ambiente%20de%20trabalho/MultiFsh/Microsoft.WindowsAPICodePack.Shell.DLL
----------------------------------------
System.Core
    Assembly Version: 3.5.0.0
    Win32 Version: 3.5.30729.1 built by: SP
    CodeBase: file:///D:/WINDOWS/assembly/GAC_MSIL/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
Microsoft.WindowsAPICodePack
    Assembly Version: 1.1.0.0
    Win32 Version: 1.1.0.0
    CodeBase: file:///D:/Documents%20and%20Settings/Propriet%E1rio/Ambiente%20de%20trabalho/MultiFsh/Microsoft.WindowsAPICodePack.DLL
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.3082 (QFE.050727-3000)
    CodeBase: file:///D:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.


The other tool Batch PNG to FSH, does not give any message when it starts, but if I drag a folder or images into the list box, it does nothing, and if I use the Add button and pick an image, it gives that same error message, out of bounds.

null45

The only thing I can think of is to repair your .NET Framework install.




Rayden

Quote from: null45 on April 06, 2013, 02:18:30 PM
The only thing I can think of is to repair your .NET Framework install.





I did that already, I even found this little tool called "dotnetfx_cleanup_tool" that cleans up every trace of the net framework, including reg keys and everything. I installed the last version of the Net Framework on my W7 system, and today before I tried the XP, I did the same and installed the 3.5 SP1 for WinXP. Tomorrow I'm going to do that again.

null45

Quote from: Rayden on April 06, 2013, 03:08:34 PM
I did that already, I even found this little tool called "dotnetfx_cleanup_tool" that cleans up every trace of the net framework, including reg keys and everything. I installed the last version of the Net Framework on my W7 system, and today before I tried the XP, I did the same and installed the 3.5 SP1 for WinXP. Tomorrow I'm going to do that again.

Then I have no idea what is the problem is.  :(
From the debug info it appears to be failing inside the framework itself, or the location in the stack trace may be wrong.

I could PM you a private build with more logging which may help in isolating the location of the error.

Rayden

Yes, if you please. I thought about that too, I even looked for a log file that could have been generated with some more info that could help you understand where the error might be.

Rayden

Thx mate, the instant I tested your debug version as it came out from the zip, I discovered the fault. It run well no errors, so, I exit and added my instRange ID and change the group as well to "0986135E". I run the program again and the error immediately came up again and showed me where it was. By mistake, I did not complete the final ID of my texture range separated by coma. Beginner's mistake  &ops



Maybe if you could add that info to the program's support page would avoid more people to make that mistake ;)
Thank you very much for your help. :thumbsup:

Cheers
Silvio

null45

Quote from: Rayden on April 07, 2013, 04:38:28 AM
Maybe if you could add that info to the program's support page would avoid more people to make that mistake ;)

In the Readme it says that it uses the same format as SC4Tool, I assumed that people would set it correctly and never checked the length of the array. ::)

In any case that is fixed, file version updated to 1.5.1.3.

Rayden

Quote from: null45 on April 08, 2013, 01:37:15 AM
In the Readme it says that it uses the same format as SC4Tool, I assumed that people would set it correctly and never checked the length of the array. ::)

You never know when a noobie like me comes around $%Grinno$%

whatevermind

Quote from: null45 on April 08, 2013, 01:37:15 AM
In the Readme it says that it uses the same format as SC4Tool, I assumed that people would set it correctly and never checked the length of the array. ::)

That part's really confusing actually, especially if you've never used the SC4Tool.

Indiana Joe

#94
It's been a few months, I hope this is still supported  %confuso

The radio buttons that choose the End Format aren't working for me.  I can't change it from 0-4 to either of the others.

Figured it out--error on my part.  Move along, nothing to see here... :-[

null45

Fixed a bug with the Process button and embedded mipmaps, file version updated to 1.5.1.4.

Apple Delight

I've been having problems with the latest version where I can drag the same group of PNGs to be exported onto the tool but end up with dats that have different missing FSHs on each pass. This is the contents of one the dats the last time that I ran Png to Fsh Batch about a month ago.

There also seems to be bleeding on some of the FSHs that aren't present in the PNGs.
Compare the broken yellow line of the originals on the left with the FSHs on the right.
The bottom one appears as normal, while the top has a ghost in the gutter.

null45

Does the Reader also have missing files?

The bleeding appears to be artifacts of the DXT compression, you can save those files as uncompressed 32-bit ARGB to fix the issue (at the expense of file size).

Apple Delight

I'm not really that familiar with the Reader to notice if the same files are missing (although some are missing), but I have noticed that the many TGI's are repeated but have different file sizes/numbers/locations reported.

null45

That is strange, there is no reason it should be duplicating files.
Could you upload a zip containing the images you are using?