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.

Newcomers DBPro Corner / A curious problem... (arrays)

Author
Message
Marxam
13
Years of Service
User Offline
Joined: 8th Apr 2011
Location:
Posted: 8th Apr 2011 18:52
For some reason my computer seems to be disagreeing with arrays lately, and I don't know why. It encounters an error every time I try to form an array.
Ashingda 27
16
Years of Service
User Offline
Joined: 15th Feb 2008
Location:
Posted: 8th Apr 2011 19:59
Show your codes.

kamac
13
Years of Service
User Offline
Joined: 30th Nov 2010
Location: Poland
Posted: 8th Apr 2011 20:50
Before you show us your codes;

That's an sample on how an array should be used:



Very simple, will store numbers to each array.

Marxam
13
Years of Service
User Offline
Joined: 8th Apr 2011
Location:
Posted: 9th Apr 2011 02:35
I know how arrays work, Kamac. The programs in question run fine on other computers. There's something wrong with my computer lately and I'm wondering if anyone around here could tell me what went wrong and how to fix it. On top of this, my computer seems to also be disagreeing with DBP ending it's programs.
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 9th Apr 2011 12:26
The reason everyone people flail around suggesting (what appears to you to be) random stuff is that they are trying to help you despite you providing no detail at all of what the actual problem is.

So, show code and tell us what the error message is. Better still, especially if you have a long program that is failing, try reproducing the problem in a small piece of code and if you do, post that instead.

Hodgey
15
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 9th Apr 2011 13:51
Quote: "my computer seems to also be disagreeing with DBP ending it's programs."


It could be your anti-virus that is disagreeing with DBPro so try excempting DBPro from inspection from your antivirus. An easy way to test if it is your antivirus is to just briefly turn it off, compile something simple and see if it runs.

A clever person solves a problem, a wise person avoids it - Albert Einstein
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 9th Apr 2011 18:07 Edited at: 9th Apr 2011 18:09
Yeah everybody is right without seeing some code we're just guessing. I'm guessing you have bad memory in the computer that's causing the array problem. My other guess about ending weird is that it's hitting a function so put an END right before the first function.

I'm sitting in an unlit room and I have to find a black colored button... help me find it.

Rich Dersheimer
AGK Developer
15
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 10th Apr 2011 22:12 Edited at: 10th Apr 2011 22:13
Quote: "I'm sitting in an unlit room and I have to find a black colored button... help me find it."


If the button is anything like the back of all my receivers, amps, vcrs, dvd players, cable boxes, etc. then the black button has a label on it... in raised black plastic, so you can't see it without a flashlight.

KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 10th Apr 2011 23:40
Quote: "so you can't see it without a flashlight."


Hey, there's a shader for that..

Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 11th Apr 2011 02:08
Quote: "so you can't see it without a flashlight."


Ok I'll try a flashlight.

Agent
20
Years of Service
User Offline
Joined: 7th Sep 2004
Location: Sydney, Australia
Posted: 14th Apr 2011 11:48
Lol. These threads are the best.

TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 14th Apr 2011 16:33
I haz a computer but iz no work, plz help meee!!!1!

TheComet

Agent
20
Years of Service
User Offline
Joined: 7th Sep 2004
Location: Sydney, Australia
Posted: 15th Apr 2011 03:19
There was actually a thread on these forums that I chanced to catch right before it was swiftly deleted maybe a couple of years ago, I forget the exact words used but the thread title was called something like "It's broken" and the post content was something along the lines of "DBPro doesn't work. How do I fix it?"

I lol'd.

Wyldhunt
15
Years of Service
User Offline
Joined: 27th Sep 2009
Location: The Dark Side
Posted: 15th Apr 2011 09:40
Avast Antivirus breaks DBP. If you use it, uninstall it and use something else.

Win7 SP1 broke DBP programs. If you are using Win7 SP1, then you need to install the latest beta patch, which fixes the issue.

If you use Vista or Win7, you will probably need to either run DBP as an administrator or disable UAC.

If none of those issues relate to you, then you will have to provide more information than 'It doesn't work'. Error messages would be helpful in determining the exact reason.

If they do relate to you and fix your problem, a response to let me know that you no longer need help would be polite.
Agent
20
Years of Service
User Offline
Joined: 7th Sep 2004
Location: Sydney, Australia
Posted: 15th Apr 2011 11:29
Quote: "Avast Antivirus breaks DBP. If you use it, uninstall it and use something else."

What? Does it? I use Avast and I don't think I've ever encountered a related problem. Am I shooting myself in the foot without realising it? What effect does Avast have on DBPro?

Burning Feet Man
16
Years of Service
User Offline
Joined: 4th Jan 2008
Location: Sydney, Australia
Posted: 15th Apr 2011 12:56
Avast broke my DBpro, even after I made exceptions. Uninstalled it, problem solved.

Windows 7 SP1 then took its toll, but the DBPro beta U77 solved that drama for me.

Marxam, these would most probably be your issues too.

Help build an online DarkBASIC Professional help archive.
DarkBasic Help Wikia
Wyldhunt
15
Years of Service
User Offline
Joined: 27th Sep 2009
Location: The Dark Side
Posted: 15th Apr 2011 19:08
You can see the potential issues with Avast here:
http://forum.thegamecreators.com/?m=forum_view&t=181171&b=1
If it was breaking anything for you, you'd have noticed by now.
On most systems, as of February, Avast and DBP tend to get in to arguments.
Avast doesn't detect a virus or anything, but programs compiled with DBP fail.
Marxam
13
Years of Service
User Offline
Joined: 8th Apr 2011
Location:
Posted: 15th Apr 2011 20:41
Ahem... Sorry for the lack of information prior to this. I've not exactly been able to get on for a little while to provide more.

