[ This attachment cannot be displayed inline in 'Print Page' view ]
Title: Re: [dev build] $DEBUG _MEM problem
Post by: FellippeHeitor on October 09, 2021, 10:59:32 pm
As long as the data you're fetching from the .txt file doesn't have anything special to it, the issue is something local to your machine. It worked alright here.
Title: Re: [dev build] $DEBUG _MEM problem
Post by: Richard on October 10, 2021, 12:40:30 am
I still have a problem (though as you say it is specific to my system).
My file was 4,526,566 bytes which gave the problem.
Test file of 3 bytes was OK.
I slowly went through the process of trying to work out at what point the file failed me. It took me all this time since my last reply but it appears now that if I take only the first 2,087,490 bytes it seems to be OK. However if I take one extra than this (2,087,491) then I get the problem.
With the the code that I supplied you above - is it even possible that my file (~4.5 Mbytes) could possibly break debug (even if it was binary nonsense)???
Below are the trailing bytes (as seen by NotePad) for the 2,087,491 byte file which fails - when I take off the last character is appears to be fine.
Title: Re: [dev build] $DEBUG _MEM problem
Post by: FellippeHeitor on October 10, 2021, 12:43:44 am
In normal operation, you should have no issues with such a massive file. But in $Debug mode, if you read the whole file into a variable, and said variable is added to the watch list, you're really stretching it, since the Watch Panel will try to display the whole of it. Just don't add the culprit variable to the watch list and you should be able to use $Debug to find the issue you're investigating.
Title: Re: [dev build] $DEBUG _MEM problem
Post by: FellippeHeitor on October 10, 2021, 12:45:52 am
Also, please observe the limit for STRING variables: http://www.qb64.org/wiki/Variable_Types
Title: Re: [dev build] $DEBUG _MEM problem
Post by: Richard on October 10, 2021, 12:57:21 am
You were correct about the size of string for watching live.
By taking out $DEBUG and by NOT watching my w$ variable - WORKED AS EXPECTED!
Now that I know what the problem was (too big for $DEBUG) and the "magic" number at which strings being watched fail - I can apply very simple work-arounds should I need to inspect a variable (e.g. left$(w$, 2087490) extreme upper limit. Typically I only work with Mbyte size files (rarely Gbyte size).
Many thanks - all seems to be good for me now.
Title: Re: [dev build] $DEBUG _MEM problem
Post by: FellippeHeitor on October 10, 2021, 01:00:19 am
Alright, now come party with me at https://www.qb64.org/forum/index.php?topic=4275.msg136673#msg136673