I posted a sprite demo that worked and thought make it more variable all purpose but it crashes win and ctrl-alt'del takes ages to appear. Here is the changed code and the whole program is attatched in following post.
erase_sprite (oldspx(temp),oldspy(temp),16,16,256) ;erase sprite at last position
had no comma after oldspy(temp). second line of above code. Why crash and not flag? Never mind,sorted.
I found out after commenting changes from working code. Works ok now for different size sprites. Just done a cannon with background pixel left and right side so if it moves 1 pixel at a time then no need to erase it. have to add switches next for left/right shoot. real ones
Last edit: stan cartwright 2017-11-18
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This line in the code has no comma "," after ,oldspy(temp) and that made win 7 crash.
Put a comma in and the code works as intended. Did the code I attatched crash your win machine?
erase_sprite (oldspx(temp),oldspy(temp)16,16,256) *********/\
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Should not do this... the compiler should trap the error. And, this 'Compiling this file crashes win 7' do you actually means this? this would be very very serious. Do you really mean a 'a hung process'?
So, to ease the workload... this is a general ask for all reporting this type of issue. We need the exact code with the issue, therefore, deleted anything (from your source code) that is not required to prove the issue. We need minimal code so we can reproduce the issue. The first line of the ASM is also needed - add this to the top of code.
;Program compiled by Great Cow BASIC (0.98.<<>> 2017-11-07)#chip mega328p, 16
#option Explicit
dim sprite_height,sprite_width as byte
dim sprite_size as word
dim temp as byte
dim oldspy(8) as word
dim oldspx(8) as word
erase_sprite (oldspx(temp),oldspy(temp),16,16,256)
sub erase_sprite (in sprite_x as word, in sprite_y as word, in sprite_width as byte,in sprite_height as byte,in sprite_size as byte)
end sub
@Stan. Well done in resolving. I have this code in the Open Issues folder. Also, look at the code segment above - you can tighten up programming style by using in and type in the Sub definitions - this will use less memory.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for reply. I figured the error was in the lines I had changed because it worked before. I'd copy/pasted lines and wasn't looking for a deleted comma. It flagged unbalanced braces then when sorted crashed. Message "windows is looking for a solution". press cancel and it reappears in a.loop eventually clearing screen back to desktop but win 7 is unresponsive. This laptop dual boots win 10/7 but only has 1.5 G ram..so win says.
I saw a program in Sourceforge promoted as reporting what happens when win crashes.
I could video the compiler crashing.
I haven't used in and type yet or put dim var in a sub. Learning every day.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I saw a program in Sourceforge promoted as reporting what happens when win crashes. . Did the compiler crash? No. It was a errant process that was comsuming 4 MB of memory every second. You dont need another application to see this.
I could video the compiler crashing. Please do not. Provide what we ask. If we think a video is needed then we would, of course, need it.
This is the code I needed - just enough to reproduce the issue
;Program compiled by Great Cow BASIC (0.98.<<>> 2017-11-07)#chip mega328p, 16
#option Explicit
dim sprite_height,sprite_width as byte
dim sprite_size as word
dim temp as byte
dim oldspy(8) as word
dim oldspx(8) as word
erase_sprite (oldspx(temp),oldspy(temp)16,16,256)
sub erase_sprite (in sprite_x as word, in sprite_y as word, in sprite_width as byte,in sprite_height as byte,in sprite_size as byte)
end sub
But, you get a special prize. You get the first ever Patch Kit. This Patch Kit will resolve the issue.
GreatCowBASIC_Build@1701-19112017.rar - please download from personal message I have sent you. Unpack and simply place into your installation. This patch kit MUST be consistent in terms of an operational toolchain. This means using the compiler and the libraries as a consistent installation is most important - you must not, and should not, take just the compiler and not the libraries. Do not even be tempted. Things will break! I will not have time to figure what does not work with what. The patch kit NEEDS to be consistent in terms of an operational toolchain.
Anobium
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Other than the copy of the code with error I attatched I don't understand what you require.
it was v98.01 unmodified fresh download.
Please explain the patch idea in more detail as to should we all be using.
Anyone can miss a comma out. Maybe ask users missing comma error reports...pc caught fire
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Re this comment. Other than the copy of the code with error I attatched I don't understand what you require. Did not the offer of a video. I am trying to say 'provide the minimal code to reproduce the issue.
The patch kit is going to contains the following components:
• Compiler
• Latest Help
• Latest demonstrations
• Updated hardware libraries
• Updated lowlevel libraries
• Updated IDE Lex
• Updated IDE Helpers
• Updated readme.txt!
• Updated PPSTool
The patch kit is NOT going to contain the following components:
-Batch files for programming
- Any tools - programmers etc
Stan you need a patch kit to fix your issue.
Good to see you are on the latest release v0.98.01
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I posted a sprite demo that worked and thought make it more variable all purpose but it crashes win and ctrl-alt'del takes ages to appear. Here is the changed code and the whole program is attatched in following post.
Compiling this file crashes win 7.
Version of build?
What have you tried?
erase_sprite (oldspx(temp),oldspy(temp),16,16,256) ;erase sprite at last position
had no comma after oldspy(temp). second line of above code. Why crash and not flag? Never mind,sorted.
I found out after commenting changes from working code. Works ok now for different size sprites. Just done a cannon with background pixel left and right side so if it moves 1 pixel at a time then no need to erase it. have to add switches next for left/right shoot. real ones
Last edit: stan cartwright 2017-11-18
Please post the exact code with the issue. And, the one change that resolves the issue. Then, I can examine for root cause.
Ta
This line in the code has no comma "," after ,oldspy(temp) and that made win 7 crash.
Put a comma in and the code works as intended. Did the code I attatched crash your win machine?
erase_sprite (oldspx(temp),oldspy(temp)16,16,256)
*********/\
Should not do this... the compiler should trap the error. And, this 'Compiling this file crashes win 7' do you actually means this? this would be very very serious. Do you really mean a 'a hung process'?
So, to ease the workload... this is a general ask for all reporting this type of issue. We need the exact code with the issue, therefore, deleted anything (from your source code) that is not required to prove the issue. We need minimal code so we can reproduce the issue. The first line of the ASM is also needed - add this to the top of code.
@Stan. Well done in resolving. I have this code in the Open Issues folder. Also, look at the code segment above - you can tighten up programming style by using
inandtypein the Sub definitions - this will use less memory.Thanks for reply. I figured the error was in the lines I had changed because it worked before. I'd copy/pasted lines and wasn't looking for a deleted comma. It flagged unbalanced braces then when sorted crashed. Message "windows is looking for a solution". press cancel and it reappears in a.loop eventually clearing screen back to desktop but win 7 is unresponsive. This laptop dual boots win 10/7 but only has 1.5 G ram..so win says.
I saw a program in Sourceforge promoted as reporting what happens when win crashes.
I could video the compiler crashing.
I haven't used in and type yet or put dim var in a sub. Learning every day.
I saw a program in Sourceforge promoted as reporting what happens when win crashes. . Did the compiler crash? No. It was a errant process that was comsuming 4 MB of memory every second. You dont need another application to see this.
I could video the compiler crashing. Please do not. Provide what we ask. If we think a video is needed then we would, of course, need it.
This is the code I needed - just enough to reproduce the issue
But, you get a special prize. You get the first ever Patch Kit. This Patch Kit will resolve the issue.
GreatCowBASIC_Build@1701-19112017.rar - please download from personal message I have sent you. Unpack and simply place into your installation. This patch kit MUST be consistent in terms of an operational toolchain. This means using the compiler and the libraries as a consistent installation is most important - you must not, and should not, take just the compiler and not the libraries. Do not even be tempted. Things will break! I will not have time to figure what does not work with what. The patch kit NEEDS to be consistent in terms of an operational toolchain.
Anobium
Other than the copy of the code with error I attatched I don't understand what you require.
it was v98.01 unmodified fresh download.
Please explain the patch idea in more detail as to should we all be using.
Anyone can miss a comma out. Maybe ask users missing comma error reports...pc caught fire
OK. Did you read the URL in the personal message?
Re this comment. Other than the copy of the code with error I attatched I don't understand what you require. Did not the offer of a video. I am trying to say 'provide the minimal code to reproduce the issue.
See this post for more details on these Patch Kits: https://sourceforge.net/p/gcbasic/discussion/579125/thread/d2483d44/?limit=250#70d7/ca4f
The patch kit is going to contains the following components:
• Compiler
• Latest Help
• Latest demonstrations
• Updated hardware libraries
• Updated lowlevel libraries
• Updated IDE Lex
• Updated IDE Helpers
• Updated readme.txt!
• Updated PPSTool
The patch kit is NOT going to contain the following components:
-Batch files for programming
- Any tools - programmers etc
Stan you need a patch kit to fix your issue.
Good to see you are on the latest release v0.98.01
I copy/pasted the patch to gcbv98.01 and got error report in screen shot for the missing comma but gcb didn't recover but win did
Excellent. Sorted. The first error message is correct and the others are related.
Fixed.
Thank you for testing.