Page 1 of 1

Some demos stop responding

Posted: Sun Mar 10, 2013 3:13 pm
by marcoagpinto
Hello!

I have installed V5.10 of PureBasic on my Windows 7 Home Premium x64.

I was trying a few demos, like three or four, and a couple crashed.

If I well remember they were the 3D ones, like terrain... first the mouse pointer gets busy and the window stops responding and then it tries to find a solution to the problem blah blah and if we want to send a report to Microsoft.

Thanks!

Kind regards,
>Marco A.G.Pinto
---------------

Re: Some demos stop responding

Posted: Sun Mar 10, 2013 7:49 pm
by Azur
Hello
If you use a antivirus software can you shut it down and see if it's better ?
For 3DEngine, you need DirectX9C installed ( link to MSoft DowloadPage in the documentation, Engine3D section )
Best regards

Re: Some demos stop responding

Posted: Mon Mar 11, 2013 11:11 am
by Fred
Could you be more specific on the demo file which crashed ? What GFX card do you have ? Last drivers installed ?

Re: Some demos stop responding

Posted: Tue Mar 12, 2013 2:09 am
by marcoagpinto
Fred wrote:Could you be more specific on the demo file which crashed ? What GFX card do you have ? Last drivers installed ?
Yes, Fred.

My laptop specifications is here: http://marcoagpinto.cidadevirtual.pt/hardware.html

3D demos are in the path: C:\Program Files\PureBasic\Examples\3D

The demo: Terrain.pb

I open it, and press the compile button.

It opens a window saying it can take several minutes to generate and I press okay.

Then it asks for the resolution and if we want to use a window or full screen.

I selected a window with 320x240 without antialiasing and pressed "launch".

A few seconds later, the window title bar changes to "PureBasic - 3D demos (not responding)" and then it appears a window saying it stopped working: "PureBasic_Compilation0.exe has stopped working blah blah". And asks if we want to send the information to Microsoft.

Pressing cancel gives a sound and a window opens in PureBasic editor saying: "The debugged executable quit unexpectedly.".

I hope this can help!

Thanks!

Kind regards,
>Marco A.G.Pinto
---------------

Re: Some demos stop responding

Posted: Tue Mar 12, 2013 10:37 am
by Fred
Is it only the Terrain demos ? This one requiers a lot of power IIRC.

Re: Some demos stop responding

Posted: Tue Mar 12, 2013 2:24 pm
by marcoagpinto
Fred wrote:Is it only the Terrain demos ? This one requiers a lot of power IIRC.
:cry:

Re: Some demos stop responding

Posted: Tue Mar 12, 2013 2:30 pm
by Fred
A GMA X4500M HD is weak for real 3D stuffs.

Re: Some demos stop responding

Posted: Tue Mar 12, 2013 3:08 pm
by LuCiFeR[SD]
actually... marcoagpinto, make sure you have The Nvidia Cg Toolkit installed. Make sure your DirectX is up to date. Also, you may need to convert the .dds files to png if the terrain end up just looking all black. I've managed to get all of the 3D demos running on my Intel GMA 4500MHD based laptop.

Re: Some demos stop responding

Posted: Tue Mar 12, 2013 8:41 pm
by applePi
stripping down and down the example TerrainShadow.pb until i get load time about 2 seconds on my old Pentium D cpu , Geforce 210.
just for fun copy the picture skull.jpg
http://s17.postimage.org/r678lwahr/skull.jpg
to the Data/Textures folder
so you get the terrain with a topology of a skull
Image

Code: Select all

;
; ------------------------------------------------------------
;
;   PureBasic - Terrain : Shadow
;
;    (c) 2012 - Fantaisie Software
;
; ------------------------------------------------------------
;

IncludeFile "Screen3DRequester.pb"

#CameraSpeed = 20
#TerrainMiniX = 0
#TerrainMiniY = 0
#TerrainMaxiX = 0
#TerrainMaxiY = 0
Define.f KeyX, KeyY, MouseX, MouseY

Procedure Clamp(*var.float, min.f, max.f)
  If *var\f < min
    *var\f = min
  ElseIf *var\f > max
    *var\f = max
  EndIf
EndProcedure

; OpenGL needs to have CG enabled to work (Linux and OS X have OpenGL by default)
;
CompilerIf #PB_Compiler_OS <> #PB_OS_Windows Or Subsystem("OpenGL")
  Flags = #PB_Engine3D_EnableCG
CompilerEndIf

