vislib crash

L

Laurent Espariat

Hi,

I'm developping a visio solution in c++ and visio 2002 SR1.

A crash occurs frequently on client computer.

We have this message :

Faulting application visio.exe, version 10.0.2424.4, faulting module
vislib.dll,
version 10.0.2514.4 faulting address 0x00274aea.

The faulting address is always the same. Do you know how to interpret this
address ?
Can Visio developpers give me the function or in the context corresponding
to this address ?

This crash is very hard to produce on developpement context and it's
crashing after my actions.

Best regards,

P.S.
The same error with another version of vislib.dll and so another fault
address.

Type de l'événement : Erreur
Source de l'événement : Microsoft Office 10
Catégorie de l'événement : Aucun
ID de l'événement : 1000
Date : 24/11/2003
Heure : 15:16:30
Utilisateur : N/A
Ordinateur : VE800LAURENT
Description :
Faulting application visio.exe, version 10.0.2420.4, faulting module
vislib.dll, version 10.0.2622.4, fault address 0x0027347a.
 
M

Mark Nelson [MS]

Visio is attempting to retrieve the default dynamic connector at this point.
My guess is that the user is using the Connector Tool to draw a connector.
One thing you might check when dealing with connector issues is the version
of VISGRF.DLL. This is a semi-shared component that can get out of sync
with Visio. My SR-1 version was 525.0 for this file (actually a Gold
version number but we likely did not update the component for SR-1).
 
L

Laurent Espariat

Hi Mark,

Thanks for the quick response.

My visgrf.dll seems to have correct version (10.0.525.4).

I would like to expose you the actions I made to crash sometimes Visio.

My addon modifies user interface of Visio. Only connector tool and pointer
tool are visible (like drawing tool).
The user drags 2 shapes (2D).
He selects the connector tool.
He selects in my stencil a connector.
He drags the connector (and connect it in the same time to the 2 shapes).
At this time, he double-clicks on the shape and an addon's command is
launching.
This command makes a lot of actions like
- change the current page and reorder pages
- ignore event and refresh (ShowChanges, InhibitSelectChange,
DeferRecalc)
- add and delete shapes
- add and delete layers
- stop ignore event and refresh (ShowChanges, InhibitSelectChange,
DeferRecalc)

Sometimes (frequence depends of PC) Visio crashes with a vislib exception.
It seems to be perhaps a problem with an event which arrives later with a
deleted object ? Have you an idea or a solution to fix this bug ?

I'm testing also with the SDK tool "Event Monitor.exe" and Visio never
crashes with this application launched (perhaps problem in queue message ?).

About your response, I don't understand what you mean with "GOLD version" ?

Thanks,

Laurent
 
L

Laurent Espariat

Hi Mark,

I found that my problem came after changement in my code (different version
of VSL).
In fact, in older version, I change method for initializing Visio Object in
callback function.
I think that my new method is better.
The code following is an example.

//changement page window
HRESULT STDMETHODCALLTYPE MevNotifyWinPageTurn (
/* [in] */ IUnknown *ipSink, // ipSink [assert]
/* [in] */ short nEventCode, // code of event that's firing.
/* [in] */ IDispatch *pSourceObj, // object that is firing event.
/* [in] */ long nEventID, // id of event that is firing.
/* [in] */ long nEventSeqNum, // sequence number of event.
/* [in] */ IDispatch *pSubjectObj, // subject of this event.
/* [in] */ VARIANT vMoreInfo, // other info.
/* [retval][out] */ VARIANT *pvResult) // return a value to Visio for
query events.
{
AFX_MANAGE_STATE(AfxGetStaticModuleState())

HRESULT hr=NOERROR;
CString strError;
CVisioDocument visDoc;

try
{
LPVISIOWINDOW pWindow = NULL;
if (SUCCEEDED(pSubjectObj->QueryInterface(IID_IVWindow, (LPVOID *)
&pWindow)))
{
//CVisioWindow visWindow(pWindow); //OLD VERSION
CVisioWindow visWindow(pWindow,TRUE); //V1.091 pb ref objet COM <-
CHANGEMENT IS HERE
//Recherche du mevDocument par le document
hr=visWindow.Document(visDoc);
if (MFoncVisiolib::CheckValid(hr,visDoc))
{


In fact, each time I call QueryInterface, I'm initializing Visio Wrapper
Object with bAssumeResponsibility=TRUE.
I think that with old version (bAssumeResponsibility=FALSE), AddRef is
called and number of reference of COM object is wrong.

So, is my new method correct ?
Can you explain crash with this changement ?

Perhaps, Dynamic connector is released from memory with this method and
Visio crashes ?

Best Regards,

Laurent
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top