iOS Question Strange problem with HttpJob in B4i 10.30

Alex_197

Well-Known Member
Licensed User
Longtime User
Hi all

I have a very strange problem.

Here is a code

B4X:
'Code module
#Region  Project Attributes
    #ApplicationLabel: B4i Internet
    #Version: 1.0.0
    'Orientation possible values: Portrait, LandscapeLeft, LandscapeRight and PortraitUpsideDown
    #iPhoneOrientations: Portrait, LandscapeLeft, LandscapeRight
    #iPadOrientations: Portrait, LandscapeLeft, LandscapeRight, PortraitUpsideDown
    #Target: iPhone, iPad
    #ATSEnabled: True
    #MinVersion: 16
    #ProvisionFile: EVVProfile.mobileprovision
#End Region

Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'Public variables can be accessed from all modules.
    Public App As Application
    Public NavControl As NavigationController
    Private Page1 As Page
    Private xui As XUI
    Private HUD As HUD
    Private TOSStr As String

    Private wvDemo As WebView
End Sub

Private Sub Application_Start (Nav As NavigationController)
    NavControl = Nav
    Page1.Initialize("Page1")
    Page1.RootPanel.LoadLayout("Page1")
    NavControl.ShowPage(Page1)
End Sub

Sub Button1_Click  
    GetLegal
End Sub

Private Sub Page1_Appear
    Try
       
       
       
    Catch
        Log(LastException)
    End Try
End Sub

Private Sub Page1_Resize(Width As Int, Height As Int)
   
End Sub



Private Sub GetLegal
   
    Try
        Dim j As HttpJob
        Dim str As String
        Dim URL As String="https://hcmsemr.com/medical-billing-services-privacy-policy"
       
        HUD.ProgressDialogShow("Starting")
           
        Log("Start =================================================Start")
        j.Initialize("",Me)
        j.PostString(URL,"whattodo=gettos")
       
       
        Wait For(j)    JobDone(j As HttpJob)
       
        If j.Success Then
           
            str=j.GetString
           
            TOSStr=str
            Log("TOS=" & TOSStr)
       
           
        Else
           
            Msgbox("Please check your Internet connection","HCMS")
            str="NoConnection"
        End If
       
        j.Release
       
        If str="NoConnection" Then
            Log("NoConnection")          
        End If          
       
        HUD.ProgressDialogHide
       
        Log("Finish=================================================Finish")
       
        wvDemo.LoadHtml(TOSStr)
       
    Catch
        Log("GetLegal " & LastException)
    End Try
   
End Sub

Let's say I cleaned the project before running this code. It works fine. Then if do any changes in GetLegal sub, for example changed a text in Log("Finish=================================================Finish")
to Log("Finish 123=================================================Finish")
and just run the project.. Project starts and if I clock on a button to call the GetLegal sub the code stops on this line j.PostString(URL,"whattodo=gettos") and doesn't go anywhere. You can put any URL you want.

Then I cleaned the project again, start the project - it works.

I've been using HTTPJob in my B4i app for years and never had any problems.

What am I doing wrong?

Please see the attached project code and libs I'm using

Thanks
 

Attachments

  • screen1.jpg
    screen1.jpg
    31 KB · Views: 30
  • Internet.zip
    2.7 KB · Views: 30

Erel

B4X founder
Staff member
Licensed User
Longtime User
This is indeed a bug introduced in v10.3, related to the debugger. It should be fixed with v10.31. I've uploaded it to the same link as before (send me a private message if needed).

Please confirm that it fixes this issue. Will probably also fix the other issue you encountered. I will then announce it.
 
Upvote 0

Alessandro71

Well-Known Member
Licensed User
Longtime User
This is indeed a bug introduced in v10.3, related to the debugger. It should be fixed with v10.31. I've uploaded it to the same link as before (send me a private message if needed).

Please confirm that it fixes this issue. Will probably also fix the other issue you encountered. I will then announce it.
only the debugger is affected?
release mode is fine?
 
Upvote 0

Alex_197

Well-Known Member
Licensed User
Longtime User
This is indeed a bug introduced in v10.3, related to the debugger. It should be fixed with v10.31. I've uploaded it to the same link as before (send me a private message if needed).

Please confirm that it fixes this issue. Will probably also fix the other issue you encountered. I will then announce it.
I sent you a message.

Thank you.
 
Upvote 0

Alex_197

Well-Known Member
Licensed User
Longtime User
This is indeed a bug introduced in v10.3, related to the debugger. It should be fixed with v10.31. I've uploaded it to the same link as before (send me a private message if needed).

Please confirm that it fixes this issue. Will probably also fix the other issue you encountered. I will then announce it.
The new version 10.31 the problem is gone. Thank you.
 
Upvote 0
Top