B4J Question My App Freeze on Raspberry Pi

ggranata

Member
Hi,
I've a problem with my app. In this app, I have UDP Socket and every time that receives a packet, refresh the UI: I've a single form and when refresh the data I remove all nodes and load the layout. It works fine for hours until it freezes. In my log, I don't see any error.
Any help is welcome.
Thanks
 

ggranata

Member
Thanks for help. I cannot reuse the views because layouts is inside the udp packet. My base form is a table: when receive a packet, I remove some cells. Can I force Java garbage collection? Alternatively, how I can clear all view resources before to load layout?
 
Upvote 0

ggranata

Member
Parent.RemoveAllViews
Thanks for reply but I cannot fine the method.
This is my code:

Change Layout:
Private Sub ChangePage(page As Int )
    Dim layout As String
    'Rimuovo tutti i nodi
    MainForm.RootPane.RemoveAllNodes
    
    Select Case page
        Case Constants.PAGE_WAITINGLINK
            layout = "WaitingLink"
        Case Constants.PAGE_PAIRING
            layout = "Pairing"
        Case Constants.PAGE_PAIRED
            layout = "Paired"
        Case Constants.PAGE_DATA
            layout = "BasePanel"
    End Select
    
    m_ActualPage = page
    
    'Carico il nuovo layout
    MainForm.RootPane.LoadLayout(layout)
End Sub
 
Upvote 0
Top