Page 1 of 2

Invalid Memory Access in 5.71 beta 1 LTS

Posted: Mon May 06, 2019 8:54 am
by Cyllceaux
I got this sometimes, when I have more than one instance of PB running.

Image

File: ScintillaHilightning.pb
Line: 3108

Branch: v5.70 Revision: 1836

Re: Invalid Memory Access in 5.71 beta 1 LTS

Posted: Wed May 15, 2019 12:17 pm
by IdeasVacuum
Hi Cyllceaux

Does that path actually exist on your PC? I don't see anything like it here. If you are not installing to the Program Files folder, you can expect trouble. All hail the mighty MS.

Re: Invalid Memory Access in 5.71 beta 1 LTS

Posted: Wed May 15, 2019 6:58 pm
by Cyllceaux
Hi IdeasVacuum,

I installed it in the program Files folders. Everything default.

It happens sometimes, not always. I saw it on 2 separat Desktop PCs.

Re: Invalid Memory Access in 5.71 beta 1 LTS

Posted: Wed May 15, 2019 7:23 pm
by NicTheQuick
This path exists on freaks PC, one of the developer of Purebasic.

Re: Invalid Memory Access in 5.71 beta 1 LTS

Posted: Fri May 24, 2019 10:11 am
by Fred
It's to help us to find the culprit line, but in this case, it doesn't help as it point to an 'EndProcedure'. So maybe the stack has been corrupted somewhere else, we will need more info to fix this crash unfortunately.

Re: Invalid Memory Access in 5.71 beta 1 LTS

Posted: Thu Nov 14, 2019 11:05 pm
by williamvanhoecke
Hi all,
I was specifically searching the forum for 'invalid memory access' because my code is suffering from this error.
Strangly the error appears sporadically 1 out of 10 times ???

Just tried that simple example on Windows 10 64bit

Code: Select all

Procedure test()
Static Dim t1.i(10, 10)
Static Dim t2.i(10)
EndProcedure

test()
compiling 32bit = OK
compiling 64bit = invalid memory access

As you can see here
https://drive.google.com/open?id=1V4pnv ... gVc-5g_FSf
the error occures at the first line ??

So I guess the 64b comiler still has a bug.

Re: Invalid Memory Access in 5.71 beta 1 LTS

Posted: Fri Nov 15, 2019 9:37 am
by chi
Already reported here

Temp. fix:

Code: Select all

Procedure test()
  Static Dim t2.i(10)
  Static Dim t1.i(10, 10)
EndProcedure

test()

Re: Invalid Memory Access in 5.71 beta 1 LTS

Posted: Fri Nov 29, 2019 2:21 am
by williamvanhoecke
Hello chi,

I knew about this temporary fix, but my code is fare more complex and use a number of multidimension arrays
I get all kind of "invalid memory acces" errors.
f.i. An executable that works fine in one directory fails with "invalid memory acces" when its is run from another directory.
Sometimes there are no errors at all. Its all very random and weared, always another line failing but always with multidimension arrays.

At first I was sure that is was only related to the 64bit compiler but it also happens with the 32bit.

I wonder if someone is working on this bug ???

Re: Invalid Memory Access in 5.71 beta 1 LTS

Posted: Wed Jan 15, 2020 12:11 am
by TheRabble
Just purchased PB and used it for about 30 minutes. Did very little. Created a project and a form and added a few lines of code.(Selected load all sources of the project.) Left PB. When I try to run I get the Invalid Memory Access error message. Click ok and exit PB. Can't run PB.
Uninstalled PB and ran memory diagnostics. Rebooted and reinstalled. Same thing.
Any ideas on how to get PB to even run...?
Thanks

Re: Invalid Memory Access in 5.71 beta 1 LTS

Posted: Wed Jan 15, 2020 12:39 am
by IdeasVacuum
Hello TheRabble

That's really unusual, but my hunch is that you are running an Anti-Virus such as Avast? If so, you will need to white-list all PB folders. In particular, when you run your program from the IDE, some AV programs intercept the temporary exe made by PB.

Re: Invalid Memory Access in 5.71 beta 1 LTS

Posted: Wed Jan 15, 2020 3:50 pm
by TheRabble
I use Norton which I turned off and I get the same error message. When I click OK on the error dialog PB shuts down. I restarted in safe mode and still can't run PB. I uninstalled again and downloaded the 64b version again. No luck. I installed the 32b version and it does the same thing. Same error message and PB shuts down when OK is clicked.
Any idea on how to get PB to run.? I sent 2 emails to support but no reply.

Re: Invalid Memory Access in 5.71 beta 1 LTS

Posted: Wed Jan 15, 2020 3:54 pm
by IdeasVacuum
Hi TheRabble

What is your exact OS?

Re: Invalid Memory Access in 5.71 beta 1 LTS

Posted: Wed Jan 15, 2020 4:32 pm
by TheRabble
Hi IdeasVacum

Using Windows 8.1 Pro with Media Center.

Re: Invalid Memory Access in 5.71 beta 1 LTS

Posted: Wed Jan 15, 2020 7:35 pm
by HeX0R
Could you please share the complete code (including the form) you are going to run?
The debugger is on, right?

Re: Invalid Memory Access in 5.71 beta 1 LTS

Posted: Wed Jan 15, 2020 9:17 pm
by TheRabble
Greetings HeXor

That's the problem. I can't run PB. When the program opens the error dialog is there. I close it and PB closes.