same code working in x64 but not in x86?

Everything related to 3D programming
T4r4ntul4
Enthusiast
Enthusiast
Posts: 119
Joined: Tue Mar 04, 2014 4:15 pm
Location: Netherlands

same code working in x64 but not in x86?

Post by T4r4ntul4 »

well maybe a vague title, but i have a strange thing going on:

i have this code:

Code: Select all

If InitEngine3D()
 
  InitSprite()
  InitKeyboard()
 
  ; get screen size
  ExamineDesktops()
  DesktopW = DesktopWidth(0)-10
  DesktopH = DesktopHeight(0)-60
 
  OpenWindow(0, 0, 0, DesktopW, DesktopH, "Rotating cube")
    OpenWindowedScreen(WindowID(0), 0, 0, DesktopW, DesktopH, 0, 0, 0)

    ; cube creation
    CreateCube(1,35)
    CreateEntity(1, MeshID(1), #PB_Material_None)
   
    ;-Camera
    CreateCamera(0, 0, 0, 100, 100)
    MoveCamera(0, 0, 0, 150, #PB_Absolute)
    CameraBackColor(0, RGB(0, 0, 40))
   
    ;-Light
    CreateLight(0, RGB(255,255,255), -10, 60, 10)
    AmbientColor(RGB(90, 90, 90))
   
    ; game loop
    Repeat
      Event = WindowEvent()
      ExamineKeyboard()
     
      ; rotate cube
      RotateEntity(1, 0.5, 0.5, 0.5, #PB_Relative)
     
      RenderWorld()
     
      FlipBuffers()
    Until KeyboardPushed(#PB_Key_Escape) Or Quit = 1
  EndIf
 
End
but for some reason its working on PB 5.31 (x64) but not on PB 5.31 (x86) the error says: POLINK: fatal error: toegang geweigerd. but compiling 3d things is just working.

what do i miss here?
User avatar
Bisonte
Addict
Addict
Posts: 1324
Joined: Tue Oct 09, 2007 2:15 am

Re: same code working in x64 but not in x86?

Post by Bisonte »

That sounds like a virusscanner .... Try to deactive the scanner and compile it again...
PureBasic 6.21 (Windows x64) | Windows 11 Pro | AsRock B850 Steel Legend Wifi | R7 9800x3D | 64GB RAM | RTX 5080 | ThermaltakeView 270 TG ARGB | build by vannicom​​
English is not my native language... (I often use DeepL.)
T4r4ntul4
Enthusiast
Enthusiast
Posts: 119
Joined: Tue Mar 04, 2014 4:15 pm
Location: Netherlands

Re: same code working in x64 but not in x86?

Post by T4r4ntul4 »

weird but its working without virusscanner. how to solve this with a virusscanner enabled?
User avatar
Bisonte
Addict
Addict
Posts: 1324
Joined: Tue Oct 09, 2007 2:15 am

Re: same code working in x64 but not in x86?

Post by Bisonte »

set the purebasic compiler on the whitelist.
PureBasic 6.21 (Windows x64) | Windows 11 Pro | AsRock B850 Steel Legend Wifi | R7 9800x3D | 64GB RAM | RTX 5080 | ThermaltakeView 270 TG ARGB | build by vannicom​​
English is not my native language... (I often use DeepL.)
T4r4ntul4
Enthusiast
Enthusiast
Posts: 119
Joined: Tue Mar 04, 2014 4:15 pm
Location: Netherlands

Re: same code working in x64 but not in x86?

Post by T4r4ntul4 »

i just learned i cant do that, because i have a 64bit system...
Note:
This option is just available under 32-bit systems. If you are using a 64-bit system you should not have any kind of problems with blocked applications caused by Avira. Therefore, the following options are just valid for 32-bit systems. If you are using a 64-bit system, you do not have access to the Application filter.
source: http://www.avira.com/en/support-for-hom ... /kbid/1257


it gets weirder, if i uncheck 'enable debugger' it will just compile without problems... but without a debugger its hard to test things.

what antivirus do you use?
User avatar
Bisonte
Addict
Addict
Posts: 1324
Joined: Tue Oct 09, 2007 2:15 am

Re: same code working in x64 but not in x86?

Post by Bisonte »

Avira with PB on whitelist ;)
PureBasic 6.21 (Windows x64) | Windows 11 Pro | AsRock B850 Steel Legend Wifi | R7 9800x3D | 64GB RAM | RTX 5080 | ThermaltakeView 270 TG ARGB | build by vannicom​​
English is not my native language... (I often use DeepL.)
T4r4ntul4
Enthusiast
Enthusiast
Posts: 119
Joined: Tue Mar 04, 2014 4:15 pm
Location: Netherlands

Re: same code working in x64 but not in x86?

Post by T4r4ntul4 »

can you tell where you whitelisted it in Avira?
applePi
Addict
Addict
Posts: 1404
Joined: Sun Jun 25, 2006 7:28 pm

Re: same code working in x64 but not in x86?

Post by applePi »

i have stopped to use antivirus software from about 2 years for the reason i have explained here http://purebasic.fr/english/viewtopic.php?f=17&t=55948 . i use the virtualization instead and once you reboot your computer return clean. there is also http://www.sandboxie.com/ i havn't tried it yet. usualy my system stay in good condition even after a year. but there is no %100 complete protection , i have visited alibaba site (like ebay) searching for magnets and the next day and until now alibaba Ads about magnets every here. i don't think it is harmful but this is a proof that they can penetrate the virtualizastion , from my previous experience the things will not be better if the antitivirus/antitrojans are installed.
as to How to White List Programs in Avira : i found these links:
http://www.ehow.co.uk/how_8071941_white ... avira.html
T4r4ntul4
Enthusiast
Enthusiast
Posts: 119
Joined: Tue Mar 04, 2014 4:15 pm
Location: Netherlands

Re: same code working in x64 but not in x86?

Post by T4r4ntul4 »

thanks for your info ApplePi, but i dont have a whitelist. i can make a exception for certain files/map structure, but thats not working. iam gonna turn off the real time protection if iam working on this. i dont see any other option right now.
Post Reply