Blitz3D doesn't works on my PC with Windows 7

Blitz3D Forums/Blitz3D Beginners Area/Blitz3D doesn't works on my PC with Windows 7

Lord Saibot(Posted 2012) [#1]
I installed Blitz3D V1.106 on my PC.

If I compile and run my code in blitz3d a new window shows up for half a second and then it just disappears.

The code I tried is very simple:
Graphics 800,600,32,1
SetBuffer BackBuffer()
While Not KeyDown(1)
Cls
Plot Rnd(640),Rnd(480)
Flip
Wend

Nvidia driver version: 295.73
DirectX version: 11
Windows 7 Home Premium

Thanks for your help!


_PJ_(Posted 2012) [#2]
Are you running a 64-bit version of Windows 7?


Lord Saibot(Posted 2012) [#3]
Yes, 64 bit version.


Adam Novagen(Posted 2012) [#4]
Sounds like a false positive on the Escape key. If there's no error message - either a Blitz "MAV" (Memory Access Violation) or a Windows error - then Blitz itself is most likely working fine. Try replacing KeyDown(1) with KeyHit(1) and see what happens. If it still disappears, try using KeyHit(28) instead (28 is the Enter/Return key).


_PJ_(Posted 2012) [#5]
I'm pretty sure that's the likely culprit - Unless someone else can shed some light, try looking over the "Blitz3D Bug Reports" section I recall there have been some known issues with 64-Bit Windows, but it seems there are some workarounds too.

Perhaps even try running in 'compatibility' modes or some kinda 32-Bit VM?

Sorry I can't offer much mroe than this, I dont use 64-bit myself, so cannot say what works or doesnt!


Lord Saibot(Posted 2012) [#6]
The same issue with KeyHit(1) and KeyHit(28)


Yasha(Posted 2012) [#7]
1) What happens if you run in Debug mode?

2) What if you replace the While/Wend with a Repeat/Forever?

3) What happens if you add a line consisting solely of the "stop" command right after SetBuffer BackBuffer()? What about before that? What if it's the first line? Try these in both Debug and Release mode.

If even suggestion 3 doesn't get you some idea of what's going on, then there's a problem with Blitz3D.


SLotman(Posted 2012) [#8]
Try Graphics3D instead of just Graphics. That may solve your problem.


Yue(Posted 2012) [#9]
graphics3d 800,600,0,1
while not keyhit(1)

  print "Hello"
wend



Adam Novagen(Posted 2012) [#10]
Alright I would like to put a stop to something right here, right now.

I have now been programming with Blitz3D on a 64-bit Windows 7 computer for several months, and encountered absolutely no problems or errors that wouldn't occur on a 32-bit system.

I feel that people are very often too quick to cite a 64-bit operating system as the culprit for mishaps and malfunctions, when in reality there are very few things that a 64-bit Windows installation won't be fine with. Drivers must be specifically designed for the system, i.e. 32-bit drivers for a 32-bit system and vice versa, and there are a few specialized programs that make use of 32-bit instructions or registers that cannot be accessed properly from a 64-bit OS. Extremely old 16-bit programs, such as a game on a 3.5-inch floppy disk, are also liable to have problems on a 64-bit OS or just outright not run, but for general things like Blitz3D I have found absolutely no evidence that a 64-bit OS causes unique problems very few genuine examples of problems specifically caused by a 64-bit OS that weren't ultimately due to an oversight by the programmer.

Also, have you actually tried your program on a computer that was not running a 64-bit OS? Because until you've done that, there's absolutely no reason to assume that 64-bit Win7 is the problem in the first place.

</semi-informed rant>

Last edited 2012

Last edited 2012


H&K(Posted 2012) [#11]
DirectX version: 11

I dont have b3d, BUT does DX 11 have a legacy dx 7?


Adam Novagen(Posted 2012) [#12]
Speaking as someone with a DX11 card: absolutely.

Even if it was a driver issue, the program wouldn't just exit quietly; there would still be some form of error message indicating a program crash, "unable to set display mode," etc.

Last edited 2012


_PJ_(Posted 2012) [#13]
@Adam
Sorry, that was my fault - As I read "Windows 7" the first thing I could think of was that it may be 64-bit - and there HAVE been issues reported - whether or not those issues are fundamentally due to the OS or not doesn't affect the fact that there are users experiencing prroblems with Windows 7 and 64-bit OS that do not show on 32-Bit or XP machines.


Adam Novagen(Posted 2012) [#14]
True, but in the case of many I find that it's caused by a failure to observe differences in filenames and paths. One of the most common culprits is forgetting that on a 32-bit OS, a program installs to C:\Program Files, whereas on a 64-bit OS that same program will install to C:\Program Files (x86).

Last edited 2012


Lord Saibot(Posted 2012) [#15]
I reinstalled Blitz3D.

Without any updates this example worked:

graphics3d 800,600,0,1
while not keyhit(1)

print "Hello"
wend

After updating to V1.106 it doesn't work anymore.


John Blackledge(Posted 2012) [#16]
"I have now been programming with Blitz3D on a 64-bit Windows 7 computer for several months, and encountered absolutely no problems or errors that wouldn't occur on a 32-bit system."

Ah, sweet.

I'd like to point people to this earlier thread:
http://www.blitzbasic.co.nz/Community/posts.php?topic=95677#1106541


Adam Novagen(Posted 2012) [#17]
If you're going to dig up that mess of a thread, John (I thought you quit these forums after that?), then I would remind you that of the four problems you listed, the first was an issue that isn't always native to just 64-bit Windows, no one (including me) could reproduce your second problem, and the fourth was the exact issue I described above regarding Program Files (x86). I would also remind you that in your thread, you were citing the Win7 and Vista as being the problem, not the fact that it was a 64-bit installation.

That said, the third of your four problems appears to have been related to 64-bit Windows (or more likely as a specific, the updated 64-bit video drivers), so I'll admit that problems can perhaps occur and retract my statement that I have "found absolutely no evidence that a 64-bit OS causes unique problems." Blitz3D is not watertight; I myself once had to overcome a problem which was crashing blitcc.exe outright, and turned out to be an audio issue (and no, it was not a 64-bit problem but was happening on all platforms). With a program as incredibly simple as the one listed here, though, to immediately assume that a 64-bit OS is the culprit is just silly.

After updating to V1.106 it doesn't work anymore.
Interesting. Try replacing Graphics3D() with Graphics() and run it again. Also try windowed mode, i.e. Graphics 800,600,0,2. For future reference, Print() is a (very slow) 2D drawing command, and Blitz does NOT like drawing 2D graphics on the screen when it's in 3D mode.

Last edited 2012


Lord Saibot(Posted 2012) [#18]
I tried it with Graphics/Graphics3D and with all possible modes.

Nothing worked.

Everytime I run my code i see a window which disappears immediately after showing up. No error messages.


Adam Novagen(Posted 2012) [#19]
Try this:

Graphics 640,480,0,2 ; Windowed mode

Print "Oh hi there."

Delay 5000 ; Hang around for five seconds

End



John Blackledge(Posted 2012) [#20]
Just to be clear to anyone reading this:

1st crash: due to 'parented-sprites'.... code that's been in use successfully for 10 years on XP.
- I now parent the sprites on a separate line. Tedious but a workaround.

2nd crash: due to trying to play a sound without the speakers plugged in. Yes, W7 detected that, blamed the program and crashed it.
- Then I plugged my speakers in. I hope all my users will too.

3rd problem: terrains can only have 2 layers, so I can't have grass and stones and sand.
- Explicitly: Using FastExt, I have
Layer 0: Colormap
Layer 1: Alphamap
Layer 2: stone texture (paths etc)
Layer 3: Alphamap
Layer 4: sand texture (river edges)
Layer 5: Lightmap
Layer 6: Roughening texture (one of Mark's)
Lovely effect, but on Windows 7 only (despite all the latest DX drivers and several 'service packs') the sand texture still blasts upwards through everything, overwriting the grass and stone textures.
I now need to detect Windows 7, and disable layers 3+4. All others are fine.

4th problem: programs cannot be installed in 'Program Files' as before, but must be in 'Program Files (X86)\<username>'.
- This is understood. Tedious for developers, but not generally a problem for users and installing.

And Adam, yes, you _were_ responsible for me quitting these forums, after 10 years.
I just duck in occasionally, to see, amongst other things, who else you're belittling.


Lord Saibot(Posted 2012) [#21]
That didn't work either.


RemiD(Posted 2012) [#22]
My programs coded with Blitz3d work correctly on windows XP SP1, SP2 and windows 7 premium 64bits.


Graphics 800,600,32,1
SetBuffer BackBuffer()
While Not KeyDown(1)
Cls
Plot Rnd(640),Rnd(480)
Flip
Wend



I see 3 possible errors in your code :

1) Rnd(640),Rnd(480)
should be used like this :
Rnd(FloatMin,FloatMax)

2) If you try to draw a pixel with plot, the pixel coordinates are int and so you have to use :
Rand(IntMin,IntMax)

3) If your resolution is 640x480 pixels, the pixels coordinates can be from 0x,0y to 639x,479y

Also you can try :
Repeat
Cls
Renderworld ;(if needed)
Flip
Until(keydown(1)=true)
End

This is what i use in my programs and they work on 2 different computers with windows 7 64 bits.


Adam Novagen(Posted 2012) [#23]
And Adam, yes, you _were_ responsible for me quitting these forums, after 10 years.
I just duck in occasionally, to see, amongst other things, who else you're belittling.
I find this puzzling, since my belittling remarks were entirely directed at Dark Soul until after you'd already sent your last post and apparently left. I would also remind you that I contacted you afterwards by email, with one final pointer back to some additional advice that had been given in the thread regarding the installation paths. I find it hard to believe, in view of the fact that you did virtually nothing but argue violently with GaryV in that thread while I only posted four times, that I'm utterly responsible for you leaving the site which you apparently haven't done anyway. And on top of all of that, your gripes are even now directed at Windows 7 itself, not necessarily 64-bit Windows 7. (And I still can't reproduce problem #2 no matter what I try; again, I would respectfully suggest an audio driver issue.)

BACK ON TOPIC: Saibot, I'm now completely stumped, and can only tell you that this is very abnormal Blitz behaviour on any system. Try this: install a good IDE, preferably something like IDEal. When you've done that, get the Blitz compiler set up and try the program again. If it still disappears, look at the bottom of the screen for the "Output window" tab, and tell me what's shown there.

Last edited 2012

Last edited 2012


RemiD(Posted 2012) [#24]

2nd crash: due to trying to play a sound without the speakers plugged in. Yes, W7 detected that, blamed the program and crashed it.
- Then I plugged my speakers in. I hope all my users will too.



John>>I have experienced this problem too and i have tried all sorts of things before finding the cause of the problem !


Lord Saibot(Posted 2012) [#25]
I installed IDEal.

Same behaviour.

Output window:
BlitzCC V11.6
(C)opyright 2000-2003 Blitz Research Ltd
Compiling "C:\Program Files (x86)\heebtob\IDEal\Temp\New.bb"
Parsing...
Generating...
Translating...
Assembling...
Executing...


Adam Novagen(Posted 2012) [#26]
Huh. This is downright weird. Download this brief program as a test: http://www.mediafire.com/?06j23l3z9z4ascs

Tell me what, if anything, it does.

Last edited 2012


Yasha(Posted 2012) [#27]
One thing worth suggesting, if you have the patience: if it works with the 1.64 release but not with 1.106, you might have some success narrowing down the problem by updating to intermediate versions of B3D and moving forward until you hit the first one that doesn't work.


Lord Saibot(Posted 2012) [#28]
http://www.mediafire.com/?06j23l3z9z4ascs

It shows up for half a second and then disappears.


Adam Novagen(Posted 2012) [#29]
Alright, that was my last idea. Someone else is going to have to take the reins for this problem, it's quite beyond me; also I'd definitely go with Yasha's idea, at least then you'll know which version isn't playing nicely with your computer.


Lord Saibot(Posted 2012) [#30]
Just after the first update V1.85 it doesn't work anymore.


Floyd(Posted 2012) [#31]
Last gasp attempt, try putting this at the top of your code:
EnableDirectInput True
If that doesn't work then try EnableDirectInput False, although I think that is the default.


Lord Saibot(Posted 2012) [#32]
EnableDirectInput True/False doesn't work either.


Yasha(Posted 2012) [#33]
I think it's time this got moved to the Bug Reports forum - it sounds like this is something for BRL to look at themselves, and fix.


Floyd(Posted 2012) [#34]
It could be hard to track down without more data. If this affected many people we would have more bug reports.

I can run the original example code without any problem. That is with Blitz3D 1.106, Windows 7 64-bit, DX11 and nvidia.

A few more desperation measures:

1. Reboot. Who knows, it might help.
2. Get rid of all userlibs. This is easily done by renaming the userlibs folder.
3. Are you running anything unusual or uncommon? It might conflict with Blitz3D.


SLotman(Posted 2012) [#35]
I can also confirm that b3d runs on win7-64 bits *and* vista-64 bits, I have tested it on both systems (using just 3D, no 2D - but it runs fine).

Have you tried:

Graphics3D 800,600,0,2
While not Keyhit(1)
Cls
RenderWorld
Flip
Wend


(Note how I on purpose avoided the SetBuffer and the Plot 2D commands...)

On the same line:

More than one monitor? Try running with just one...
Try turning off Anti-virus software or anything else running in background;

It shouldn't be a userlib problem, since the other exe compiled by Adam had the same behaviour on Lord Saibot's computer.


MathyDude(Posted 2013) [#36]
This happened to me too...I wish we knew how it could be solved...


Imperium(Posted 2013) [#37]
Not sure if this was mentioned yet but did you try installing DirectX 9?

http://www.oldversion.com/windows/directx/

Try a 2003 or 2004 release. I had to do this and roll back my videocard driver to get my crt monitor to stop losing the refresh rate after each reboot. Before rolling back the drivers and DirectX my system after booting into windows would sit at the desktop for 5 seconds before the monitor would go black and very loudly switch the refresh rate. The monitor was a brand new IBM E74. It didn't like the newer drivers. Luckily I was also able to find a E74 driver for XP after hours of searching.


Hardcoal(Posted 2013) [#38]
Same problem here! Until now i thought its my fault


MathyDude(Posted 2014) [#39]
I fixed it by CREATING A NEW USER ACCOUNT
then downloading it!

The problem always happens when I try to make LAN servers...


RGR(Posted 2014) [#40]
I fixed it by CREATING A NEW USER ACCOUNT

Congratulations ...

And that was the reason to reanimate a 2 year old thread and shout it out loud (capital letters)?