As for the code that doesn't work, it's something as simple as this:


This little program used to work, and still does elsewhere, but something in this computer is messing it up. As for an error code, I don't get one. I just get a wonderful little window saying "DarkBASIC Pro Project has stopped working" No error code, no helpful information.

Quote: "If you use Vista or Win7, you will probably need to either run DBP as an administrator or disable UAC."
This has me curious, however. How do I disable UAC?
Marxam
13
Years of Service
User Offline
Joined: 8th Apr 2011
Location:
Posted: 15th Apr 2011 20:55
Quote: "Windows 7 SP1 then took its toll, but the DBPro beta U77 solved that drama for me. "


Also...Where can I get the beta u77?
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 15th Apr 2011 21:31
Quote: "Quote: "so you can't see it without a flashlight."

Ok I'll try a flashlight."

Use the duct tape mod with your head so you can keep both hands free for when you find the button!


Well the code works just fine for me, so it does seem to be isolated to your PC. My only suggestion is try rebooting if you haven't already.

The Internet: Where men are men, women are men, and children are federal agents
Wyldhunt
15
Years of Service
User Offline
Joined: 27th Sep 2009
Location: The Dark Side
Posted: 15th Apr 2011 21:55 Edited at: 15th Apr 2011 22:01
You can find the newest beta in this stickied thread in the DBPro forums:
http://forum.thegamecreators.com/?m=forum_view&t=180294&b=1

Here's a quick 'How to Disable UAC' page I found via Google:
http://www.howtogeek.com/howto/windows-vista/disable-user-account-control-uac-the-easy-way-on-windows-vista/

If you disable it entirely, you can start using pre-Win7 software in your programs folder again without them crashing or having to run them as an admin. You lose the added security of never being able to alter any files in your program folders, but I tend to find that closer to being a bug than a feature, really.

EDIT: Here's the official Microfail page on how to disable it in Win7, complete with video:
http://windows.microsoft.com/en-US/Windows7/Turn-User-Account-Control-on-or-off
Marxam
13
Years of Service
User Offline
Joined: 8th Apr 2011
Location:
Posted: 19th Apr 2011 07:43
It still doesn't seem to work... Nothing appears changed D:
Wyldhunt
15
Years of Service
User Offline
Joined: 27th Sep 2009
Location: The Dark Side
Posted: 19th Apr 2011 10:18 Edited at: 19th Apr 2011 11:31
Hmm...
I ran your code snippet and it worked fine on my compy, so you do seem to have some issue.
(Although, if I wanted to nit-pick, your code would work better thusly)


So...
You have the newest DBP beta.
You are not using Avast.
You tried disabling UAC and it still failed.

Do me a favor and humor me on this one:
Open DBP and click through 'Help > About DarkBasic Professional...'
Make sure that it says 'Version 1.077'

Sometimes, the installers grab the wrong install path, and your problem really sounds exactly like the pre-hotfix from 7.7rc2.

Just to clarify:
Does Darkbasic Pro itself crash, or does the program that you just compiled crash? If the executable program that you are running crashes, but DBP appears to create the exe okay, then I've assumed properly.

The answers I listed above fix the vast majority of issues like yours that I've seen here.

There have been people who have had issues with DX9.0c.
I think I would try running the install program for DX 9.0c first to make sure that your DirectX is doing what it should be doing.
You can grab the official DX 9.0c that we need for DBP here:
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=2da43d38-db71-4c1b-bc6a-9b6652cd92a3&displaylang=en

Make sure that your video drivers are up to date.

Also, if you have any other add-ons installed, either store bought from TGC or free ones, uninstall them and make sure that their DLL's are gone from your Compiler folder. If you got a corrupt download or if you're using an out of date add-on, that can cause conflicts in DBP and programs created with it.

I assume that your computer meets the minimum specs for DBP (It's old enough that it's hard to find a compy that can't run it...)

If none of that helps, I may be out of ideas.

If you want me to take a closer look, follow these steps exactly.


That can give me a few more clues.
The dbpro file can be opened with notepad so that I can make sure that the settings appear normal.
I can see if the exe will run on my pc. (Pre 7.7 rc2, the exe's wouldn't run on any Win7 SP1 machine)
And any other random details that I may get lucky and notice...

EDIT:
One of the things listed in the dbpro file is the location of the folder on your computer.
If your Windows account name is your real name and you don't want to accidentally share that, open the dbpro file with Notepad and scroll through it (It's a short file). If you find any references to personal info such as your Win account name that you don't want public, just replace that word with 'XXXX' and save it before you zip it.

Bonus EDIT:
You can also try compiling and running it in step through debugging mode. That'll tell you exactly where it crashes, although my guess is that it's crashing at the first line...

You can get step through mode by hitting F7, or via the Compile button in the top bar.
Marxam
13
Years of Service
User Offline
Joined: 8th Apr 2011
Location:
Posted: 24th Apr 2011 01:25
Gladly. Here is what you asked for. I do hope you can find out what's wrong here, as I was having quite a bit of fun playing around with DBP before this.

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-11-16 19:16:21
Your offset time is: 2024-11-16 19:16:21