B4J Question [ABMaterial] - compile error in release mode

Harris

Expert
Licensed User
Longtime User
My PC (win 8.1) reboot on its' own (as it likes to do occasionally), and now I get this error when trying to compile in release mode.

Code:
Apr 04, 2016 4:09:42 PM com.mchange.v2.log.MLog <clinit>

path: C:\ANYWHE~1\B4J\ABM108\ABMTI\Objects/tripinspect
GZipping HTML, JavaScript and CSS files...
Optimizing new and updated PNG files...
abmapplication._startserver (java line: 467)
java.lang.ArrayIndexOutOfBoundsException: 1
    at com.ab.abmaterial.ABMaterial.WriteAppLauchPageToDisk(Unknown Source)
    at abmtripinspect.ti.com.abmapplication._startserver(abmapplication.java:467)
    at abmtripinspect.ti.com.main._appstart(main.java:78)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:93)
    at anywheresoftware.b4a.BA.raiseEvent(BA.java:84)
    at abmtripinspect.ti.com.main.main(main.java:29)



IF I comment out this block below, I don't get the error? I also don't get any of waht it does as well.

It all runs fine in debug mode - without any code commented out...


Code:
   #If RELEASE
        ABM.PreloadAllJavascriptAndCSSFiles=True ' NEW, When the WebApp start, ALL JS/CSS files are pre-loaded
        ABM.ActivateGZip("MYCODEurj", 1000) ' NEW, All files bigger than 1000bytes will be pre GZipped
        ABM.AppDefaultPageCSSInline=True ' NEW, generated CSS included in the HTML, not in seperate files
        ABM.AppDefaultPageJSInline=True ' NEW, generated JS included in the HTML, not in seperate files
   
        Dim folders As List ' NEW, add the folders where your images are (PNG files) and they will be optimized for you
        folders.Initialize
        folders.Add(File.DirApp & "/www/" & AppName & "/images")   
        ABM.ActivatePNGOptimize("MYCODEpass", folders, False , 9, False)
    #End If
 
Yes, it was the images folder. The two logo files in it (one created by gzip) could be opened with paint just fine.
I also store my /pics folder under here for the images related to equipment types. These are not being zipped since they are not named in folders.add() - and they are smaller than 1000 bytes anyway,
I deleted the folder and replaced it with a backup. Now all is fine.

Thanks
 
Upvote 0
Back
Top