VariableViewer causes app to crash with memory error.

Post bugs related to the IDE here
jassing
Addict
Addict
Posts: 1885
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: 2029
Joined: Wed Feb 03, 2021 12:46 pm
Location: Riesa

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?
Good morning, that's a nice tnetennba!

PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
jassing
Addict
Addict
Posts: 1885
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: 2029
Joined: Wed Feb 03, 2021 12:46 pm
Location: Riesa

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.
Good morning, that's a nice tnetennba!

PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
jassing
Addict
Addict
Posts: 1885
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