Beta 1.42 Run Last Deployment

agraham

Expert
Licensed User
Longtime User
Only just noticed this, I guess 1.41. did it as well.

After running with the debugger attached if I stop then invoke Alt+4, or Project -> Run Last Deployment, the dDebug panels pop up at the bottom of the IDE but are non-functional as the debugger doesn't attach.
 

agraham

Expert
Licensed User
Longtime User
It's absolutely consistent for me on both the ZTE Blade and the Xoom.

Project -> Attach Debugger checked.

Alt+1 to run program

Double click chain icon to detatch debugger. Program is still running.

Alt+4 to run last deployment. Debug panels show, chain icon is broken, mouse-over icon shows "Debugger is trying to connect". Program remains running, is not killed and restarted. Panels vanish after a little while.


If it is stopped by F11 instead of double click then Alt+4 restarts it with the debugger attached OK.
 
Upvote 0

agraham

Expert
Licensed User
Longtime User
I am now running v1.48. I don't know if you changed anything to do with this problem but some of the problems I was having this morning appear to have disappeared - either that or I've stopped being stupid!

However the consistent problem whose steps to reproduce are in post #6 above still exists for me. The debugger won't re-attach on Alt+4 if I detached it by double clicking on the chain icon but will if I press the stop button. Should it or is my expectation wrong?
 
Upvote 0

agraham

Expert
Licensed User
Longtime User
I guess that it happens with any program that you try, right?
I cant assert that it is "any" but the three I've tried all behave the same.

Just to be sure, you are double clicking the chain icon to disconnect, then Alt+4 to reconnect and the program is killed and restarted and the debugger reconnects.

Without Project -> Attach debugger checked should Alt+4 also kill and restart the application? It doesn't kill it for me, just brings it to the foreground if it is running or restarts it if it is not.

As I said before it doesn't look like a debugger-only problem. Alt+4 doesn't seem to kill the program if it is running so the program doesn't get restarted so the debugger never attaches. I've just checked again and it's the same on my Blade and the Xoom.
 
Upvote 0

canalrun

Well-Known Member
Licensed User
Longtime User
Yes.

Other beta testers, can you please check if you are able to restart your application by first running your application and then pressing Alt + 4. The program should be killed and restarted.

Hello,
I gave this a try, and Alt + 4 did not rerun the last program. In fact, typing Alt+4 or selecting "run last deployment" from the menu did nothing. Also my Vibrant seemed to hang on a black screen. Selecting "compile and run" did nothing also.

(added later: what I may have done is navigate to a spot within my application, then try to restart it so it goes back to the beginning. I see that I did not really follow a valid procedure.)

But, I tried it a second time - this time I made sure to select the Stop button in the B4A debugger IDE. Looking at the phone it did stop the application. From the IDE menu I selected "run last deployment" and it restarted the application (sorry I did not use Alt+4 this time)

I am not sure how I terminated my android app the first time, but this may be responsible for the error. The second time I was very careful to use the debugger IDE stop button to terminate the app.

I am running the 1.42 Beta. I uninstalled the B4A designer from my Vibrant before trying all this. I have found no problems when using 1.3 and its designer.

One thing I have noticed using 1.42 in both the emulator and on the Vibrant is that my Admob ad (or the test ad) is not showing. It shows when using 1.3. I assume this is because of the beta status, just mentioning it in case…

Barry.
 
Last edited:
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Thank you for the information.

One thing I have noticed using 1.42 in both the emulator and on the Vibrant is that my Admob ad (or the test ad) is not showing. It shows when using 1.3. I assume this is because of the beta status, just mentioning it in case…
I would have expected the ads to show. Can you run your program with the option Project - Attach Debugger and without this option and see if it makes any difference?
 
Upvote 0

canalrun

Well-Known Member
Licensed User
Longtime User
Thank you for the information.


I would have expected the ads to show. Can you run your program with the option Project - Attach Debugger and without this option and see if it makes any difference?

Hi,

(please see "One last addition" near bottom before you spend time reading all this. I may have been led to the solution.)

I have attached an image showing three screenshots showing the bottom of my app running on the emulator. The top two show screenshots of the app running on beta 1.42, first with the debugger attached, second with the debugger not attached (in IDE menu, Project-Attached Debugger checked/unchecked). The third shows a screenshot of my app running on the emulator using version 1.3 of B4A.

Running using the bridge and phone produces similar results.

Note that the third screenshot shows the test Admob ad while the top two screenshots do not. I waited about 2 1/2 min. for the ad to show up before taking each of the top two screenshots. For the third screenshot the ad showed up about 2 seconds after my app launched.

A little about my test environment:
I am using two almost identical laptops, call them L4 and L5. They run Windows 7 Home Premium.

L5 is my development system. It is running version 1.3 of B4A.
L4 is my second development system (mainly for Xilinx FPGAs). I put the B4A beta on this laptop just to be sure it was isolated from 1.3.

First I installed the beta 1.42, then I copied the "android-sdk-windows" directory from L5 to L4. I copied the few additional libraries from L5 to L4, then I copied my app directory from L5 to L4. I configured the paths and license for 1.42 on L4, and a default Vibrant emulator (Android 2.1-update 1 API level 7, WVGA800, 240 dpi).

The app software is identical between L4 and L5. On L4, in the beta 1.42, I compiled and ran on the Vibrant emulator.

Barry.

(Added later)
I should have thought of this sooner - looking in the logs. (this is from L4 using 1.42)

Here is a code snippet from my Sub Activity_Create:

AdView1.Initialize("Admob", "xxxxxxxxxxxxxx") ' x's subsituted for my id
pnlAd.AddView(AdView1, 0dip, 0dip, 320dip, 50dip)
Log("AdView1.IsInit " & AdView1.IsInitialized)

and the corresponding log output:

AdView1.IsInit true

I copied the following code from the tutorial and put it in my app:

' ------------- Debug Only -------------

Sub Admob_FailedToRecieveAd(ErrorCode As String)
Log("Admob Failed" & ErrorCode)
End Sub

Sub Admob_RecieveAd
Log("Admob Succeeded")
End Sub

There is no log output from either of these Sub's

(Added later still)
One difference between my implementation and your tutorial that might make a difference. I add my AdView1 to a panel. I see you add your AdView1 to the Activity. But, it works with 1.3, not with 1.42. Just a thought...

(One last addition)
I was reading the forum and found "turn off log filter" in one of the posts. I now see the log message:

Could not find com.google.ads.AdActivity, please make sure it is registered in AndroidManifest.xml.

Ahh, light bulb. I may not be able to try it tonight, but I bet the error is in the xml file. I modified the template to insert the
Admob lines on my 1.3 system. I bet I forgot that on 1.42.
 

Attachments

  • B4ATest.jpg
    B4ATest.jpg
    10.8 KB · Views: 217
Last edited:
Upvote 0

canalrun

Well-Known Member
Licensed User
Longtime User
If I understand correctly the problem is not related to the new version, right?

Hi,
That's correct.
The problem was that I forgot to include the manifest modifications for Admob.
I had modified the manifest template file in 1.3 and forgot to copy those modifications when I installed the beta.

Thanks,
Barry.
 
Upvote 0
Top