admob V2 crashing on ads.load , really strange...ideas please

Hi,

i have upgraded to pro today as i cant wait for the next public build in order to use admobV2.

I have no problems with admob V1 loading either banners or interstitals.

I have an issue when I call ads.load(“interstitial”), my program just crashes and states

"attempt to call field “load” (a nil value)

So obviously it isnt getting past this.

My build settings are set as per the instructions and i cannot see anything wrong whatsoever.

I tried a different corona build still no joy.

I think the ads library is loading as there is no error and the sim reports" ad library not available as ususal.

I really need help on this

thanks

It seems to be a bug in Corona’s plugin but that doesn’t affect everyone.  Feel free to pile on to this thread and hopefully Corona Labs will get the message and take a look at it.

http://forums.coronalabs.com/topic/47222-admob-v2-plugin-test-results/page-4

I looked at the bug case of the nil “load” error and it was because ads.load was being called before ads.init in the supplied test project. When I moved the ads.load to after the ads.init, it worked correctly and the ad showed as expected. This was testing on a Nexus 7 with recent Daily Build 2353.

HI tom,

I actually stated that I had made the mistake by misplacing the ads.load() before init in that reply.

Ok, so you ran the updated code…thank you

First, are you running from a windows machine or MAC ?

I am running from a windows machine, and it does not work.

the simulator crashes out with the bug, I cant even get to build the project.

As stated admob V1 will work fine with either banners or interstitals, as soon as I introduce V2 on the ads.load() it breaks.

I have tried previous builds of corona and they are all the same.

Whatever details you require let me know, I am more than happy to supply anyting.

would any mods please move this to the bigger thread regarding the issue as mentioned by steve lewis

Your bug case implied AdMob was crashing on a device, so that was my focus. It even mentioned Android devices that failed in the bug case.

There is an issue on our end with AdMob V2 for the ads.load and ads.isLoaded APIs running in the simulator. These are not stubbed out and will generate an error in the simulator (runtime error). This was an oversight by us and I’m having it corrected now.

Even though you see an error in the simulator (Mac or Windows), you can still do a device build and test on a device. This is what I did when I reported it was working.

Any other AdMob bugs need to go through our bug reporting system so we can track the issues.

Thanks,

Tom

@Tom, not sure which bug case you are referring to, there are a couple forum threads related to admob ads.load() crashing on simulator and iOS devices and probably at least 2 different bugs submitted. The bug I submitted, #33780, still crashes for me on simulator with build 2014.2354.  I just tested my other code that previously had ads.load() crashing on iOS devices, and it is no longer crashing.  So you guys fixed something, but I don’t know where or when since there was no follow up to my bug or the daily build notes or in the other forum thread where I reported my bug.

AdMob V2 does not work on the simulator so the “crash” is really a runtime error caused by the ads.load call. (A real simulator crash would close the simulator and display a program failed message.)

We pushed though a change today to eliminate the Simulator runtime error when ads.load or any of the new AdMob v2 calls are made. 

As far as AdMob on iOS, we don’t see a crashing condition. We did find that interstitial ads don’t display with ads.show if you don’t call ads.load first. We pushed in a fix for that bug too. I’m also going to update the docs to make things a littler clear on how it works.

Both these fixes should be in the next Daily Build (2355 and higher).

Hi Tom, I’m getting a new build error now when I try to build for iOS devices using the admob V2 plugin.  (There is no runtime error on simulator builds and it is building and working for Android builds).

The error I see in my Sublime build console when I attempt an iOS device build is:

Runtime error

/Users/stephenlewis/Desktop/BakeryBatch.app/.build/libtemplate/Builder.lua:310: <error>{“status”:256,“message”:“ld: library not found for -lads-admob\nclang: error: linker command failed with exit code 1 (use -v to see invocation)”}</error>

stack traceback:

C: in function ‘assert’

/Users/stephenlewis/Desktop/BakeryBatch.app/.build/libtemplate/Builder.lua:310: in function ‘checkError’

/Users/stephenlewis/Desktop/BakeryBatch.app/.build/libtemplate/Builder.lua:333: in function ‘build’

?: in function ‘buildExe’

?: in function <?:695>

I’m using the latest daily I have access to, 2014.2354.  This seems like a plugin error. I’ve never seen this style of error before.  This is a new issue for me as of maybe an hour ago.

