[ros-bugs] [Bug 812] FoxitReader: lots of console windows and out of user handles

ReactOS.Bugzilla at www.reactos.org ReactOS.Bugzilla at www.reactos.org
Sun Sep 7 00:49:20 CEST 2008


http://www.reactos.org/bugzilla/show_bug.cgi?id=812


amine48rz <amine48rz at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
             Status|ASSIGNED                    |NEW

Haos <olaf_siejka at o2.pl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |olaf_siejka at o2.pl

ThePhysicist <timo.kreuzer at web.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|FoxitReader crashs ros      |FoxitReader doesn't show
                   |                            |dialog windows

Haos <olaf_siejka at o2.pl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
Attachment #1523 is|0                           |1
           obsolete|                            |
Attachment #1723 is|0                           |1
           obsolete|                            |

grschneider <grschneider at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |grschneider at gmail.com

ThePhysicist <timo.kreuzer at web.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|FoxitReader doesn't show    |FoxitReader: lots of console
                   |dialog windows              |windows and out of user
                   |                            |handles

b4dc0d3r <b4dc0d3r at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |b4dc0d3r at gmail.com




--- Comment #15 from Haos <olaf_siejka at o2.pl>  2008-01-30 01:16:30 CET ---
Retested in 32041. Tried FoxitReader22. Substituted required mfc42.dll and
mfc42loc.dll with those from Win2003. Also added Winhlp32.exe to ReactOS dir as
it enables Default and Custom buttons during install process. Installation was
completed successfuly (sometimes it requires pressing Enter key when some
buttons dont react to mouse clicks).

When tried to run the program, debug was flooded by a stream of errors (it
filled one mb console buffer within a minute). It doesnt crash ROS, but is
obviously unusable, as i cant get even to an Open file dialog.

The most common error was:
(subsystems\win32\win32k\objects\gdiobj.c:307) GDIOBJ_LockObj: Attempted to
lock
 object 0x18010544, wrong reuse counter (Handle: 0x18, Entry: 0x20)
<win32k.sys:851ce (subsystems/win32/win32k/objects/gdiobj.c:928
(GDIOBJ_LockObj@
12))>
<win32k.sys:6bee6 (subsystems/win32/win32k/ntuser/windc.c:718
(@DceResetActiveDC
Es at 4))>
<win32k.sys:7256d (subsystems/win32/win32k/ntuser/winpos.c:1108
(@co_WinPosSetWi
ndowPos at 28))>
<win32k.sys:6dda5 (subsystems/win32/win32k/ntuser/window.c:4365
(NtUserSetWindow
Placement at 8))>
<NTOSKRNL.EXE:8b41a (ntoskrnl\ke\i386\trap.s:244 (KiFastCallEntry))>
<USER32.dll:23c89 (dll/win32/user32/windows/defwnd.c:801
(DefWndHandleSysCommand))>
<USER32.dll:24311 (dll/win32/user32/windows/defwnd.c:1360
(User32DefWindowProc at 20))>
<USER32.dll:250d8 (dll/win32/user32/windows/defwnd.c:1907 (DefWindowProcA at 16))>
<USER32.dll:26c15 (dll/win32/user32/windows/dialog.c:1507 (DefDlgProcA at 16))>
<USER32.dll:37b2a (dll/win32/user32/windows/message.c:1195
(@IntCallWindowProcA at 24))>
<USER32.dll:38ba7 (dll/win32/user32/windows/message.c:1195
(@IntCallWindowProcA at 24))>
<Foxit Reader.exe:34d097 ()>
<USER32.dll:384d5 (dll/win32/user32/windows/message.c:1163
(@IntCallWindowProcW at 24))>
<USER32.dll:387b2 (dll/win32/user32/windows/message.c:1319
(IntCallMessageProc at 24))>
<USER32.dll:38a8d (dll/win32/user32/windows/message.c:1394
(DispatchMessageW at 4))>
<USER32.dll:25a22 (dll/win32/user32/windows/dialog.c:2324
(IsDialogMessageW at 8))>
<USER32.dll:27e7b (dll/win32/user32/windows/dialog.c:504 (DIALOG_DoDialogBox))>
<USER32.dll:27fb4 (dll/win32/user32/windows/dialog.c:1590
(DialogBoxIndirectParamAorW at 24))>
<USER32.dll:27ff7 (dll/win32/user32/windows/dialog.c:1608
(DialogBoxIndirectParamA at 20))>
<comdlg32.dll:5052 (dll/win32/comdlg32/filedlg.c:297 (GetFileName95 at 4))>
<comdlg32.dll:8e9e (dll/win32/comdlg32/filedlg.c:421 (GetFileDialog95A at 8))>
<comdlg32.dll:8f00 (dll/win32/comdlg32/filedlg.c:3903 (GetOpenFileNameA at 4))>
<Foxit Reader.exe:348eb8>


