-
8 Oct 2012 3:19 AM #1
Theme Build fails with NegativeArraySizeException if components are hidden by CSS
Theme Build fails with NegativeArraySizeException if components are hidden by CSS
Hello all,
I'm attempting to fix up the IE and older browser compatibility for our app. To that end, I've been using Sencha cmd to put together a theme.html and then slice sprites from it, as covered at http://docs.sencha.com/ext-js/4-1/#!.../command_theme. I'm using a fresh install of 4.1.1a as my SDK, and generated a new app with cmd before adding the paths to .js and .css files to the created theme.html.
However, when I run the following command:
I receive [ERROR] null in the output, after [INFO ] Slicing theme. Running with debug gives the following stacktrace:Code:sencha theme build -page theme\default\theme.html -out temp\theme-output -image temp\image.png -data temp\data.json
A number of sliced pngs, plus the output image and json files, are correctly created (by the look of it), but I'm not sure it's the full set I need. I'd be grateful for any pointers on where to look to resolve this.Code:com.sencha.exceptions.BasicException at com.sencha.exceptions.BasicException.wrap(BasicException.java:43) at com.sencha.cli.Command.dispatch(Command.java:104) at com.sencha.cli.Commands.dispatch(Commands.java:49) at com.sencha.cli.Commands.dispatch(Commands.java:49) at com.sencha.cli.AbstractCommand.dispatch(AbstractCommand.java:184) at com.sencha.command.Sencha.main(Sencha.java:58) Caused by: java.lang.NegativeArraySizeException at java.awt.image.BufferedImage.getRGB(BufferedImage.java:935) at com.sencha.tools.slicer.Slicer.simpleCopy(Slicer.java:123) at com.sencha.tools.slicer.Slicer.copyPixels(Slicer.java:86) at com.sencha.tools.slicer.Sprite.addVerticalSide(Sprite.java:67) at com.sencha.tools.slicer.data.Widget.slice(Widget.java:134) at com.sencha.tools.slicer.Slicer.sliceWidgets(Slicer.java:77) at com.sencha.command.theme.ThemeCommands$SliceCommand.execute(ThemeComm ands.java:239) at com.sencha.command.theme.ThemeCommands$BuildCommand.execute(ThemeComm ands.java:143) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sencha.cli.Command.dispatch(Command.java:78) ... 4 more
Many thanks
-
10 Oct 2012 7:43 AM #2Sencha - Senior Forum Manager
- Join Date
- Mar 2007
- Location
- St. Louis, MO
- Posts
- 33,641
- Vote Rating
- 434
Can you post the results when you run the command and add the -d flag for debug info?
Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Forum Manager
________________
http://www.JSONPLint.com - Source to lint your JSONP!
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
https://github.com/mitchellsimoens
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services services@sencha.com
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!
When posting code, please use BBCode's CODE tags.
-
10 Oct 2012 7:54 AM #3
Hi Mitchell, this is the full script output with the -d switch.
Code:Sencha Cmd v3.0.0.190 [INFO ] Building theme [INFO ] Capturing theme image [DEBUG] runngin script at C:\Users\xx\bin\Sencha\Cmd\3.0.0.190\ screenshot-runner.js [DEBUG] using path C:\Users\xx\bin\Sencha\Cmd\3.0.0.190\phantom js;C:\Users\xx\bin\Sencha\Cmd\3.0.0.190\phantomjs\bin;C:\Users\david.wr agg\bin\Sencha\Cmd\3.0.0.190;C:\Users\xx\bin\Sencha\Cmd\3.0.0.181;C:\Pr ogram Files (x86)\SenchaSDKTools-2.0.0-beta3;C:\Program Files (x86)\Intel\iCLS C lient\;C:\Program Files\Intel\iCLS Client\;C:\Program Files (x86)\NVIDIA Corpora tion\PhysX\Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Win dows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Microsoft SQL Serve r\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Progr am Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\;C:\Program Files (x86)\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages \v1.0\;C:\Program Files (x86)\Windows Kits\8.0\Windows Performance Toolkit\;C:\P rogram Files\Microsoft SQL Server\110\Tools\Binn\;C:\Program Files (x86)\Microso ft Team Foundation Server 2010 Power Tools\;C:\Program Files (x86)\Microsoft Tea m Foundation Server 2010 Power Tools\Best Practices Analyzer\;C:\Program Files\S ourceGear\Common\DiffMerge\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Progra m Files (x86)\Intel\OpenCL SDK\1.5\bin\x86;C:\Program Files (x86)\Intel\OpenCL S DK\1.5\bin\x64;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL; C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program File s (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\I ntel\Intel(R) Management Engine Components\IPT;C:\Ruby192\bin;C:\Program Files ( x86)\Android\android-sdk\platform-tools;C:\apache-ant-1.8.4\bin;C:\Program Files (x86)\Android\android-sdk\tools;C:\Program Files\Java\jdk1.6.0_35\bin [DEBUG] executable located at C:\Users\xx\bin\Sencha\Cmd\3.0.0. 190\phantomjs\phantomjs.exe [DEBUG] using workding directory . loading page ../../../Dev/app/spec/resources/theme/default/theme.html capturing screenshot capturing widget location data widget capture complete [DEBUG] exit code was : 0 [DEBUG] exit code was : 0 [INFO ] Capture complete [INFO ] Slicing theme [DEBUG] Saving sprite ..\..\theme-output2\menu\menu-item-active-corners [DEBUG] Saving sprite ..\..\theme-output2\menu\menu-item-active-sides [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-small-corners [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-small-sides [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-small-over-cor ners [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-small-over-sid es [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-small-focus-co rners [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-small-focus-si des [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-small-pressed- corners [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-small-pressed- sides [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-small-disabled -corners [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-small-disabled -sides [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-medium-corners [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-medium-sides [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-medium-over-co rners [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-medium-over-si des [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-medium-focus-c orners [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-medium-focus-s ides [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-medium-pressed -corners [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-medium-pressed -sides [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-medium-disable d-corners [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-medium-disable d-sides [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-large-corners [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-large-sides [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-large-over-cor ners [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-large-over-sid es [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-large-focus-co rners [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-large-focus-si des [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-large-pressed- corners [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-large-pressed- sides [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-large-disabled -corners [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-large-disabled -sides [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-toolbar-small- corners [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-toolbar-small- sides [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-toolbar-small- over-corners [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-toolbar-small- over-sides [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-toolbar-small- focus-corners [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-toolbar-small- focus-sides [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-toolbar-small- pressed-corners [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-toolbar-small- pressed-sides [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-toolbar-small- disabled-corners [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-toolbar-small- disabled-sides [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-toolbar-medium -corners [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-toolbar-medium -sides [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-toolbar-medium -over-corners [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-toolbar-medium -over-sides [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-toolbar-medium -focus-corners [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-toolbar-medium -focus-sides [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-toolbar-medium -pressed-corners [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-toolbar-medium -pressed-sides [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-toolbar-medium -disabled-corners [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-toolbar-medium -disabled-sides [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-toolbar-large- corners [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-toolbar-large- sides [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-toolbar-large- over-corners [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-toolbar-large- over-sides [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-toolbar-large- focus-corners [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-toolbar-large- focus-sides [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-toolbar-large- pressed-corners [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-toolbar-large- pressed-sides [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-toolbar-large- disabled-corners [DEBUG] Saving sprite ..\..\theme-output2\btn\btn-default-toolbar-large- disabled-sides [DEBUG] Saving sprite ..\..\theme-output2\toolbar\toolbar-default-bg [DEBUG] Saving sprite ..\..\theme-output2\panel-header\panel-header-defa ult-framed-bottom-corners [DEBUG] Saving sprite ..\..\theme-output2\panel-header\panel-header-defa ult-framed-bottom-sides [DEBUG] Saving sprite ..\..\theme-output2\panel-header\panel-header-defa ult-framed-left-corners [DEBUG] Saving sprite ..\..\theme-output2\panel-header\panel-header-defa ult-framed-left-sides [DEBUG] Saving sprite ..\..\theme-output2\panel-header\panel-header-defa ult-framed-right-corners [DEBUG] Saving sprite ..\..\theme-output2\panel-header\panel-header-defa ult-framed-right-sides [DEBUG] Saving sprite ..\..\theme-output2\panel-header\panel-header-defa ult-framed-collapsed-top-corners [DEBUG] Saving sprite ..\..\theme-output2\panel-header\panel-header-defa ult-framed-collapsed-top-sides [DEBUG] Saving sprite ..\..\theme-output2\panel-header\panel-header-defa ult-framed-collapsed-bottom-corners [DEBUG] Saving sprite ..\..\theme-output2\panel-header\panel-header-defa ult-framed-collapsed-bottom-sides [DEBUG] Saving sprite ..\..\theme-output2\panel-header\panel-header-defa ult-framed-collapsed-left-corners [DEBUG] Saving sprite ..\..\theme-output2\panel-header\panel-header-defa ult-framed-collapsed-left-sides [DEBUG] Saving sprite ..\..\theme-output2\panel-header\panel-header-defa ult-framed-collapsed-right-corners [DEBUG] Saving sprite ..\..\theme-output2\panel-header\panel-header-defa ult-framed-collapsed-right-sides [DEBUG] Saving sprite ..\..\theme-output2\tab\tab-default-top-corners [DEBUG] Saving sprite ..\..\theme-output2\tab\tab-default-top-sides [DEBUG] Saving sprite ..\..\theme-output2\tab\tab-default-top-active-cor ners [DEBUG] Saving sprite ..\..\theme-output2\tab\tab-default-top-active-sid es [DEBUG] Saving sprite ..\..\theme-output2\tab\tab-default-top-over-corne rs [DEBUG] Saving sprite ..\..\theme-output2\tab\tab-default-top-over-sides [DEBUG] Saving sprite ..\..\theme-output2\tab\tab-default-top-disabled-c orners [DEBUG] Saving sprite ..\..\theme-output2\tab\tab-default-top-disabled-s ides [DEBUG] Saving sprite ..\..\theme-output2\tab\tab-default-bottom-corners [DEBUG] Saving sprite ..\..\theme-output2\tab\tab-default-bottom-sides [DEBUG] Saving sprite ..\..\theme-output2\tab\tab-default-bottom-bg [DEBUG] Saving sprite ..\..\theme-output2\tab\tab-default-bottom-active- corners [DEBUG] Saving sprite ..\..\theme-output2\tab\tab-default-bottom-active- sides [DEBUG] Saving sprite ..\..\theme-output2\tab\tab-default-bottom-active- bg [DEBUG] Saving sprite ..\..\theme-output2\tab\tab-default-bottom-over-co rners [DEBUG] Saving sprite ..\..\theme-output2\tab\tab-default-bottom-over-si des [DEBUG] Saving sprite ..\..\theme-output2\tab\tab-default-bottom-over-bg [DEBUG] Saving sprite ..\..\theme-output2\tab\tab-default-bottom-disable d-corners [DEBUG] Saving sprite ..\..\theme-output2\tab\tab-default-bottom-disable d-sides [DEBUG] Saving sprite ..\..\theme-output2\tab\tab-default-bottom-disable d-bg [DEBUG] Saving sprite ..\..\theme-output2\progress\progress-default-bg [DEBUG] Saving sprite ..\..\theme-output2\btn-group\btn-group-default-fr amed-notitle-corners [DEBUG] Saving sprite ..\..\theme-output2\btn-group\btn-group-default-fr amed-notitle-sides [DEBUG] Saving sprite ..\..\theme-output2\btn-group\btn-group-default-fr amed-corners [DEBUG] Saving sprite ..\..\theme-output2\btn-group\btn-group-default-fr amed-sides [DEBUG] Saving sprite ..\..\theme-output2\tip\tip-corners [DEBUG] Saving sprite ..\..\theme-output2\tip\tip-sides [DEBUG] Saving sprite ..\..\theme-output2\form-invalid-tip\form-invalid- tip-corners [DEBUG] Saving sprite ..\..\theme-output2\form-invalid-tip\form-invalid- tip-sides [DEBUG] Saving sprite ..\..\theme-output2\datepicker\datepicker-header-c orners [DEBUG] Saving sprite ..\..\theme-output2\datepicker\datepicker-header-s ides [DEBUG] Saving sprite ..\..\theme-output2\datepicker\datepicker-header-b g [ERROR] null com.sencha.exceptions.BasicException at com.sencha.exceptions.BasicException.wrap(BasicException.java:43) at com.sencha.cli.Command.dispatch(Command.java:104) at com.sencha.cli.Commands.dispatch(Commands.java:49) at com.sencha.cli.Commands.dispatch(Commands.java:49) at com.sencha.cli.AbstractCommand.dispatch(AbstractCommand.java:184) at com.sencha.command.Sencha.main(Sencha.java:58) Caused by: java.lang.NegativeArraySizeException at java.awt.image.BufferedImage.getRGB(BufferedImage.java:935) at com.sencha.tools.slicer.Slicer.simpleCopy(Slicer.java:123) at com.sencha.tools.slicer.Slicer.copyPixels(Slicer.java:86) at com.sencha.tools.slicer.Sprite.addVerticalSide(Sprite.java:67) at com.sencha.tools.slicer.data.Widget.slice(Widget.java:134) at com.sencha.tools.slicer.Slicer.sliceWidgets(Slicer.java:77) at com.sencha.command.theme.ThemeCommands$SliceCommand.execute(ThemeComm ands.java:239) at com.sencha.command.theme.ThemeCommands$BuildCommand.execute(ThemeComm ands.java:143) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.sencha.cli.Command.dispatch(Command.java:78) ... 4 more
-
10 Oct 2012 8:58 AM #4
On further investigation, I think I've traced the issue to this selector in our scss:
The lack of a visible datepicker footer seems to be knocking the tool over when it goes to render the image. Hope you can confirm.Code:.x-datepicker-footer{ display: none; }
Regards
-
12 Oct 2012 11:42 PM #5
Looks like we need to improve the error reporting there.
Were you able to check the html file to see that it renders correctly before running the image slice operation?Don Griffin
Ext JS Development Team Lead
Check the docs. Learn how to (properly) report a framework issue and a Sencha Cmd issue
"Use the source, Luke!"
-
12 Oct 2012 11:45 PM #6
Thanks for the report! I have opened a bug in our bug tracker.
-
15 Oct 2012 12:54 AM #7
Hi Don,
The theme.html file renders correctly beforehand, with all widgets on display. It seems its only the image slicing that is upset by the hidden component. As a workaround, I've removed the datepicker footer's entry from the theme's manifest.js file, and can now complete the theme build process successfully.
Thanks for looking into this.
You found a bug! We've classified it as
SDKTOOLS-204
.
We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.


Reply With Quote