@Stephen, I see the error iOS build error too. I’ve asked the engineer to look at it.

Thanks,

Tom

Ok, builds for iOS are working again.  Thanks

I think we were both trying to use the plugin while it was being built last night so that’s why it failed. We didn’t have a daily build last night so hopefully the Simulator fix will be ready sometime today.

It seems to be a bug in Corona’s plugin but that doesn’t affect everyone.  Feel free to pile on to this thread and hopefully Corona Labs will get the message and take a look at it.

http://forums.coronalabs.com/topic/47222-admob-v2-plugin-test-results/page-4

I looked at the bug case of the nil “load” error and it was because ads.load was being called before ads.init in the supplied test project. When I moved the ads.load to after the ads.init, it worked correctly and the ad showed as expected. This was testing on a Nexus 7 with recent Daily Build 2353.

HI tom,

I actually stated that I had made the mistake by misplacing the ads.load() before init in that reply.

Ok, so you ran the updated code…thank you

First, are you running from a windows machine or MAC ?

I am running from a windows machine, and it does not work.

the simulator crashes out with the bug, I cant even get to build the project.

As stated admob V1 will work fine with either banners or interstitals, as soon as I introduce V2 on the ads.load() it breaks.

I have tried previous builds of corona and they are all the same.

Whatever details you require let me know, I am more than happy to supply anyting.

would any mods please move this to the bigger thread regarding the issue as mentioned by steve lewis

Your bug case implied AdMob was crashing on a device, so that was my focus. It even mentioned Android devices that failed in the bug case.

There is an issue on our end with AdMob V2 for the ads.load and ads.isLoaded APIs running in the simulator. These are not stubbed out and will generate an error in the simulator (runtime error). This was an oversight by us and I’m having it corrected now.

Even though you see an error in the simulator (Mac or Windows), you can still do a device build and test on a device. This is what I did when I reported it was working.

Any other AdMob bugs need to go through our bug reporting system so we can track the issues.

Thanks,

Tom

@Tom, not sure which bug case you are referring to, there are a couple forum threads related to admob ads.load() crashing on simulator and iOS devices and probably at least 2 different bugs submitted. The bug I submitted, #33780, still crashes for me on simulator with build 2014.2354.  I just tested my other code that previously had ads.load() crashing on iOS devices, and it is no longer crashing.  So you guys fixed something, but I don’t know where or when since there was no follow up to my bug or the daily build notes or in the other forum thread where I reported my bug.

AdMob V2 does not work on the simulator so the “crash” is really a runtime error caused by the ads.load call. (A real simulator crash would close the simulator and display a program failed message.)

We pushed though a change today to eliminate the Simulator runtime error when ads.load or any of the new AdMob v2 calls are made. 

As far as AdMob on iOS, we don’t see a crashing condition. We did find that interstitial ads don’t display with ads.show if you don’t call ads.load first. We pushed in a fix for that bug too. I’m also going to update the docs to make things a littler clear on how it works.

Both these fixes should be in the next Daily Build (2355 and higher).

Hi Tom, I’m getting a new build error now when I try to build for iOS devices using the admob V2 plugin.  (There is no runtime error on simulator builds and it is building and working for Android builds).

The error I see in my Sublime build console when I attempt an iOS device build is:

Runtime error

/Users/stephenlewis/Desktop/BakeryBatch.app/.build/libtemplate/Builder.lua:310: <error>{“status”:256,“message”:“ld: library not found for -lads-admob\nclang: error: linker command failed with exit code 1 (use -v to see invocation)”}</error>

stack traceback:

C: in function ‘assert’

/Users/stephenlewis/Desktop/BakeryBatch.app/.build/libtemplate/Builder.lua:310: in function ‘checkError’

/Users/stephenlewis/Desktop/BakeryBatch.app/.build/libtemplate/Builder.lua:333: in function ‘build’

?: in function ‘buildExe’

?: in function <?:695>

I’m using the latest daily I have access to, 2014.2354.  This seems like a plugin error. I’ve never seen this style of error before.  This is a new issue for me as of maybe an hour ago.

@Stephen, I see the error iOS build error too. I’ve asked the engineer to look at it.

Thanks,

Tom

Ok, builds for iOS are working again.  Thanks