Austin Salonen


System.Runtime.InteropServices.COMException (0x800706BA): The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
at Microsoft.Ink.InkOverlayClass.set_Enabled(Boolean Collecting)
at Microsoft.Ink.InkOverlay.set_Enabled(Boolean value)

...

Setting Enabled to true.

Does anyone have an idea of how to recreate/fix this error

Austin



Re: The RPC server is unavailable

Stefan Wick - MSFT


Hi Austin,

are you running on XP or Vista

Thanks,

Stefan Wick

Microsoft - Windows Experience






Re: The RPC server is unavailable

Austin Salonen

XP on a tablet






Re: The RPC server is unavailable

Stefan Wick - MSFT

The error means that your InkOverlay was not able to connect to the pen service (wisptis.exe).

You can artifically try to produce this error by killing wisptis.exe from TaskManager while toggeling the Enabled property.

In what scenario are you hitting this exception

Thanks,

Stefan Wick

Microsoft - Windows Experience






Re: The RPC server is unavailable

Austin Salonen

I'm new to this code so I can't fully explain it, but I'll give it a shot:
A set of InkOverlays is created (30+ of them) with each being enabled.
A dialog pops up with more InkOverlays (8 in this case).
User enters data in the popup & closes it.
User navigates to next "page" causing the 30+ InkOverlays to be disposed.
User sometimes gets this error when the 29th, 30th, or 31st InkOverlay is getting enabled in the new "page."

I'm also new to TabletPC development so I can't critique the code against some best practices for TabletPC development. If you have any references, they would be greatly appreciated.

Thanks for your help,

Austin




Re: The RPC server is unavailable

Stefan Wick - MSFT

Is this on XP TabletPC Edition 2005 or on 2002 Which version of Microsoft.Ink.dll are you using

Thanks,

Stefan Wick

Microsoft - Windows Experience






Re: The RPC server is unavailable

Austin Salonen

Here's what it says in the System properties

Microsoft Windows XP
Tablet PC Edition 2005
Version 2002
SP 2


Microsoft.Ink.dll version 1.0.2201.0




Re: The RPC server is unavailable

Austin Salonen

Also, I wrote a program that mimics the erring code and added a block that kills wisptis.exe prior to setting Enabled.

The first time it runs, that process is restarted. It fails after the second time I kill the process.

Stepping through the code, I could not get it to fail consistently so I tested stalling the current thread. Then I was able to delay the error popping for several iterations (code below).

What would cause that process to exit


Test Code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Microsoft.Ink;
using System.Diagnostics;

namespace Tester
{
public partial class Form3 : Form
{
public Form3()
{
InitializeComponent();
AddInkBoxes();
}

private void AddInkBoxes()
{
InkOverlay overlay;
int i = 0;

try
{
while (true)
{
//Code similar to erring application code
overlay = new InkOverlay(this.Handle);
overlay.CollectionMode = CollectionMode.InkAndGesture;
overlay.SetGestureStatus(ApplicationGesture.Scratchout, true);
overlay.Gesture += new InkCollectorGestureEventHandler(overlay_Gesture);
overlay.MouseUp += new InkCollectorMouseUpEventHandler(overlay_MouseUp);
overlay.CursorDown += new InkCollectorCursorDownEventHandler(overlay_CursorDown);
//end copied code

Process[] penProcesses = Process.GetProcessesByName("wisptis");

foreach (Process p in penProcesses)
{
p.Kill();
}

/*
* ms -> successful iterations
* 1 -> 3, 2, 7
* 2 -> 3, 8, 7
* 3 -> 2, 3, 2, 2
* 4 -> 50+, 9, 9, 32
* 5 -> 33, 50+, 50+, 50+
* 6 -> 280
* 7 -> 208
* 8 -> 33
* 9 -> 455
* 10 -> 366
* 11 -> 32
* 12 -> 90, 66
* Commented out -> 1
*/
System.Threading.Thread.CurrentThread.Join(12);

overlay.Enabled = true;

i++;

Debug.WriteLine(i);
overlay.Dispose();
}
}
catch (Exception ex)
{
Debug.WriteLine(ex.ToString());
}
}

void overlay_CursorDown(object sender, InkCollectorCursorDownEventArgs e)
{
throw new Exception("The method or operation is not implemented.");
}

void overlay_MouseUp(object sender, CancelMouseEventArgs e)
{
throw new Exception("The method or operation is not implemented.");
}

void overlay_Gesture(object sender, InkCollectorGestureEventArgs e)
{
throw new Exception("The method or operation is not implemented.");
}
}
}




Re: The RPC server is unavailable

Stefan Wick - MSFT

Hi Austin,

