Application blocks Ranorex

Class library usage, coding and language questions.
alasdaircs
Posts: 2
Joined: Tue Jul 31, 2007 11:59 am
Location: Exmouth, UK

Application blocks Ranorex

Post by alasdaircs » Wed Aug 01, 2007 10:04 am

I am automating a commercial application written using the Progress database graphical environment (see http://www.progress.com) from a .NET controller application using (currently) Ranorex 1.1.

The problem is that the code runs fine most of the time, but occasionally the Progress app locks up in such a way that the next call from my controller app to e.g. FindFormTitle, FindClassName or FindChildText gets blocked and never returns, leaving my controller app stuck. Even re-starting the controller app fails, as the first thing it does is a call to FindFormTitle, and so it blocks again.

What I would like is to understand what's happening, and on a practical level for the above calls to use thread callbacks or similar to make them robust in the face of this issue.

I used ProcExp.exe from http://www.microsoft.com/sysinternals to get a stack dump from my controller app and the Progress app when they were "stuck".

Controller App:


ntkrnlpa.exe!KiUnexpectedInterrupt+0x121
win32k.sys+0x2fa0
win32k.sys+0x43f57
win32k.sys!EngDeleteSurface+0x3ffd
win32k.sys!WNDOBJ_bEnum+0x3e9
win32k.sys!EngMulDiv+0x4c68
win32k.sys!EngFreeUserMem+0x42af
ntkrnlpa.exe!KeReleaseInStackQueuedSpinLockFromDpcLevel+0xb74
ntdll.dll!KiFastSystemCallRet
USER32.dll!SendMessageW+0x49
OLEACC.dll!DllGetClassObject+0x7bd6
RanorexCore.dll!RxBrowserClickObject+0x337
RanorexCore.dll!RxBrowserClickObject+0xad9
RanorexCore.dll!RxButtonGetType+0x25


Progress App (looks like a recursion problem):


ntkrnlpa.exe!KiUnexpectedInterrupt+0xbc
ntkrnlpa.exe!ExReleaseResourceLite+0x10a
ntdll.dll!KiFastSystemCallRet
uxtheme.dll!Ordinal44+0x542
uxtheme.dll!DrawThemeBackgroundEx+0x1488
uxtheme.dll!DrawThemeBackgroundEx+0x136a
uxtheme.dll!GetThemeBackgroundContentRect+0x49d
USER32.dll!EnumDisplayMonitors+0x111
USER32.dll!DefWindowProcW+0x184
USER32.dll!EnumDisplayMonitors+0x142
ntdll.dll!KiUserCallbackDispatcher+0x13
prow32.dll!DllStartup+0xaa54e
prow32.dll!DllStartup+0xaa056
USER32.dll!GetDC+0x6d
USER32.dll!EnumDisplayMonitors+0xf8
USER32.dll!DefWindowProcW+0x184
USER32.dll!EnumDisplayMonitors+0x142
ntdll.dll!KiUserCallbackDispatcher+0x13
prow32.dll!DllStartup+0xaa54e
prow32.dll!DllStartup+0xaa056
USER32.dll!GetDC+0x6d
USER32.dll!EnumDisplayMonitors+0xf8
USER32.dll!DefWindowProcW+0x184
USER32.dll!EnumDisplayMonitors+0x142
ntdll.dll!KiUserCallbackDispatcher+0x13
prow32.dll!DllStartup+0xaa54e
prow32.dll!DllStartup+0xaa056
USER32.dll!GetDC+0x6d
USER32.dll!EnumDisplayMonitors+0xf8
USER32.dll!DefWindowProcW+0x184
USER32.dll!EnumDisplayMonitors+0x142
ntdll.dll!KiUserCallbackDispatcher+0x13
prow32.dll!DllStartup+0xaa54e
prow32.dll!DllStartup+0xaa056
USER32.dll!GetDC+0x6d
USER32.dll!EnumDisplayMonitors+0xf8
USER32.dll!DefWindowProcW+0x184
USER32.dll!EnumDisplayMonitors+0x142
ntdll.dll!KiUserCallbackDispatcher+0x13
prow32.dll!DllStartup+0xaa54e
prow32.dll!DllStartup+0xaa056
USER32.dll!GetDC+0x6d
USER32.dll!EnumDisplayMonitors+0xf8
USER32.dll!DefWindowProcW+0x184
USER32.dll!EnumDisplayMonitors+0x142
ntdll.dll!KiUserCallbackDispatcher+0x13
prow32.dll!DllStartup+0xaa54e
prow32.dll!DllStartup+0xaa056
USER32.dll!GetDC+0x6d
USER32.dll!EnumDisplayMonitors+0xf8
USER32.dll!DefWindowProcW+0x184
USER32.dll!EnumDisplayMonitors+0x142
ntdll.dll!KiUserCallbackDispatcher+0x13
prow32.dll!DllStartup+0xaa54e
prow32.dll!DllStartup+0xaa056
USER32.dll!GetDC+0x6d
USER32.dll!EnumDisplayMonitors+0xf8
USER32.dll!DefWindowProcW+0x184
USER32.dll!EnumDisplayMonitors+0x142
ntdll.dll!KiUserCallbackDispatcher+0x13
prow32.dll!DllStartup+0xaa54e
prow32.dll!DllStartup+0xaa056
USER32.dll!GetDC+0x6d
USER32.dll!EnumDisplayMonitors+0xf8
USER32.dll!DefWindowProcW+0x184
USER32.dll!EnumDisplayMonitors+0x142
ntdll.dll!KiUserCallbackDispatcher+0x13
prow32.dll!DllStartup+0xaa54e
prow32.dll!DllStartup+0xaa056
USER32.dll!GetDC+0x6d
USER32.dll!EnumDisplayMonitors+0xf8
USER32.dll!DefWindowProcW+0x184
USER32.dll!EnumDisplayMonitors+0x142
ntdll.dll!KiUserCallbackDispatcher+0x13
prow32.dll!DllStartup+0xaa54e
prow32.dll!DllStartup+0xaa056
USER32.dll!GetDC+0x6d
USER32.dll!EnumDisplayMonitors+0xf8
USER32.dll!DefWindowProcW+0x184
USER32.dll!EnumDisplayMonitors+0x142
ntdll.dll!KiUserCallbackDispatcher+0x13
prow32.dll!DllStartup+0xaa54e
prow32.dll!DllStartup+0xaa056
USER32.dll!GetDC+0x6d
USER32.dll!EnumDisplayMonitors+0xf8
USER32.dll!DefWindowProcW+0x184
USER32.dll!EnumDisplayMonitors+0x142
ntdll.dll!KiUserCallbackDispatcher+0x13
prow32.dll!DllStartup+0xaa54e
prow32.dll!DllStartup+0xaa056
USER32.dll!GetDC+0x6d
USER32.dll!EnumDisplayMonitors+0xf8
USER32.dll!DefWindowProcW+0x184
USER32.dll!EnumDisplayMonitors+0x142
ntdll.dll!KiUserCallbackDispatcher+0x13
prow32.dll!DllStartup+0xaa54e
prow32.dll!DllStartup+0xaa056
USER32.dll!GetDC+0x6d
USER32.dll!EnumDisplayMonitors+0xf8
USER32.dll!DefWindowProcW+0x184
USER32.dll!EnumDisplayMonitors+0x142
ntdll.dll!KiUserCallbackDispatcher+0x13
prow32.dll!DllStartup+0xaa54e
prow32.dll!DllStartup+0xaa056
USER32.dll!GetDC+0x6d
USER32.dll!EnumDisplayMonitors+0xf8
USER32.dll!DefWindowProcW+0x184
USER32.dll!EnumDisplayMonitors+0x142
ntdll.dll!KiUserCallbackDispatcher+0x13
prow32.dll!DllStartup+0xaa54e
prow32.dll!DllStartup+0xaa056
USER32.dll!GetDC+0x6d
USER32.dll!EnumDisplayMonitors+0xf8
USER32.dll!DefWindowProcW+0x184
USER32.dll!EnumDisplayMonitors+0x142
ntdll.dll!KiUserCallbackDispatcher+0x13
prow32.dll!DllStartup+0xaa54e
prow32.dll!DllStartup+0xaa056
USER32.dll!GetDC+0x6d
USER32.dll!EnumDisplayMonitors+0xf8
USER32.dll!DefWindowProcW+0x184
USER32.dll!EnumDisplayMonitors+0x142
ntdll.dll!KiUserCallbackDispatcher+0x13
prow32.dll!DllStartup+0xaa54e
prow32.dll!DllStartup+0xaa056
USER32.dll!GetDC+0x6d
USER32.dll!EnumDisplayMonitors+0xf8
USER32.dll!DefWindowProcW+0x184
USER32.dll!EnumDisplayMonitors+0x142
ntdll.dll!KiUserCallbackDispatcher+0x13
prow32.dll!DllStartup+0xaa54e
prow32.dll!DllStartup+0xaa056
USER32.dll!GetDC+0x6d
USER32.dll!EnumDisplayMonitors+0xf8
USER32.dll!DefWindowProcW+0x184
USER32.dll!EnumDisplayMonitors+0x142
ntdll.dll!KiUserCallbackDispatcher+0x13
prow32.dll!DllStartup+0xaa54e
prow32.dll!DllStartup+0xaa056
USER32.dll!GetDC+0x6d
USER32.dll!EnumDisplayMonitors+0xf8
USER32.dll!DefWindowProcW+0x184
USER32.dll!EnumDisplayMonitors+0x142
ntdll.dll!KiUserCallbackDispatcher+0x13
prow32.dll!DllStartup+0xaa54e
prow32.dll!DllStartup+0xaa056
USER32.dll!GetDC+0x6d
USER32.dll!EnumDisplayMonitors+0xf8
USER32.dll!DefWindowProcW+0x184
USER32.dll!EnumDisplayMonitors+0x142
ntdll.dll!KiUserCallbackDispatcher+0x13
prow32.dll!DllStartup+0xaa54e
prow32.dll!DllStartup+0xaa056
USER32.dll!GetDC+0x6d
USER32.dll!EnumDisplayMonitors+0xf8
USER32.dll!DefWindowProcW+0x184
USER32.dll!EnumDisplayMonitors+0x142
ntdll.dll!KiUserCallbackDispatcher+0x13
prow32.dll!DllStartup+0xaa54e
prow32.dll!DllStartup+0xaa056
USER32.dll!GetDC+0x6d
USER32.dll!EnumDisplayMonitors+0xf8
USER32.dll!DefWindowProcW+0x184
USER32.dll!EnumDisplayMonitors+0x142
ntdll.dll!KiUserCallbackDispatcher+0x13
prow32.dll!DllStartup+0xaa54e
prow32.dll!DllStartup+0xaa056
USER32.dll!GetDC+0x6d
USER32.dll!EnumDisplayMonitors+0xf8
USER32.dll!DefWindowProcW+0x184
USER32.dll!EnumDisplayMonitors+0x142
ntdll.dll!KiUserCallbackDispatcher+0x13
prow32.dll!DllStartup+0xaa54e
prow32.dll!DllStartup+0xaa056
USER32.dll!GetDC+0x6d
USER32.dll!EnumDisplayMonitors+0xf8
USER32.dll!DefWindowProcW+0x184
USER32.dll!EnumDisplayMonitors+0x142
ntdll.dll!KiUserCallbackDispatcher+0x13
prow32.dll!DllStartup+0xaa54e
prow32.dll!DllStartup+0xaa056
USER32.dll!GetDC+0x6d
USER32.dll!EnumDisplayMonitors+0xf8
USER32.dll!DefWindowProcW+0x184
USER32.dll!EnumDisplayMonitors+0x142
ntdll.dll!KiUserCallbackDispatcher+0x13
prow32.dll!DllStartup+0xaa54e
prow32.dll!DllStartup+0xaa056
USER32.dll!GetDC+0x6d
USER32.dll!EnumDisplayMonitors+0xf8
USER32.dll!DefWindowProcW+0x184
USER32.dll!EnumDisplayMonitors+0x142
ntdll.dll!KiUserCallbackDispatcher+0x13
prow32.dll!DllStartup+0xaa54e
prow32.dll!DllStartup+0xaa056
USER32.dll!GetDC+0x6d
USER32.dll!EnumDisplayMonitors+0xf8
USER32.dll!DefWindowProcW+0x184
USER32.dll!EnumDisplayMonitors+0x142
ntdll.dll!KiUserCallbackDispatcher+0x13
prow32.dll!DllStartup+0xaa54e
prow32.dll!DllStartup+0xaa056
USER32.dll!GetDC+0x6d
USER32.dll!EnumDisplayMonitors+0xf8
USER32.dll!DefWindowProcW+0x184
USER32.dll!EnumDisplayMonitors+0x142
ntdll.dll!KiUserCallbackDispatcher+0x13
prow32.dll!DllStartup+0xaa54e
prow32.dll!DllStartup+0xaa056
USER32.dll!GetDC+0x6d
USER32.dll!EnumDisplayMonitors+0xf8
USER32.dll!DefWindowProcW+0x184
USER32.dll!EnumDisplayMonitors+0x142
ntdll.dll!KiUserCallbackDispatcher+0x13
prow32.dll!DllStartup+0xaa54e
prow32.dll!DllStartup+0xaa056
USER32.dll!GetDC+0x6d
USER32.dll!EnumDisplayMonitors+0xf8
USER32.dll!DefWindowProcW+0x184
USER32.dll!EnumDisplayMonitors+0x142
ntdll.dll!KiUserCallbackDispatcher+0x13
prow32.dll!DllStartup+0xaa54e
prow32.dll!DllStartup+0xaa056
USER32.dll!GetDC+0x6d
USER32.dll!EnumDisplayMonitors+0xf8
USER32.dll!DefWindowProcW+0x184
USER32.dll!EnumDisplayMonitors+0x142
ntdll.dll!KiUserCallbackDispatcher+0x13
prow32.dll!DllStartup+0xaa54e
prow32.dll!DllStartup+0xaa056
USER32.dll!GetDC+0x6d
USER32.dll!EnumDisplayMonitors+0xf8
USER32.dll!DefWindowProcW+0x184
USER32.dll!EnumDisplayMonitors+0x142
ntdll.dll!KiUserCallbackDispatcher+0x13
prow32.dll!DllStartup+0xaa54e
prow32.dll!DllStartup+0xaa056
USER32.dll!GetDC+0x6d
USER32.dll!EnumDisplayMonitors+0xf8
USER32.dll!DefWindowProcW+0x184
USER32.dll!EnumDisplayMonitors+0x142
ntdll.dll!KiUserCallbackDispatcher+0x13
prow32.dll!DllStartup+0x20e70b
prow32.dll!DllStartup+0x208f80
prow32.dll!DllStartup+0x203eae
prow32.dll!DllStartup+0x210ffd
prow32.dll!DllStartup+0x20c149
prow32.dll!DllStartup+0x20426e
prow32.dll!DllStartup+0x210ec3
prow32.dll!DllStartup+0x19b91f
prow32.dll!DllStartup+0x1a3eca
prow32.dll!DllStartup+0x2c72ad
prow32.dll!DllStartup+0x14e623
prow32.dll!DllStartup+0x13ad87
prow32.dll!DllStartup+0x1a53e4
prow32.dll!DllStartup+0xbda81
prow32.dll!DllStartup+0x2aa97e
prow32.dll+0x1a0e4
prow32.dll+0x629e
prow32.dll!ProStartup+0x5f
prowin32.exe+0x1008
prowin32.exe+0x1148
kernel32.dll!RegisterWaitForInputIdle+0x49


I hope you can shed some light on this for me!

Regards,
Alasdair Cunningham-Smith
ACS Solutions Limited

webops
Site Admin
Site Admin
Posts: 349
Joined: Wed Jul 05, 2006 7:44 pm

Post by webops » Wed Aug 01, 2007 5:04 pm

Please answer the following questions:

Which Ranorex version do you use, RanorexPro or RanorexFree?
Can it happen, that an application dynamically generate windows on your computer?
Please send us the source code of the controller app.

Jenö
Ranorex Team

alasdaircs
Posts: 2
Joined: Tue Jul 31, 2007 11:59 am
Location: Exmouth, UK

Progress update...

Post by alasdaircs » Wed Aug 01, 2007 6:05 pm

Hi Jenö,

Currently it's Ranorex 1.1.0 Free on Windows XP Pro. I intend to upgrade to 1.2 Pro once its all working, but 1.2 free is no good because it hits the new action limit.

The bug is in the Progress Application, not Ranorex - its just that Ranorex could possibly be updated to cope with the situation. Unfortunately, I cannot let you have the controlled application for licencing reasons, and you would not be able to reproduce the problem unless you have access to a similarly badly behaved application.

I do not fully understand your question "Can it happen, that an application dynamically generate windows on your computer?". The controlled app is in most respects a basic Win32 app - no clever tricks.

Source code - yes, you're welcome, but its a bit long to paste into a forum - do you have an FTP upload facility or similar, or can you receive large emails with attachments?

Also, I have had to write my own "SelectItemText" menu selection code using Win32 API calls because yours didn't work for me. Firstly, this may be the cause of the problem, and secondly, it may be worth incorporating in your product as an alternative implementation.

Finally, I have tried a workaround today which seems to be working, but as it's an intermittent problem, it's hard to tell...

Thanks for your time so far,
Alasdair Cunningham-Smith
ACS Solutions Limited