The whole log i managed to capture is too long (over 600kb) and only a small
part as the buffer was quickly overloaded. If any dev wishes to look at this
bug i can get whole and raddr2line it. Just say so.


--- Comment #16 from ThePhysicist <timo.kreuzer at web.de>  2008-02-25 02:38:00 CET ---
r32473: Now I can start FoxitReader without problems and the debuglog doesn't
get spammed anymore. It still can't do much, as the FileOpen dialog and most
other windows are not shown.
-> changing title


--- Comment #17 from ThePhysicist <timo.kreuzer at web.de>  2008-02-26 01:00:28 CET ---
When double clicking a pdf, foxitreader starts and partly shows the pdf (looks
a little messy) then it fails with an unhandled exception. The exception seems
to be raised by the wine exception handler inside ole32.dll

(lib\rtl\heap.c:940) Heap 00AC0000: invalid in-use arena magic for 00ACA948
Unhandled exception
ExceptionCode:    c0000005
Faulting Address:        0
Address:          77a6c2e9   C:\ReactOS\system32\ole32.dll
CS:EIP 1b:77a6c2e9 (include/reactos/wine/exception.h:183
(__wine_exception_handler), real line is 232)
DS 23 ES 23 FS 3b GS 0
EAX: 00000000   EBX: 00000000   ECX: 00000000
EDX: 00000000   EBP: 00abf7f8   ESI: 00000000   ESP: 00abf7e8
EDI: 00000000   EFLAGS: 00000202
Frames:
   7c900000+19240      C:\ReactOS\system32\ntdll.dll
(lib\rtl\i386\except_asm.s:198 (RtlpExecuteHandler2 at 20))
   7c900000+19214      C:\ReactOS\system32\ntdll.dll
(lib\rtl\i386\except_asm.s:163 (RtlpExecuteHandler at 20))
   7c900000+5da1       C:\ReactOS\system32\ntdll.dll
(dll\ntdll\main\i386\dispatch.S:228 (KiUserExceptionDispatcher at 8))
   76000000+20625      C:\ReactOS\system32\rpcrt4.dll
(.../rpcrt4/rpcrt4_main.c:197 (RpcRaiseException at 4))
   76000000+4097       C:\ReactOS\system32\rpcrt4.dll
(.../rpcrt4/ndr_clientserver.c:158 (NdrGetBuffer at 12))
   77a50000+3913b      C:\ReactOS\system32\ole32.dll (.../ole32/irot_c.c:426
(IrotGetObject))
   77a50000+1d1e1      C:\ReactOS\system32\ole32.dll (.../ole32/moniker.c:749
(RunningObjectTableImpl_GetObject at 12))
     400000+371b0e     C:\PROGRA~1\FOXIT_~1\FOXIT_~1\FOXIT_~1.EXE
...


--- Comment #18 from Haos <olaf_siejka at o2.pl>  2008-02-28 08:43:24 CET ---
I confirm at 32519, KQEmu. Foxit reader installs and runs, although running is
not flawless, raising exceptions but not fatal. Debug log with frames traced
attached.

Trying to open pdf itself as Physicus reported, ole exception.


