NO

Author Topic: Debugging application on WP7 device - debugger crash  (Read 5058 times)

Martin7Pro

  • Guest
Debugging application on WP7 device - debugger crash
« on: March 17, 2013, 03:43:22 AM »
Hi. First breakpoint cause normal debugger stopping, when I debug simple "like WM" native application on unlocked WP7 device. After anything more (run, step or restart) RAPI crashes.

There is VS2008 JIT output:

Load module: rapiclnt.exe
Load module: coredll.dll.0405.MUI
Load module: RPICDLL.dll
Load module: LPCRT.dll
Load module: RPCRT4LEGACY.dll
Load module: FPCRT.dll
Load module: RPShell.DLL
Load module: ceshell.dll
Load module: RPISHELL.dll
Load module: eventsnd.dll
Load module: waveapic.dll
Load module: phone.dll
Load module: ole32.dll
Load module: EMCLIENT.dll
Load module: ZTrace.dll
Load module: ossvcs.dll
Load module: shlwapi.dll
Load module: ril.dll
Load module: AYGSHELL.dll
Load module: rpivcs.dll
Load module: shcore.dll
Load module: SSLLSP.DLL
Load module: wspm.dll
Load module: nspm.dll
Load module: WsCmExt.dll
Load module: CmNet.dll
Load module: iphlpapi.dll
Load module: WINNSI.DLL
Load module: RPCRT4.dll
Load module: NSI.dll
Load module: WS2.dll
Load module: CXPORT.dll
Load module: OLEAUT32.dll
Load module: PACMANCLIENT.dll
Load module: poide.dll
Load module: coredll.dll
The thread 0x185c03c6 has exited with code -1073741819 (0xc0000005).
The thread 0x176e0102 has exited with code -1073741819 (0xc0000005).
The thread 0xaab002a has exited with code -1073741819 (0xc0000005).
The thread 0x69202d6 has exited with code -1073741819 (0xc0000005).
The thread 0x732011e has exited with code -1073741819 (0xc0000005).
The thread 0x1759011e has exited with code -1073741819 (0xc0000005).
The thread 0x19bc049a has exited with code -1073741819 (0xc0000005).
The thread 0x17c802be has exited with code -1073741819 (0xc0000005).
The program '[0x17C7020A] rapiclnt.exe' has exited with code -1073741819 (0xc0000005).

Probably poide.dll want to use any deprecated WM API, I can post fix, but I do not know, what API is needed.
I cannot patch dll, which is probably generated everytime from appplication source code, or deployed everytime again.
Is possible cooperation for debugging repair?
There is possible to prepare simple WP7 "SDK" for PellesC to enable native Windows Phone 7 development.

More is on:
http://forum.xda-developers.com/showthread.php?p=39227841#post39227841
« Last Edit: March 17, 2013, 03:47:19 AM by Martin7Pro »

Offline frankie

  • Global Moderator
  • Member
  • *****
  • Posts: 2113
Re: Debugging application on WP7 device - debugger crash
« Reply #1 on: March 17, 2013, 11:46:22 AM »
Hi Martin,
As you know this compiler is undisclosed source, so I don't know exactly why poide.dll should be dinamically generated, one reason could be OS Hooking. In this case maybe the hook andling for that function is missing.
We have to wait if Pelle would give a check.......  :'(
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

Martin7Pro

  • Guest
Re: Debugging application on WP7 device - debugger crash
« Reply #2 on: March 18, 2013, 12:56:01 PM »
Hi Frankie. Thank you for answer. I seen remote dll generating is included to Desktop IDE exe. We must wait to Pelle. I found next: when actual breakpoint is removed in debugger stopping time, crash is not shown. Next breakpoint can be set and attached by debugger. Step in/out/cross is unusable, it hangs IDE totally. Then there is possible to debug, but I must reset all breakpoints everytime again and use go directive only (not step). Crash and connection lost shows everytime on application end. It is probably by WP7 view manager, but we can repair it all in remote dll behaviour. I mean "deprecated mobile development" is too preliminary for very good IDE, which can be used also for newer system programming (unofficially). It can help XDA community to port HaRET/Linux/Android and other utilities to WP7 devices.
« Last Edit: March 18, 2013, 02:18:32 PM by Martin7Pro »

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2115
Re: Debugging application on WP7 device - debugger crash
« Reply #3 on: March 18, 2013, 01:46:30 PM »
Can you test that with PellesC 6.50 ide too?
May the source be with you

Martin7Pro

  • Guest
Re: Debugging application on WP7 device - debugger crash
« Reply #4 on: March 18, 2013, 02:37:12 PM »
I tested it with 7.0, 5.0 and 3.0 versions. Is 6.5 different? It is not so easy, other version replaces any directories and older version does not understand to never version project.
I am not sure, but I mean:
PellesC compiles WM/CE project and internally poide.dll together. Dll contains basic debug info about compilled applications. Dll is deployed and launched by RAPI. IDE sends directives (go, stop, step etc.) to dll by RAPI. When dll want to use any deprecated WM API, RAPI crashes. I do not know, why IDE hangs when Step is wanted, probably waits to any unpossible answer from dll by RAPI. When RAPI crashes, Phone connection is lost and must be restarted. In this cause prevously debugged application must be killed manually, instead it every debugging attempt causes crash. Remote explorer can kill application OK, then it is not problem to patch dll behaviour.
« Last Edit: March 18, 2013, 02:46:43 PM by Martin7Pro »

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2115
Re: Debugging application on WP7 device - debugger crash
« Reply #5 on: March 18, 2013, 02:55:47 PM »
Some time ago i test debugging with DeviceEmulator and it doesn't work well with version 7.00
but works with 6.50. That's why i asked that.

BTW:
You can use several versions of poide.exe with options -x -xml.
I have versions 5.00 6.00 6.50 7.00 in same computer in different folders for testing.

Maybe it's time to have zipped packages too for portable use.
 
« Last Edit: March 18, 2013, 06:24:46 PM by timovjl »
May the source be with you