PDA

View Full Version : Unexpected internal compiler error when compile



coodysk8er
13 May 2009, 10:48 PM
I am using gxt1.2.4 with GWT and Google App Engine.
I got this weird error when compiling(Only ie6 successes, other failed).
I fund it happened when doing a RPC call. I marked the place below.

This is the error message.
[ERROR] Unexpected internal compiler error
java.lang.StackOverflowError: null
at java.io.ObjectInputStream$PeekInputStream.read(Unknown Source)
at java.io.ObjectInputStream$PeekInputStream.readFully(Unknown Source)
at java.io.ObjectInputStream$BlockDataInputStream.readBlockHeader(Unknown Source)
at java.io.ObjectInputStream$BlockDataInputStream.refill(Unknown Source)
at java.io.ObjectInputStream$BlockDataInputStream.read(Unknown Source)
at java.io.DataInputStream.readInt(Unknown Source)

.
.
.
...

This is my source code
=============================================
public class AccessControl extends SelectionListener<ComponentEvent>{

private Button doRegisterButton;

//skip some code


public void componentSelected(ComponentEvent ce) {
if(ce.component == doRegisterButton)
{
Account account = new Account();
doRegister(account);
waitingBox = MessageBox.wait("Progress", "Conneting to Server...", "Waiting...");
}
}

private void doRegister(Account account)
{
AccessServiceAsync accessService = (AccessServiceAsync)GWT.create(AccessService.class);

//Error occurs here!!!!!!!!!!!! when do a RCP call !!!!
accessService.register("hello", new AsyncCallback<String>() {
@Override
public void onFailure(Throwable caught) {
if(waitingBox != null)
waitingBox.close();
MessageBox.alert("Registeration Failed", "Please Try Again Later", null);
}

@Override
public void onSuccess(String result) {
if(waitingBox != null)
waitingBox.close();
}
});
}
}


Please help me! Thank you!

micgala
14 May 2009, 12:11 AM
What is the GWT version you are using?

coodysk8er
14 May 2009, 8:42 AM
I am using GWT 1.6.4, just updated.
And I found after I just added the async service declaration in another (main) module (but the service was never called), this error disappeared.

BTW, what is the most recent stable version of ext that I can use?
Thank you!

micgala
14 May 2009, 11:27 PM
Hi.

For GWT 1.6 you must use GXT 2.0 (milestone 1 was released some time ago).
It is still a milestone version, but you can test it.

For GWT 1.5 you must continue on GXT 1.x

Also, if you get into that problem again, take a look into this:
http://code.google.com/p/google-web-toolkit/issues/detail?id=3510

Regards,
Michel.

coodysk8er
15 May 2009, 1:59 PM
Thanks for replying. It turned out to be a jvm stack size problem.

coodysk8er
15 May 2009, 2:09 PM
I got a specific problem with gwt ext2:
There's no buttons show in the form event added to.
Please help me check my code, thanks~

public void loadLoginWindow()
{
loginWindow = new Window();

LayoutContainer loginPanel = new LayoutContainer();
loginPanel.setWidth(300);
FormPanel formPanel = new FormPanel();
formPanel.setFrame(true);
formPanel.setButtonAlign(HorizontalAlignment.CENTER);

formPanel.setHeaderVisible(false);
formPanel.setBorders(false);
formPanel.setBodyBorder(false);
formPanel.setLabelWidth(60);

emailField = new TextField<String>();
emailField.setFieldLabel("Email");
formPanel.add(emailField, new FormData(200, 0));

passwordField = new TextField<String>();
passwordField.setFieldLabel("Password");


formPanel.add(passwordField, new FormData(200, 0));

loginButton = new Button("Login");
cancelButton = new Button("Cancel");
registerButton = new Button("Register");

loginButton.addSelectionListener(this);
cancelButton.addSelectionListener(this);
registerButton.addSelectionListener(this);

formPanel.addButton(loginButton);
formPanel.addButton(cancelButton);
formPanel.addButton(registerButton);

loginPanel.add(formPanel);
loginWindow.add(loginPanel);

RootPanel.get().add(formPanel);
}







Hi.

For GWT 1.6 you must use GXT 2.0 (milestone 1 was released some time ago).
It is still a milestone version, but you can test it.

For GWT 1.5 you must continue on GXT 1.x

Also, if you get into that problem again, take a look into this:
http://code.google.com/p/google-web-toolkit/issues/detail?id=3510

Regards,
Michel.

micgala
18 May 2009, 12:26 AM
Hi...
I was able to see the buttons...
Wasn't you?

coodysk8er
18 May 2009, 5:23 AM
I am sorry. It was some stack problem. I just changed the stack size to 32m and it worked well.
But I still got some incompatible RCP exception when using RPC..
I checked it online and it says it is because some cache or lib version problem.
But I could't fix it even I cleaned the project and made sure the lib version is right...

fangzhouxing
23 May 2009, 2:29 AM
I just changed the stack size to 32m


Hi, coodysk8er, How to change the stack size? I encountered the same error:


[ERROR] Unexpected internal compiler error
java.lang.StackOverflowError: null
at java.io.ObjectStreamClass$FieldReflector.getPrimFieldValues(Unknown Source).......


I am using GXT 2.0-m2. My eclipse.ini like this:

--launcher.XXMaxPermSize
256m
-framework
plugins\org.eclipse.osgi_3.4.3.R34x_v20081215-1030.jar
-vmargs
-Xms256m
-Xmx512m

Mbit0815
26 Jun 2009, 2:23 AM
Try -Xss as parameter... that should change stack size