I am not sure I understand where you are going with this sample code. The fact that killing a system process triggers the same exception doesn't mean that this is what's actually happening in your application scenario.

The process in question never exits on a TabletPC - unless you kill it or it crashes. When you run your (real) app, do you see any crashes of system components Anything unusual in the event viewer

Could you post the code for the app that hits this exception without killing a system process Could you also try if upgrading the app to Microsoft.Ink.dll v1.7 gets rid of the problem

Thanks,

Stefan Wick

Microsoft - Windows Experience






Re: The RPC server is unavailable

Austin Salonen

Looks like I was mistaken about the version of Microsoft.Ink.dll.

There is something unusual in the event log...

Faulting application wisptis.exe, version 1.7.2600.2180, faulting module wisptis.exe, version 1.7.2600.2180, fault address 0x00013921.
...
The application, C:\WINDOWS\SYSTEM32\WISPTIS.EXE, generated an application error The error occurred on 08/07/2007 @ 08:29:54.177 The exception generated was c0000005 at address 01013921 (WISPTIS)


Access Violation

Symbol file could not be found. Defaulted to export sysmbols for c:\windows\system32\ntdll.dll

ERROR: Module load completed but symbols could nto be loaded for c:\windows\system32\wisptis.exe.
WARNING: Stack unwind information not available. Following frames may be wrong.


Will post the entire data dump if you deem it helpful.



Code:

private void InitializeComponent()
{
// Set up ink collector with the panel
inputInkOverlay = new InkOverlay(this.inputPanel.Handle);

// Only create if a tabletPC
if (IsTabletPC() == true)
{
inputInkOverlay.CollectionMode = CollectionMode.InkAndGesture; // Accept gestures.
// Accept scratchout as a gesture
//currentInkOverlay.DefaultDrawingAttributes.Color = Color.Blue;
inputInkOverlay.SetGestureStatus(ApplicationGesture.Scratchout, true);
inputInkOverlay.Gesture += new
InkCollectorGestureEventHandler(currentInkOverlay_Gesture);
// Install handlers for both CursorDown and MouseUp
inputInkOverlay.MouseUp += new
InkCollectorMouseUpEventHandler(currentInkOverlay_MouseUp);
inputInkOverlay.CursorDown += new
InkCollectorCursorDownEventHandler(currentInkOverlay_CursorDown);
// Ready to accept ink
inputInkOverlay.Enabled = true;

// Get default recognizer
Recognizer recognizer = recognizers.GetDefaultRecognizer();
// Add ink to the recognizer context
inputRecognizerContext = recognizer.CreateRecognizerContext();

// Modify the recognizer if decimals need to be accepted
if (this.DecimalEntry > 0)
{
inputRecognizerContext.Factoid = @"(!IS_DIGITS)*(\.) (!IS_DIGITS)*";
}
else // No decimals
{
inputRecognizerContext.Factoid = @"(!IS_DIGITS)*";
} // if (this.DecimalEntry == true)
// To make sure that all the ink is treated as one "word" and also that the the
// only thing recognized is something on the wordlist
inputRecognizerContext.RecognitionFlags = RecognitionModes.Coerce | RecognitionModes.WordMode;
}
}




Re: The RPC server is unavailable

Stefan Wick - MSFT

Thanks Austin!

Could you please send the full crash information and - if possible - the complete source code of an app that exposes this problem to: swick at microsoft.com

Btw, what Tablet PC model(s) are you seeing this problem on

Thanks,

Stefan Wick

Microsoft - Windows Experience






Re: The RPC server is unavailable

Eliot - MSFT

Hi Austin.

Did you find an answer to this issue

Thanks,

Eliot Graff - MSFT





Re: The RPC server is unavailable

Austin Salonen

Stefan was unable to get anything out of the infromation I sent him. I'm unable to recreate it without manually killing wisptis.exe.

It's only happening twice a month on average; but it does require a restart to get make the tablet functional again. We can live with it if that's the frequency. We get busy here in November so we'll see if happens more often with more usage (upwards of 30x the usage Nov-Jan). If it does, I'll be getting back to this post.

Austin




Re: The RPC server is unavailable

Eliot - MSFT

Austin,

I am going to mark this as answered, even though it's not a good answer, just so it doesn't show up on my daily reports. As the person who opened the thread, you can change it back to unanswered if need be. We will then be alerted first thing each morning.

Good luck,

Eliot





Re: The RPC server is unavailable

Austin Salonen

We had the error again today.

I still cannot recreate the error but I can send the "wisptis.dmp" file generated from the actions that generated the erring call stack.

If that would be helpful, let me know and I can send it to whomever.


Austin





databaseforum