Page 1 of 1

PureBasic in VirtualBox?

Posted: Wed Dec 28, 2016 1:37 am
by Dude
Is PureBasic meant to work inside a virtual machine environment, such as VirtualBox?

I have a clean install of Windows XP (32-bit) set up in a virtual machine, and I installed PureBasic 5.51 (32-bit) into it and tried to run the code by PureLust here: http://www.purebasic.fr/english/viewtop ... 13&t=67312

This was the result (to do with porc.exe): https://i.imgur.com/UPw89X3.png

So, is this a PureBasic bug, or a virtual machine bug, or what?

[Edit] I noticed the PureBasic error log (in the screenshot) says it's a resource error.

Re: PureBasic in VirtualBox?

Posted: Wed Dec 28, 2016 1:44 am
by Keya
i cant comment on your specific error with that PORC.EXE crash sorry (although C000001D = illegal instruction, so you might want to attach to it with a debugger and see what instruction its crashing on - unsupported? or just EIP gone AWOL?), but i use PB x86 and x64 on both VirtualBox and VMWare on Windows+Linux+Mac no problems :) my main dev system is my Virtualbox VM with XP32 and currently 5.42LTS x86 (must update that soon!)

Re: PureBasic in VirtualBox?

Posted: Wed Dec 28, 2016 1:07 pm
by Mistrel
Out of curiosity, can you compile OK with 5.42?

Re: PureBasic in VirtualBox?

Posted: Wed Dec 28, 2016 1:08 pm
by PureLust
Hi Dude,

as I mentioned in the last post of my thread, it looks like, that the new routine behind ElapsedMilliseconds() causes some Problems on older PCs - and maybe on virtual-machines also.
I do remember an issue with timing on VMWare a few years ago too.

Could you try to replace ElapsedMilliseconds() with GetTickCount_() in my example-code and see if it works?
If so, it looks like that there is definitely a problem with the new routine behind ElapsedMilliseconds() where Fred never run into on his environment.

But if Fred can easily setup an VirtualBox-environment where he can reproduce it, maybe he can fix it. :D

Re: PureBasic in VirtualBox?

Posted: Wed Dec 28, 2016 1:12 pm
by Mistrel
The porc.exe sounds like some application called as part of the build process. I don't think his program is ever actually run.

Re: PureBasic in VirtualBox?

Posted: Wed Dec 28, 2016 4:50 pm
by dougmo52usr
I'm running virtualbox on linuxmint and purebasic is installed on a win7pro vm. No problem with purebasic ide in my configuration.

I tried the code and of course the tight repeat/until loop made my program unresponsive, so I got rid of the repeat/until and changed to a button event per the following just to check out the ElapsedMilliseconds() call.

Code: Select all

Procedure TestElapsedTimer()
  Static OldTimer
  Protected ActTimer = ElapsedMilliseconds()
  If ActTimer < OldTimer
    Debug "ERROR at "+FormatDate("%hh:%ii:%ss", Date())+" -  old Timer ->  "+Str(OldTimer)+" / "+Str(ActTimer)+"  <- new Timer   ("+Str(ActTimer-OldTimer)+"ms)"
  Else
    Debug "ElapsedTime = "+StrD(ActTimer-OldTimer)
  EndIf
  OldTimer = ActTimer
EndProcedure

Procedure OnBtnTest(EventType)
  TestElapsedTimer()
EndProcedure
__________________________________________________
Code tags added
17.01.2017
RSBasic

Re: PureBasic in VirtualBox?

Posted: Wed Dec 28, 2016 5:06 pm
by Keya
Mistrel wrote:The porc.exe sounds like some application called as part of the build process. I don't think his program is ever actually run.
yes its the Peles Resource Compiler, Purebasic-Win also uses it (in \Compilers\ directory)

btw Dude what happens when you go to command prompt and run porc.exe with no parameters (it should output some basic help information), does it still crash?

Re: PureBasic in VirtualBox?

Posted: Thu Dec 29, 2016 11:58 am
by Dude
Keya wrote:what happens when you go to command prompt and run porc.exe with no parameters
Still get the crash. :(

Also it's nothing to do with the source code, because I get the same error when simply trying to compile and run this:

Code: Select all

Debug "hi"

Re: PureBasic in VirtualBox?

Posted: Thu Dec 29, 2016 12:28 pm
by Keya
Dude wrote:
Keya wrote:what happens when you go to command prompt and run porc.exe with no parameters
Still get the crash. :(
weird! anyway i uploaded the porc.exe and porc.dll from my PB5.42-x86\Compilers\ which i run fine on my XP32, you might wanna compare CRC etc with yours - kinda sounds like a corrupt copy of the file or something - a reinstall probably cant hurt, maybe try other versions also - maybe it's a 5.51 thing (slack me i havent had the chance to upgrade from 5.42 yet!)
https://www.sendspace.com/file/hv2xw4 (75kb)

Re: PureBasic in VirtualBox?

Posted: Thu Dec 29, 2016 2:48 pm
by Mistrel
If it's wrapped up in a virtual machine, maybe you can get it to Fred.