--- Comment #19 from Haos <olaf_siejka at o2.pl>  2008-02-28 08:45:48 CET ---
Created an attachment (id=2366)
 --> (http://www.reactos.org/bugzilla/attachment.cgi?id=2366)
Debug log of running Firefox


--- Comment #20 from grschneider <grschneider at gmail.com>  2008-05-26 17:37:47 CET ---
Retested with r33709. Foxit Reader 2.3 does crash ReactOS when opening a pdf
but closes because it "encountered a problem and needs to close."

The foxit-internal crashlog.txt says:
Foxit Reader caused an Access Violation (0xc0000005) in module Foxit Reader.exe
at 001b:004a12eb.


--- Comment #21 from grschneider <grschneider at gmail.com>  2008-05-26 17:40:47 CET ---
(In reply to comment #20)
> Retested with r33709. Foxit Reader 2.3 does crash ReactOS when opening a pdf
> but closes because it "encountered a problem and needs to close."
> 
> The foxit-internal crashlog.txt says:
> Foxit Reader caused an Access Violation (0xc0000005) in module Foxit Reader.exe
> at 001b:004a12eb.
> 

Typo: Foxit Reader 2.3 does _NOT_ crash ReactOS...


--- Comment #22 from ThePhysicist <timo.kreuzer at web.de>  2008-05-28 03:12:14 CET ---
I could fix the exception by merging some changes of wine exception.h. The
reason was that RtlUnwind clobbered some registers, that led to a crash after
the exception.
Still FoxitReader does't open pdfs. Now it lauches a row of console windows and
finally crashes in win32k (out of user handles)


--- Comment #23 from ThePhysicist <timo.kreuzer at web.de>  2008-05-28 03:15:10 CET ---
Created an attachment (id=2552)
 --> (http://www.reactos.org/bugzilla/attachment.cgi?id=2552)
debuglog


--- Comment #24 from b4dc0d3r <b4dc0d3r at gmail.com>  2008-07-04 05:41:28 CET ---
I tested some versions at random.  Most have the same behaviour - the app
loads, but when you open a file, lots of cmd windows pop up.  Except they
aren't cmd windows - task manager seems to fill up with a lot of rpcss.exe at
the same time, one entry for each console window.

1.3.0930
1.3.1621
2.0.0912
2.0.1606 *different behaviour
2.3.2923

2.0.1606 *does not load - it crashes with "Memory at 0x0553D792 could not be
read: Page not present."  The crash happens at:
.text:004929EE                 
call    ds:CreateDIBitmap ( GetDC(0), BITMAPINFOHEADER, fdwInit = CBM_INIT,
lpbInit, lpbmi, fuUsage = DIB_RGB_COLORS)

Back to 1.3.1621 this fails at:
.text:0058C010 call    dword ptr [ecx+18h]             ; 
This is a call to ole32.dll:4FF01A32 (XP SP1) which resolves to:
CRunningObjectTable::GetObjectW(struct IMoniker *,struct IUnknown * *)

Confirmed using 1621 through the following, which allows the app to load a file
completely and display it, then the debugger breaks
TAB-K
proc list
proc attach (foxit pid)
bpx 0x18B010
cont

link to download here
http://www.filehippo.com/download_foxit/download/2a252c18763fe5ab76f784c8b1c3f393/


--- Comment #25 from Haos <olaf_siejka at o2.pl>  2008-07-04 20:05:31 CET ---
@b4dc0d3r

Please note what ReactOS version did you use to test Foxit.


--- Comment #26 from b4dc0d3r <b4dc0d3r at gmail.com>  2008-07-05 21:51:13 CET ---
sorry, previous comment was with 3.5 /qemu release package.  I don't think i
made any updates - it should be r34228 clean.

I had to revert the qemu.exe back to previous version, it said "cannot
recognize filesystem on D:" or similar error, using "-hdb fat:somefolder".  I
looked all over the internet - this option for windows is not well documented,
so I gave up and reverted.


--- Comment #27 from Haos <olaf_siejka at o2.pl>  2008-09-06 22:38:37 CET ---
Update:         Results from rev. 35941.
Foxit 2.2 installs fine if supplied with Ms mfc42.dll (optionally -
winhlp32.exe). It also starts to main window. After opening a PDF through Menu:
File/Open it starts what it seems to be spawning cmd windows,
as can be seen on the attached screenshot. The console windows just keep
appearing. Debug is flooded for several minutes with the following DPrints:

(subsystems\win32\csrss\win32csr\guiconsole.c:1525) GuiConsoleResize X 560 Y
375
(subsystems\win32\csrss\win32csr\guiconsole.c:1525) GuiConsoleResize X 560 Y
375
(subsystems\win32\csrss\win32csr\guiconsole.c:2152) received event Console
00932010 GuiData 009320E0 X 80 Y 25

(subsystems\win32\csrss\win32csr\guiconsole.c:1525) GuiConsoleResize X 560 Y
375
(subsystems\win32\csrss\win32csr\guiconsole.c:1525) GuiConsoleResize X 560 Y
375
(subsystems\win32\csrss\win32csr\guiconsole.c:2152) received event Console
00932080 GuiData 00932150 X 80 Y 25

(subsystems\win32\csrss\win32csr\guiconsole.c:1525) GuiConsoleResize X 560 Y
375
(subsystems\win32\csrss\win32csr\guiconsole.c:1525) GuiConsoleResize X 560 Y
375
(subsystems\win32\csrss\win32csr\guiconsole.c:2152) received event Console
00932010 GuiData 009320E0 X 80 Y 25

After running out of handles, ReactOS freezes:

(subsystems\win32\win32k\ntuser\object.c:75) Out of user handles! Used -> 2048,
NM_Handle -> 2048
(subsystems\win32\win32k\ntuser\object.c:109) Handle Count by Type:
 Free = 0 Window = 89 Menu = 1806 CursorIcon = 143 Hook = 2
 CallProc = 5 Accel = 2 Monitor = 1
‹[7h¦Entered debugger on last-chance exception (Exception Code: 0xc0000005)
(Page Fault)
Memory at 0xFFFFFFF4 could not be read: Page not present.


Backtrace:

kdb:> bt
Eip:
<win32k.sys:8358d (subsystems/win32/win32k/ntuser/object.c:374
(@UserDereferenceObject at 4))>
Frames:
<win32k.sys:6b325 (subsystems/win32/win32k/ntuser/menu.c:1571
(@UserCreateMenu at 4))>
<win32k.sys:7c2c4 (subsystems/win32/win32k/ntuser/window.c:814
(@IntGetSystemMenu at 12))>
<win32k.sys:7cf43 (subsystems/win32/win32k/ntuser/window.c:3258
(NtUserGetSystemMenu at 8))>
<NTOSKRNL.EXE:9fe1a (ntoskrnl\ke\i386\trap.s:244 (KiFastCallEntry))>
<ntdll.dll:5dfe (dll\ntdll\dispatch\i386\dispatch.S:267
(KiFastSystemCallRet at 0))>
<win32csr.dll:82fd (subsystems/win32/csrss/win32csr/guiconsole.c:1268
(GuiConsoleWndProc at 16))>
<user32.dll:391c4 (dll/win32/user32/windows/message.c:1177
(@IntCallWindowProcW at 24))>
<user32.dll:392cc (dll/win32/user32/windows/message.c:2284
(User32CallWindowProcFromKernel at 8))>
<ntdll.dll:5d51 (dll\ntdll\dispatch\i386\dispatch.S:137
(KiUserCallbackDispatcher at 12))>
<win32csr.dll:71ce (subsystems/win32/csrss/win32csr/guiconsole.c:1915
(GuiConsoleNotifyWndProc at 16))>
<user32.dll:391c4 (dll/win32/user32/windows/message.c:1177
(@IntCallWindowProcW at 24)>
<user32.dll:392cc ((dll/win32/user32/windows/message.c:2284
(User32CallWindowProcFromKernel at 8)>
<ntdll.dll:5d51(dll\ntdll\dispatch\i386\dispatch.S:137
(KiUserCallbackDispatcher at 12))>
<win32csr.dll:727f (subsystems/win32/csrss/win32csr/guiconsole.c:1958
(GuiConsoleGuiThread at 4))>
<kernel32.dll:24b2e (dll/win32/kernel32/thread/thread.c:55
(BaseThreadStartup at 8))>
<00000000>


Regs:

kdb:> regs
CS:EIP  0x0008:0x9e73e58d
SS:ESP  0x0010:0x9db7f20c
   EAX  0x00000000   EBX  0x00000000
   ECX  0x00000000   EDX  0x9eac1000
   ESI  0xfffffff4   EDI  0x812328f8
   EBP  0x9db7f214
EFLAGS  0x00010246  PF ZF IF IOPL0 RF


--- Comment #28 from Haos <olaf_siejka at o2.pl>  2008-09-06 22:39:43 CET ---
Created an attachment (id=3069)
 --> (http://www.reactos.org/bugzilla/attachment.cgi?id=3069)
Foxit cmd spawn


--- Comment #29 from grschneider <grschneider at gmail.com>  2008-09-07 00:49:20 CET ---
Try to break into kdbg while it spawns processes and do a "proc list" to see
which process it spawns (maybe there are even several processes of the same
type). I suspect it's rpcss.exe, bug #2361 reads exactly the same.


-- 
Configure bugmail: http://www.reactos.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the Ros-bugs mailing list