VariableViewer causes app to crash with memory error.

Post bugs related to the IDE here
jassing
Addict
Addict
Posts: 1745
Joined: Wed Feb 17, 2010 12:00 am

VariableViewer causes app to crash with memory error.

Post by jassing »

Granted - this is a large list() - but still, I would hope the variable viewer(alone) would crash, not the application...
I don't know at what point (list size, or size of values of the list, or what combination; I just know this does it.) Maybe it's a system memory dependant issue? (I started with 1.5 million elements)

Code: Select all

NewList test.s()
DisableDebugger
x$ = ";;ajfj;ask;fkajsd;fjka;sfjka;slkjf;asldjkf;alskdjf;alsjkf;asjkf;askldjf;askdjf;alskdjf;asdjf;alskdjf;asjkdf;alskjdf;alsjkdf;asjkdf;aksjdf;aksjdf;alsjkdf;laskjdf;alsjkdf;lasjkdf;lasjd;fajsd;fajksd;fkj"
For x = 1 To 200000
  AddElement(test())
  If x%2=0
    test()=x$
  EndIf 
Next

EnableDebugger
; Now view the list, and try to view all elements to the list test() and wait....
ShowVariableViewer()
CallDebugger ; Eventually get "Invalid memory access. (write error at address #######)
User avatar
jacdelad
Addict
Addict
Posts: 1431
Joined: Wed Feb 03, 2021 12:46 pm
Location: Planet Riesa
Contact:

Re: VariableViewer causes app to crash with memory error.

Post by jacdelad »

I don't get an error on Windows, x64. Am I supposed to do something more than just start the code?
PureBasic 6.04/XProfan X4a/Embarcadero RAD Studio 11/Perl 5.2/Python 3.10
Windows 11/Ryzen 5800X/32GB RAM/Radeon 7770 OC/3TB SSD/11TB HDD
Synology DS1821+/36GB RAM/130TB
Synology DS920+/20GB RAM/54TB
Synology DS916+ii/8GB RAM/12TB
jassing
Addict
Addict
Posts: 1745
Joined: Wed Feb 17, 2010 12:00 am

Re: VariableViewer causes app to crash with memory error.

Post by jassing »

jacdelad wrote: Fri Jun 02, 2023 5:39 am I don't get an error on Windows, x64. Am I supposed to do something more than just start the code?
Try upping the loop count to 1500000 or 2000000
I suspect it's a machine-dependant, system memory issue. Where in the variable viewer is causing the crash because it runs out of memory.

As for what to expect, I thought I said that.. a memory error. Perhaps my English is not so good?

Image
User avatar
jacdelad
Addict
Addict
Posts: 1431
Joined: Wed Feb 03, 2021 12:46 pm
Location: Planet Riesa
Contact:

Re: VariableViewer causes app to crash with memory error.

Post by jacdelad »

I tried with 2000000. Nothing is displayed, but I still don't get an error. The last message is "Execution stopped. (CallDebugger)".

Edit: Ah, now. Error at line 14. But it takes a while.
PureBasic 6.04/XProfan X4a/Embarcadero RAD Studio 11/Perl 5.2/Python 3.10
Windows 11/Ryzen 5800X/32GB RAM/Radeon 7770 OC/3TB SSD/11TB HDD
Synology DS1821+/36GB RAM/130TB
Synology DS920+/20GB RAM/54TB
Synology DS916+ii/8GB RAM/12TB
jassing
Addict
Addict
Posts: 1745
Joined: Wed Feb 17, 2010 12:00 am

Re: VariableViewer causes app to crash with memory error.

Post by jassing »

jacdelad wrote: Fri Jun 02, 2023 6:25 am Edit: Ah, now. Error at line 14. But it takes a while.
That's why this was there:

Code: Select all

; Now view the list, and try to view all elements to the list test() and wait....
The key being: Now view the list, and try to view all elements to the list test() and wait....

Sorry that my English is not so clear.
Post Reply