when compiling the following program in C backend-x64, the compiler hang indefinitely till I kill it with the task manager. It compiles normally in asm, after killing it I got the following message:
the compiler appears to have crashed or quit unexpectedly. it will be restarted, Please report the conditions that caused this as a bug
Code: Select all
EnableExplicit
Define Event.i, GadgetID.i, fname.s{1000}, cmd.s, tmp.s, prg.i, directory.s
Structure OPENFILENAME_EX Extends OPENFILENAME
pvReserved.i
dwReserved.i
FlagsEx.i
EndStructure
CompilerIf #PB_Compiler_Processor = #PB_Processor_x86
MessageRequester("Error","Choose x64 compiler")
End
CompilerEndIf
; CreateFile(0, GetTemporaryDirectory() + "ffmpegx.exe")
; WriteData(0, ?MyFile1, ?MyFile1End-?MyFile1)
; CloseFile(0)
Procedure close()
DeleteFile_(GetTemporaryDirectory() + "ffmpegx.exe")
EndProcedure
Procedure.s OpenFileRequester_Ex(Title$,Pattern$,Defdir$,Deffile$)
Define *Buffer, i.i , of.OPENFILENAME_EX, tmp.s
*Buffer = AllocateMemory(StringByteLength(Pattern$)+2)
For i = 0 To StringByteLength(Pattern$)
PokeB(*Buffer+i,PeekB(@Pattern$+i))
If PeekB(@Pattern$+i) = 124
PokeB(*Buffer+i,0)
EndIf
Next
of.OPENFILENAME_EX
of\lStructSize = SizeOf(of)
of\lpstrTitle = @Title$
of\lpstrInitialDir = @Defdir$
of\lpstrFilter = *Buffer
of\nMaxFile = #MAX_PATH
of\lpstrFile = @Deffile$
of\lCustData = 0 ; OpenYesNo
of\Flags = #OFN_EXPLORER | #OFN_LONGNAMES | #OFN_CREATEPROMPT | #OFN_ENABLEHOOK| #OFN_ENABLESIZING
of\FlagsEx = 0
If GetOpenFileName_(of)
tmp = PeekS(of\lpstrFile)
EndIf
ProcedureReturn tmp
EndProcedure
#OFN_ENABLESIZING = $800000
Import ""
PB_Gadget_SendGadgetCommand(hWnd, EventType)
EndImport
Enumeration
#Form
#Panel
#Text=#Panel+100
#String=#Text+100
#Button=#String+100
#Editor=#Button+100
#Option=#Editor+100
#Spin=#Option+100
#Image=#Spin+100
#Check=#Image+100
EndEnumeration
SetGadgetFont(#PB_Default, LoadFont(0, "Arial", 10))
OpenWindow(0,100, 100, 800, 400, "TEST1", #PB_Window_MinimizeGadget | #PB_Window_SizeGadget | #PB_Window_TitleBar )
PanelGadget(#Panel, 10, 10, 600, 350)
AddGadgetItem(#Panel, -1, "ts to mp3")
TextGadget(#Text,10,10,70,20,"File name:")
StringGadget(#String,80,10,250,20,"")
ButtonGadget(#Button,350,10,40,20,"File")
ButtonGadget(#Button+1,460,10,70,20,"Convert")
EditorGadget(#Editor, 10,50,500,100,#PB_Editor_ReadOnly)
CloseGadgetList()
SetGadgetState(#Panel,0)
;PB_Gadget_SendGadgetCommand(GadgetID(#Check), #PB_EventType_LeftClick)
Repeat
Event = WaitWindowEvent()
GadgetID = EventGadget() ; Is it a gadget event?
Select Event
Case #PB_Event_Gadget ;Event = WaitWindowEvent()
If GadgetID=#Button ; choose file
fname = OpenFileRequester_Ex("Choose a file","Ts files (*.ts)|*.ts","",Space(250))
SetGadgetText(#String,fname)
ElseIf GadgetID=#Button+1 ; Convert
; MyBeep(300,250,100)
EndIf
EndSelect
Until Event = #PB_Event_CloseWindow
close()
End
DataSection
MyFile1:
IncludeBinary "E:\install\dvd2\multimedia\ffmpeg\bin\ffmpeg.exe" ; 107MB
MyFile1End:
EndDataSection
Can anyone confirm?
using W10, PB6.12-x64
Thanks