If InitEngine3D(Flags)
  
  InitSprite()
  InitKeyboard()
  InitMouse()
  
  If Screen3DRequester()
    Add3DArchive("Data/Textures/"       , #PB_3DArchive_FileSystem)
    Add3DArchive("Data/Textures/nvidia" , #PB_3DArchive_FileSystem)
    Add3DArchive("Data/Scripts"         , #PB_3DArchive_FileSystem)
    Add3DArchive("Data/GUI"           , #PB_3DArchive_FileSystem)
    Add3DArchive("Data/Packs/desert.zip", #PB_3DArchive_Zip)
    Parse3DScripts()
    
    WorldShadows(#PB_Shadow_Modulative, -1, RGB(105, 105, 105))
    
    ;- Light 
    ;
    light.l = CreateLight(#PB_Any ,RGB(255, 255, 255), 4000, 1200, 1000,#PB_Light_Directional)
    SetLightColor(light, #PB_Light_SpecularColor, RGB(255*0.4, 255*0.4,255*0.4)) 
    LightDirection(light ,0.55, -0.3, -0.75) 
    AmbientColor(RGB(255*0.2, 255*0.2,255*0.2))
        
    ;- Camera 
    ;
    CreateCamera(0, 0, 0, 100, 100)
    MoveCamera(0,  200, 1500, 700, #PB_Absolute)
    RotateCamera(0, -65, 0, 0 ,#PB_Absolute)
    CameraBackColor(0, RGB(5, 5, 10))
    
    
    ;----------------------------------
    ; terrain definition
    SetupTerrains(LightID(Light), 3000, #PB_Terrain_NormalMapping)
    ; initialize terrain 
    CreateTerrain(0, 129, 1500, 100, 1, "terrain02", "Dat")
    ; set all texture will be use when terrrain will be constructed 
    AddTerrainTexture(0,  0, 100, "dirt_grayrocky_diffusespecular.dds",  "dirt_grayrocky_normalheight.dds")
        
    ; construct terrains
        DefineTerrainTile(0, tx, ty, "skull.jpg", ty % 2, tx % 2)  
    
    BuildTerrain(0)  
    
    ;InitBlendMaps
    ;lines deleted from 83 To 106
    
    ; enable shadow terrain
    TerrainRenderMode(0, #PB_Terrain_CastShadows)
        
    
    CreateCube(1, 150)
    Global cube =CreateEntity(#PB_Any, MeshID(1), #Null)
    MoveEntity(cube, 300,120,0, #PB_Absolute)
    EntityRenderMode(cube, #PB_Entity_CastShadow)
    
    ; SkyBox
    ;
    SkyBox("desert07.jpg")
    
    ShowGUI(128, 1) ; Display the GUI, semi-transparent and display the mouse cursor
    
    Repeat
      Screen3DEvents()
      
      If ExamineKeyboard()       
        
        If KeyboardPushed(#PB_Key_Left)
          KeyX = -#CameraSpeed 
        ElseIf KeyboardPushed(#PB_Key_Right)
          KeyX = #CameraSpeed 
        Else
          KeyX = 0
        EndIf
        
        If KeyboardPushed(#PB_Key_Up)
          KeyY = -#CameraSpeed 
        ElseIf KeyboardPushed(#PB_Key_Down)
          KeyY = #CameraSpeed 
        Else
          KeyY = 0
        EndIf
        
      EndIf
      
      If ExamineMouse()
        MouseX = -MouseDeltaX() * #CameraSpeed * 0.05
        MouseY = -MouseDeltaY() * #CameraSpeed * 0.05
        
        ;InputEvent3D(MouseX(), MouseY(), MouseButton(#PB_MouseButton_Left))
        
        ;If MouseButton(#PB_MouseButton_Left)
          ;TerrainMousePick(0,  CameraID(0), MouseX(),  MouseY())
          ;MoveEntity(ball, PickX(), PickY()+20, PickZ(), #PB_Absolute)
        ;EndIf
        
      EndIf
      ;CameraLocate(0, CameraX(0), PBO_GetTerrainHeight(0, CameraX(0), CameraZ(0)) + 20, CameraZ(0))
      MoveCamera  (0, KeyX, 0, KeyY)
      RotateCamera(0,  MouseY, MouseX, 0, #PB_Relative) 
      y.f+0.6
      z.f+0.2
      RotateEntity(cube, -90, y, z ,#PB_Absolute)

      RenderWorld()
      FlipBuffers()
      
    Until KeyboardPushed(#PB_Key_Escape)   
    
    End 
    
  EndIf 
Else
  MessageRequester("Error","Can't initialize engine3D")
EndIf 

Re: Some demos stop responding

Posted: Wed Mar 13, 2013 3:03 am
by Psych
Doesn't work for me either, the terain demo just gives me a half black, half white screen that moves as you move the mouse up and down, in fact I've tried a few demos now and I am getting 'The specified 'Texture' doesn't exist on thew ones I've tried so far. Maybe I need to point the path somewhere else, but it doesn't work 'out of the box'.

I'm using an i7 2600K processor.

*edit* I've just realised this post is like 7 years old, lol... it was on the first page of the forum, so I thought it was new.

Re: Some demos stop responding

Posted: Wed Mar 13, 2013 4:28 am
by Thunder93
Hi guys.

I'm able to easily reproduce similar if not identical issue as posted in original post.

First the cursor goes busy and the terrain window title changes to include at the end (Not Responding). Just moments the 'PureBasic_Compilation0.exe has stopped working' dialog appears. After responding to that dialog, another dialog 'PureBasic Debugger: The debugged executable quit unexpectedly.'

For me... Its specific to compiling (with or without Debugger) using the 64bit of PureBasic. Speedy and smoothly loads and so forth, using the 32bit.

I created a 64bit executable from the Terrain code, copied the required stuff over and into the same location. Executed and works fine as kind.

Re: Some demos stop responding

Posted: Wed Mar 13, 2013 4:42 am
by Thunder93
Are your creating the executable or compiling from PB? That what you've described is linked to missing files. If compiled in PB, make sure you have the *\Examples\3D\Data\ folder. If you running the created executable file, make sure that this '\Data\' is copied to the same location.

*\Data\Packs\desert.zip
*\Data\Textures\

these required and maintaining the locations when copying it over.
Psych wrote:Doesn't work for me either, the terain demo just gives me a half black, half white screen *

Re: Some demos stop responding (IT IS A x64 ISSUE)

Posted: Sat Mar 23, 2013 9:41 am
by marcoagpinto
Hello!

MOS_MARAUDER told me on IRC that the terrain application would also crash in his i7 machine but using PureBasic 32-bit would work okay.

To be sure, moments ago I install PureBasic 5.11 x86 and tried to run the terrain application and it worked okay.

Frederic, could you take a look at it and fix it?

Thanks!

Kind regards,
>Marco A.G.Pinto
---------------