Menu

LEX File Exchange
EA Support Files
SC4 Wikipedia
Network Addon Mod
Dependencies
Chat

Author Topic: Batch Png to Fsh tool  (Read 53636 times)

0 Members and 1 Guest are viewing this topic.

Offline Swordmaster

Re: Batch Png to Fsh tool
« Reply #80 on: April 05, 2013, 03:40:40 AM »
I've tested the texture and it works fine. So you may be missing something (DLLs?)


Cheers
Willy

Offline null45

  • Lex Certified
  • Forums Mayor
  • *
  • Posts: 221
  • Total likes: 27
  • Reputation: 18
  • CL:
    All formats lead to FSH
Re: Batch Png to Fsh tool
« Reply #81 on: April 05, 2013, 05:41:38 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.

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

Offline vortext

  • Administrator
  • Forums Guru
  • *
  • Posts: 3364
  • Total likes: 578
  • Reputation: 23
  • CL:
    Street Smarts
Re: Batch Png to Fsh tool
« Reply #82 on: April 05, 2013, 08:40:16 AM »
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

Offline Rayden

  • BSC Team
  • Forums Parliamentarian
  • *
  • Posts: 1261
  • Total likes: 1
  • Reputation: 13
  • Call me Silvio
  • CL: ()CaMsTeR()
Re: Batch Png to Fsh tool
« Reply #83 on: April 05, 2013, 03:33:18 PM »
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:

Code: [Select]
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.
« Last Edit: April 05, 2013, 04:24:56 PM by Rayden »

Offline null45

  • Lex Certified
  • Forums Mayor
  • *
  • Posts: 221
  • Total likes: 27
  • Reputation: 18
  • CL:
    All formats lead to FSH
Re: Batch Png to Fsh tool
« Reply #84 on: April 05, 2013, 09:17:43 PM »
That should now be fixed in both tools, file version updated to 1.5.1.2.

Offline Rayden

  • BSC Team
  • Forums Parliamentarian
  • *
  • Posts: 1261
  • Total likes: 1
  • Reputation: 13
  • Call me Silvio
  • CL: ()CaMsTeR()
Re: Batch Png to Fsh tool
« Reply #85 on: April 06, 2013, 08:14:51 AM »
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().

Code: [Select]
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.
« Last Edit: April 06, 2013, 08:17:31 AM by Rayden »

Offline null45

  • Lex Certified
  • Forums Mayor
  • *
  • Posts: 221
  • Total likes: 27
  • Reputation: 18
  • CL:
    All formats lead to FSH
Re: Batch Png to Fsh tool
« Reply #86 on: April 06, 2013, 04:18:30 PM »
The only thing I can think of is to repair your .NET Framework install.




Offline Rayden

  • BSC Team
  • Forums Parliamentarian
  • *
  • Posts: 1261
  • Total likes: 1
  • Reputation: 13
  • Call me Silvio
  • CL: ()CaMsTeR()
Re: Batch Png to Fsh tool
« Reply #87 on: April 06, 2013, 05:08:34 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.

Offline null45

  • Lex Certified
  • Forums Mayor
  • *
  • Posts: 221
  • Total likes: 27
  • Reputation: 18
  • CL:
    All formats lead to FSH
Re: Batch Png to Fsh tool
« Reply #88 on: April 06, 2013, 07:25:48 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.

Offline Rayden

  • BSC Team
  • Forums Parliamentarian
  • *
  • Posts: 1261
  • Total likes: 1
  • Reputation: 13
  • Call me Silvio
  • CL: ()CaMsTeR()
Re: Batch Png to Fsh tool
« Reply #89 on: April 06, 2013, 07:45:13 PM »
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.

Offline Rayden

  • BSC Team
  • Forums Parliamentarian
  • *
  • Posts: 1261
  • Total likes: 1
  • Reputation: 13
  • Call me Silvio
  • CL: ()CaMsTeR()
Re: Batch Png to Fsh tool
« Reply #90 on: April 07, 2013, 06:38:28 AM »
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

Offline null45

  • Lex Certified
  • Forums Mayor
  • *
  • Posts: 221
  • Total likes: 27
  • Reputation: 18
  • CL:
    All formats lead to FSH
Re: Batch Png to Fsh tool
« Reply #91 on: April 08, 2013, 03:37:15 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.

Offline Rayden

  • BSC Team
  • Forums Parliamentarian
  • *
  • Posts: 1261
  • Total likes: 1
  • Reputation: 13
  • Call me Silvio
  • CL: ()CaMsTeR()
Re: Batch Png to Fsh tool
« Reply #92 on: April 08, 2013, 11:38:16 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$%

Offline whatevermind

Re: Batch Png to Fsh tool
« Reply #93 on: April 08, 2013, 09:34:34 PM »
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.

Offline Indiana Joe

  • NAM Team
  • Forums Governor
  • *
  • Posts: 453
  • Total likes: 72
  • Reputation: 2
  • Of Fruit Flies and Bananas
Re: Batch Png to Fsh tool
« Reply #94 on: July 11, 2013, 02:35:50 PM »
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... :-[
« Last Edit: July 11, 2013, 03:36:10 PM by Indiana Joe »

Offline null45

  • Lex Certified
  • Forums Mayor
  • *
  • Posts: 221
  • Total likes: 27
  • Reputation: 18
  • CL:
    All formats lead to FSH
Re: Batch Png to Fsh tool
« Reply #95 on: August 02, 2014, 12:04:36 AM »
Fixed a bug with the Process button and embedded mipmaps, file version updated to 1.5.1.4.

Offline Apple Delight

Re: Batch Png to Fsh tool
« Reply #96 on: November 16, 2014, 05:32:28 PM »
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.

Offline null45

  • Lex Certified
  • Forums Mayor
  • *
  • Posts: 221
  • Total likes: 27
  • Reputation: 18
  • CL:
    All formats lead to FSH
Re: Batch Png to Fsh tool
« Reply #97 on: November 17, 2014, 01:01:26 PM »
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).

Offline Apple Delight

Re: Batch Png to Fsh tool
« Reply #98 on: November 19, 2014, 07:42:56 PM »
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.

Offline null45

  • Lex Certified
  • Forums Mayor
  • *
  • Posts: 221
  • Total likes: 27
  • Reputation: 18
  • CL:
    All formats lead to FSH
Re: Batch Png to Fsh tool
« Reply #99 on: November 20, 2014, 06:57:31 PM »
That is strange, there is no reason it should be duplicating files.
Could you upload a zip containing the images you are using?