https://bugs.documentfoundation.org/show_bug.cgi?id=88953
Bug ID: 88953
Summary: GetExitCodeProcess call crashes Calc 4.4.0.3 final
Product: LibreOffice
Version: 4.4.0.3 release
Hardware: x86-64 (AMD64)
OS: Windows (All)
Status: UNCONFIRMED
Severity: critical
Priority: medium
Component: Spreadsheet
Assignee: [email protected]
Reporter: [email protected]
Created attachment 112967
--> https://bugs.documentfoundation.org/attachment.cgi?id=112967&action=edit
Example of crashing Calc 4.4.0 but not earlier releases
Call of GetExitCodeProcess system function (kernel32) crashes Calc 4.4.0.3
(final).
There is no crash with releases 4.3.5, 4.3.4 or earlier.
See attached example Or12.ods: Steps to reproduce:
* Fill the application path and press the button.
4.4.0 crashes, other versions (including ancient ones) do not.
---------------------------
code from the example file:
---------------------------
Declare Function CreateProcessA Lib "kernel32" (ByVal _
lpApplicationName As Long, ByVal lpCommandLine As String, ByVal _
lpProcessAttributes As Long, ByVal lpThreadAttributes As Long, _
ByVal bInheritHandles As Long, ByVal dwCreationFlags As Long, _
ByVal lpEnvironment As Long, ByVal lpCurrentDirectory As Long, _
lpStartupInfo As STARTUPINFO, lpProcessInformation As _
PROCESS_INFORMATION) As Long
Declare Function GetExitCodeProcess Lib "kernel32" _
(ByVal hProcess As Long, lpExitCode As Long) As Long
Const STILL_ACTIVE = &H103
Const PROCESS_QUERY_INFORMATION = &H400
Type STARTUPINFO
cb As Long
lpReserved As String
lpDesktop As String
lpTitle As String
dwX As Long
dwY As Long
dwXSize As Long
dwYSize As Long
dwXCountChars As Long
dwYCountChars As Long
dwFillAttribute As Long
dwFlags As Long
wShowWindow As Integer
cbReserved2 As Integer
lpReserved2 As Long
hStdInput As Long
hStdOutput As Long
hStdError As Long
End Type
Type PROCESS_INFORMATION
hProcess As Long
hThread As Long
dwProcessID As Long
dwThreadID As Long
End Type
Const NORMAL_PRIORITY_CLASS = &H20&
Function ShellWithWait(ProgLine As String) As Boolean
Dim proc As PROCESS_INFORMATION
Dim start As STARTUPINFO
Dim iA As Integer
Dim hProcess As Long, RetVal As Long, RetC As Long, sss As Long, ttt As Long
On Error GoTo ErrorHandler
start.cb = 68
RetC = CreateProcessA(0&, ProgLine, 0&, 0&, 1&, _
NORMAL_PRIORITY_CLASS, 0&, 0&, start, proc)
If RetC = 0 Then
MsgBox("An error (code " & RetC & ") occured during process creation of
program " & ProgLine)
ShellWithWait = False
End If
Do
GetExitCodeProcess(proc.hProcess, RetVal)
DoEvents
Loop While RetVal = STILL_ACTIVE
ShellWithWait = True
exitProc:
Exit Function
ErrorHandler:
Select Case Err
Case Else
MsgBox("Error no. " & Err & " occured during starting program " &
ProgLine)
ShellWithWait = False
Resume exitProc
End Select
Resume
End Function
Sub ButtonClicked
Dim Sh As Object, Cl As Object
Set Sh = ThisComponent.getSheets().getByName("ABC")
Set Cl = Sh.getCellByPosition(0, 0)
ShellWithWait(Cl.String)
End Sub
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs