Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Bug Reports / Not defining array leads to silent complier crash.

Author
Message
Broken_Code
13
Years of Service
User Offline
Joined: 20th Aug 2010
Location: Bremen, Germany
Posted: 24th Jan 2011 14:47
Just thought I should point this out:
Not defining an array before using it gives a silent crash when you try to compile. I know it's not likely that you'll forget to dimension an array but some of us are really stupid.

Perhaps some kind of error message would be nice?
Thanks,
Broken_Code
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 24th Jan 2011 22:37
Sample code?

The following code gives the correct compiler error for me and no crash.

Broken_Code
13
Years of Service
User Offline
Joined: 20th Aug 2010
Location: Bremen, Germany
Posted: 25th Jan 2011 02:12
Sorry, should have put it in the first post.
Here is the code in question:



However, I have just tried your code snippet and got a silent complier crash with no error, perhaps the problem is at my end?

Thanks,
Broken_Code
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 25th Jan 2011 12:32
Sounds like it. It is a common error to make and no-one else has reported it. Which version of DBPro are you using?

What happens if you try other deliberate errors such as



?

Perhaps it's the error handling that's gone wrong somehow rather than a specific array problem? Just a thought.
Broken_Code
13
Years of Service
User Offline
Joined: 20th Aug 2010
Location: Bremen, Germany
Posted: 25th Jan 2011 18:45
I'm using the Oct 2 2008 editor build and version 1.07 compiler.

With that code snippet it picks up the error in "for t= to n". Also it picks up other errors and gives a message; such as not finding a file or a memblock/array location error. e.g. this code results in an error:



This gives an "array subscript out of bounds" error.

Thanks,
Broken_Code
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 26th Jan 2011 01:59
That's quite an old version. You could try installing the latest version. I'm using U7.7 with the new default editor.
Broken_Code
13
Years of Service
User Offline
Joined: 20th Aug 2010
Location: Bremen, Germany
Posted: 26th Jan 2011 18:49
Really? That's probably the problem then. When I check for updates through DBP it says I'm up to date. Anyway, will my current code work with a newer version without any modification?

Thanks,
Broken_Code
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 26th Jan 2011 19:38
Quote: "Anyway, will my current code work with a newer version without any modification?"


Hard to say till you try it and get the present problem resolved. You can always go back to an earlier version.

Most things should work - unless your code was affected by a bug fix/feature change.

Actually, I'm a bit confused about which is the latest version. The following page says it's U7.6:

Upgrades page

Lee said something about releasing U7.7 before U7.6 but which is the more recent I've no idea.
Broken_Code
13
Years of Service
User Offline
Joined: 20th Aug 2010
Location: Bremen, Germany
Posted: 26th Jan 2011 19:56
Thanks Green Gandalf!

I think I might leave it a bit before I upgrade as the upgrade from an older version to this one (from when I used it at uni to when I bought this version in the bonanza) stopped my last big project working to the extent that I just scrapped it, and to be honest I want to finish this one, so just to be on the safe side I'll stick with this one for now. Thanks for the link though, I appreciate the help.

Thanks,
Broken_Code
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 26th Jan 2011 21:45
Quote: "as the upgrade from an older version to this one (from when I used it at uni to when I bought this version in the bonanza) stopped my last big project working to the extent that I just scrapped it"


That seems a shame. I'd be surprised if the changes were that drastic.

The only significant problems I recall from earlier versions were the changes to the camera numbering system and to the sound formats. But when those were changed I've no idea now.

I think all my technical demos work - and those that don't can always be fixed (especially if I do things correctly - I'll spare you the details ).

It's best in my experience to stay up-to-date.

Login to post a reply

Server time is: 2024-05-08 15:16:53
Your offset time is: 2024-05-08 15:16:53