Shikhar13 / codenameone

Automatically exported from code.google.com/p/codenameone
0 stars 0 forks source link

Ads Component giving error #310

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The issue is related to codename one ads component:

A detailed description has been given in the file attached.

Thanks

Original issue reported on code.google.com by nikhilda...@hotmail.com on 31 Aug 2012 at 2:45

Attachments:

GoogleCodeExporter commented 9 years ago
Pasted it here for convenience and search:
I think there is a bug with Ads Component:

Ads myAd = new Ads("xyz",true);

1)Load a form.

2) addComponent (myAd);

3)try removing this component. 

removeComponent(myAd); // gives a null pointer exception..why??

java.lang.NullPointerException
    at com.codename1.components.Ads.animate(Ads.java:142)
    at com.codename1.ui.Form.loopAnimations(Form.java:964)
    at com.codename1.ui.Form.repaintAnimations(Form.java:949)
    at com.codename1.ui.Display.edtLoopImpl(Display.java:915)
    at com.codename1.ui.Display.mainEDTLoop(Display.java:853)
    at com.codename1.ui.RunnableWrapper.run(RunnableWrapper.java:119)
    at com.codename1.impl.CodenameOneThread.run(CodenameOneThread.java:171)

Original comment by shai.almog on 31 Aug 2012 at 2:55

GoogleCodeExporter commented 9 years ago
Ads calls getComponentForm().registerAnimated(this) in initComponent but does 
not deregister itself in deinitialize causing getComponentForm() in Ads.animate 
to return null.

Original comment by Ian.Te...@gmail.com on 1 Sep 2012 at 10:34

GoogleCodeExporter commented 9 years ago
fixed, thanks

Original comment by cf27...@gmail.com on 2 Sep 2012 at 12:33