Page 1 of 1
IMA error with ExamineIPAddresses(#PB_Network_IPv4)
Posted: Tue Mar 26, 2024 10:49 am
by the.weavster
MX Linux X86_64
PB 6.10 Beta 9
I'm getting an invalid memory access error here:
Code: Select all
Procedure.s _rpc_get_server_ip()
Define.i IP
Define.s ip$ = ""
If ExamineIPAddresses(#PB_Network_IPv4)
Repeat
IP = NextIPAddress() ; *** Invalid Memory Access ***
If IP : ip$ = IPString(IP) : EndIf
Until IP = 0
EndIf
ProcedureReturn ip$
EndProcedure
Am I doing something wrong or is this a bug?
Re: IMA error with ExamineIPAddresses(#PB_Network_IPv4)
Posted: Tue Mar 26, 2024 1:34 pm
by blueb
Just tried it using my VPN at 3 different locations...
10.17.18.78 Peru
10.10.18.236 Ecuador
10.14.18.206 Uruguay
everything seems fine.
Code: Select all
Procedure.s _rpc_get_server_ip()
Define.i IP
Define.s ip$ = ""
If ExamineIPAddresses(#PB_Network_IPv4)
Repeat
IP = NextIPAddress() ; *** Invalid Memory Access ***
If IP : ip$ = IPString(IP) : EndIf
Until IP = 0
EndIf
ProcedureReturn ip$
EndProcedure
Debug _rpc_get_server_ip()
Re: IMA error with ExamineIPAddresses(#PB_Network_IPv4)
Posted: Tue Mar 26, 2024 1:42 pm
by the.weavster
blueb wrote: Tue Mar 26, 2024 1:34 pm
Just tried it using my VPN ...
Boom!
Thank you
I had a VPN App running on my PC, I shut that down and then the code works as expected.
Re: IMA error with ExamineIPAddresses(#PB_Network_IPv4)
Posted: Tue Mar 26, 2024 1:47 pm
by blueb
That's odd.. shouldn't it work with your VPN running?

Re: IMA error with ExamineIPAddresses(#PB_Network_IPv4)
Posted: Tue Mar 26, 2024 2:27 pm
by Quin
It should, unless your VPN was only assigning you an IP V6 address I think. Not sure why it'd do that, though.
Re: IMA error with ExamineIPAddresses(#PB_Network_IPv4)
Posted: Wed Mar 27, 2024 6:28 am
by Tranquil
I would think that this is a bug inside PB which maybe should be placed inside the Bug Section of this forum.
Anyway, a code snipping, that reproduces this behavior would be very useful.
Re: IMA error with ExamineIPAddresses(#PB_Network_IPv4)
Posted: Wed Mar 27, 2024 8:51 am
by the.weavster
Tranquil wrote: Wed Mar 27, 2024 6:28 am
Anyway, a code snipping, that reproduces this behavior would be very useful.
The code snippet is in the first post but it only shows the behaviour if the VPN ( Private Internet Access ) app is running.
Re: IMA error with ExamineIPAddresses(#PB_Network_IPv4)
Posted: Wed Mar 27, 2024 8:59 am
by Tranquil
the.weavster wrote: Wed Mar 27, 2024 8:51 am
Tranquil wrote: Wed Mar 27, 2024 6:28 am
Anyway, a code snipping, that reproduces this behavior would be very useful.
The code snippet is in the first post but it only shows the behaviour if the VPN ( Private Internet Access ) app is running.
There seems to be some specific network settings with your VPN.
The code you posted works fine for me in both cases:
-> Connected to VPN: Shows internal IPv4 (Using PulseSecure as VPN Client)
-> not Connected to VPN: Shows IPv4 of my network
Re: IMA error with ExamineIPAddresses(#PB_Network_IPv4)
Posted: Wed Mar 27, 2024 9:01 am
by Kiffi
Tranquil wrote: Wed Mar 27, 2024 8:59 amThe code you posted works fine for me in both cases:
-> Connected to VPN: Shows internal IPv4 (Using PulseSecure as VPN Client)
-> not Connected to VPN: Shows IPv4 of my network
same here.
// Edit: Sorry, I missed the Linux part.

Re: IMA error with ExamineIPAddresses(#PB_Network_IPv4)
Posted: Wed Mar 27, 2024 3:45 pm
by juergenkulow
Which MX Linux version are you using?
What is rip, the instruction the rip points to, the registers and the stack at the IMA?
Is it an
MX Linux or PureBasic problem?