(SC_SNAPSHOT-2011-02-07/PowerEdition Deployment 2011-02-07)
Browser: mozilla firefox, 3.6.13
I think there is a bug with the Img class.
Can be reproduced in the standalone testcase:
I get a nullpointer exception like so (package names are wrong, but this was the quickest way to setup a standalone testcase, instead of creating new project):
Browser: mozilla firefox, 3.6.13
I think there is a bug with the Img class.
Can be reproduced in the standalone testcase:
Code:
package test;
import com.google.gwt.core.client.EntryPoint;
import com.smartgwt.client.util.SC;
import com.smartgwt.client.widgets.Img;
import com.smartgwt.client.widgets.layout.VLayout;
public class ImgStandaloneTestcase implements EntryPoint {
private VLayout mainPanel = new VLayout();
public void onModuleLoad() {
mainPanel.setHeight100();
mainPanel.setWidth100();
//replace by some image on your disk, any image crashes.
//Image exists, removing the int imgWidth... line shows the image.
Img i = new Img("uploads/Category/Category_image_3.png");
mainPanel.addMember(i);
int imgWidth = i.getImageWidth(); //NullpointerException at this line
SC.say("image width: "+imgWidth);
mainPanel.show();
}
}
Code:
18:27:47.288 [ERROR] [generatedcode] Unable to load module entry point class nl.sytematic.projects.LikeManagementSystem.client.LikeManagementSystemMain (see associated exception for details)
java.lang.NullPointerException: null
at nl.sytematic.projects.LikeManagementSystem.client.LikeManagementSystemMain.onModuleLoad(LikeManagementSystemMain.java:57)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:369)
at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:185)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:380)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:222)
at java.lang.Thread.run(Thread.java:680)
Comment