Everything else that doesn't fall into one of the other PB categories.
FreeThought
User
Posts: 54 Joined: Mon Jul 18, 2005 10:28 am
Post
by FreeThought » Thu Jun 14, 2007 7:01 pm
Code: Select all
CalcID = RunProgram("Calc.Exe", "", "", #PB_Program_Open)
Debug CalcID
CloseProgram(CalcID )
I have an error on compiling the above code with debugger on,on 4.10b2, any one having the same problem or just me.(probably my setup).
Last edited by
FreeThought on Sat Jun 16, 2007 10:02 am, edited 2 times in total.
codemaniac
Enthusiast
Posts: 289 Joined: Mon Apr 02, 2007 7:22 am
Location: Finland
Post
by codemaniac » Thu Jun 14, 2007 7:05 pm
Works here?
Cute?
FreeThought
User
Posts: 54 Joined: Mon Jul 18, 2005 10:28 am
Post
by FreeThought » Thu Jun 14, 2007 7:18 pm
@codemaniac
Thanks for testing this . truly appreciate it .please note (threadsafe unchecked).
codemaniac
Enthusiast
Posts: 289 Joined: Mon Apr 02, 2007 7:22 am
Location: Finland
Post
by codemaniac » Thu Jun 14, 2007 11:14 pm
When Threadsafe is unchecked it works like in the above image, but when Threadsave is enabled it hangs there with 1000% CPU usage.
Cute?
ABBKlaus
Addict
Posts: 1143 Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany
Post
by ABBKlaus » Thu Jun 14, 2007 11:34 pm
confirmed
you should consider moving this to the bugs section
Heres a shorter example :
Code: Select all
; Threadsafe must be enabled ! Debugger on
; tested and fails in PB4.02 / PB4.10B2
Debug RunProgram("Calc.Exe")
With disabled debugger and without the debug it works :
Code: Select all
; Threadsafe enabled / Debugger off
; tested in PB4.02 / PB4.10B2
RunProgram("Calc.Exe")
Regards Klaus
PB
PureBasic Expert
Posts: 7581 Joined: Fri Apr 25, 2003 5:24 pm
Post
by PB » Fri Jun 15, 2007 10:53 am
> ; Threadsafe must be enabled ! Debugger on
> ; tested and fails in PB4.02 / PB4.10B2
> Debug RunProgram("Calc.Exe")
Works fine here when set to the above conditions and versions.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
FreeThought
User
Posts: 54 Joined: Mon Jul 18, 2005 10:28 am
Post
by FreeThought » Fri Jun 15, 2007 12:47 pm
well, as I noted above if create threadsafe executable is unchecked,and debugger is on then i get the following msg when compiling:
PureBasic_Compilation0.exe has encountered a problem and needs to close.
(windows xp sp1 4.10b2)
byo
Enthusiast
Posts: 635 Joined: Mon Apr 02, 2007 1:43 am
Location: Brazil
Post
by byo » Sat Jun 16, 2007 4:34 am
Works here with the mentioned options.
PB
PureBasic Expert
Posts: 7581 Joined: Fri Apr 25, 2003 5:24 pm
Post
by PB » Sat Jun 16, 2007 5:22 am
> if create threadsafe executable is unchecked,and debugger is on then
> i get the following msg
Works fine here still. You got any user libraries installed or anything?
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
..::Origin::..
Enthusiast
Posts: 125 Joined: Sat Jun 17, 2006 3:15 pm
Post
by ..::Origin::.. » Sat Jun 16, 2007 5:45 am
Not meaning to change the subject, but for some reason whenever i try to execute a program that doesn't really exist, my program just hangs. (PB4.00) Anyone else get this?
PB
PureBasic Expert
Posts: 7581 Joined: Fri Apr 25, 2003 5:24 pm
Post
by PB » Sat Jun 16, 2007 8:24 am
> whenever i try to execute a program that doesn't really exist,
> my program just hangs. (PB4.00) Anyone else get this?
You mean like this?
Code: Select all
Debug RunProgram("c:\NotExists.exe") ; Returns 0 as expected.
If so, no, with v4.02 this code doesn't hang for me. BTW, v4.00 is obsolete
and is therefore not subject to bug investigation anymore (Fred's words).
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
Baldrick
Addict
Posts: 860 Joined: Fri Jul 02, 2004 6:49 pm
Location: Australia
Post
by Baldrick » Sat Jun 16, 2007 9:47 am
On my computer PB's 1 line snippet works as expected unless I set the threadsafe option active. When active it just hangs.
However, add a couple of other lines to the code & it works as it should threadsafe active or not.
Code: Select all
If OpenWindow(0,0,0,100,100,"",#PB_Window_MinimizeGadget|#PB_Window_ScreenCentered)
Debug RunProgram("c:\NotExists.exe") ; Returns 0 as expected.
EndIf
Edit: Tested with PB4.02 & also 4.10B2 with same results
FreeThought
User
Posts: 54 Joined: Mon Jul 18, 2005 10:28 am
Post
by FreeThought » Sat Jun 16, 2007 9:52 am
it works now in all cases, what I did is to copy my 4.02 folder to another folder instead of installing new 4.02 to an another . updated it .
many thanks to everyone tried to help.
ABBKlaus
Addict
Posts: 1143 Joined: Sat Apr 10, 2004 1:20 pm
Location: Germany
Post
by ABBKlaus » Sat Jun 16, 2007 12:30 pm
i think it depends on the processor
My examples works on my laptop (Intel Pentium M 1,70 GHz), but not on my PC (Intel Core2 Duo E6600 2,40 GHz).
With Baldrick addition it works again on both machines
PS: and yes it was a clean install of PureBasic V4.02
Regards Klaus