codenameone - EDT violation on Codename One -
with code:
protected void second_buttonaction(component c, actionevent event) { connectionrequest cn = new connectionrequest(); cn.seturl(theurladdress); cn.setpost(false); cn.addargument("name", "this"); networkmanager.getinstance().addtoqueueandwait(cn); cn.getresponsedata(); }
i keep getting following:
edt violation detected! com.codename1.impl.javase.javaseport$edtviolation: edt violation stack! @ com.codename1.impl.javase.javaseport.checkedt(javaseport.java:344) edt violation detected! edt violation detected! edt violation detected! @ com.codename1.impl.javase.javaseport.isnativeinputsupported(javaseport.java:2459) @ com.codename1.ui.display.isnativeinputsupported(display.java:2306) @ com.codename1.ui.textarea.settext(textarea.java:406) @ com.codename1.ui.textarea.<init>(textarea.java:328) @ com.codename1.ui.textarea.<init>(textarea.java:257) @ com.codename1.ui.dialog.show(dialog.java:771) @ com.codename1.ui.dialog.show(dialog.java:727) @ com.codename1.ui.dialog.show(dialog.java:692) @ com.codename1.ui.dialog.show(dialog.java:536) @ com.codename1.ui.dialog.show(dialog.java:788) @ com.codename1.io.connectionrequest.handleerrorresponsecode(connectionrequest.java:680) @ com.codename1.io.connectionrequest.performoperation(connectionrequest.java:379) @ com.codename1.io.networkmanager$networkthread.run(networkmanager.java:261) @ com.codename1.impl.codenameonethread.run(codenameonethread.java:176) com.codename1.impl.javase.javaseport$edtviolation: edt violation stack! @ com.codename1.impl.javase.javaseport.checkedt(javaseport.java:344) @ com.codename1.impl.javase.javaseport.getimagewidth(javaseport.java:3087) @ com.codename1.ui.image.getwidth(image.java:667) @ com.codename1.ui.encodedimage.getwidth(encodedimage.java:413) @ com.codename1.ui.plaf.border.getminimumwidth(border.java:200) @ com.codename1.ui.container.calcpreferredsize(container.java:1431) @ com.codename1.ui.component.calcscrollsize(component.java:579) @ com.codename1.ui.component.getscrolldimension(component.java:566) @ com.codename1.ui.container.isscrollabley(container.java:1495) @ com.codename1.ui.component.isscrollable(component.java:1413) @ com.codename1.ui.container.setlayout(container.java:246) @ com.codename1.ui.dialog.<init>(dialog.java:205) @ com.codename1.ui.dialog.<init>(dialog.java:189) @ com.codename1.ui.dialog.<init>(dialog.java:180) @ com.codename1.ui.dialog.show(dialog.java:952) edt violation detected! ...
what missing!!?
except lack of progress indication code above looks fine.
it seems invoking settext
off edt elsewhere cut stack trace pointed @ that.
edited:
from revised stack trace seems line important one: @ com.codename1.io.connectionrequest.handleerrorresponsecode(connectionrequest.java:680)
you getting call handleerrorresponsecode means url returned error code. showing error dialog. yes violate edt (these exceptions in simulator warn of potential bugs). need decide on error response code , handle them appropriately either deriving connection request , overriding method or binding error handler network manager or invoking setfailsilently(true) on connection request.
Comments
Post a Comment