Access Violation inside of REGEN3

Access Violation inside of REGEN3

fehrsZBFB9
Advocate Advocate
777 Views
2 Replies
Message 1 of 3

Access Violation inside of REGEN3

fehrsZBFB9
Advocate
Advocate

Hallo Guys,

 

I sometimes get an Access Violation inside of REGEN3. I call it after AcDbVisibilityOverrule has done its work and the display needs an refresh. It doesn't matter if I do it per acedCommandS from inside a command or by hand. It only happens from time to time. What could be the reason for such an access violation? I'm not sure where to start. Any hints? It does not help to replace REGEN3 with native C++ functions. If I do it crashes inside of acedRedraw. There was a previous call to REGEN which always runs fine.

0 Likes
778 Views
2 Replies
Replies (2)
Message 2 of 3

tbrammer
Advisor
Advisor

Check whether you close all objects that you opened within your overridden methods.

Avoid to open any objects kForWrite within your implementation of

   AcDb::Visibility AcDbVisibilityOverrule::visibility(const AcDbEntity* pSubject)

 

Also I would check whether your AcDbVisibilityOverrule causes the problem by simply returning the defaults:

AcDb::Visibility MyVisibilityOverride::setVisibility(
    AcDbEntity *pSubject, 
    AcDb::Visibility newVal, 
    Adesk::Boolean doSubents
) {
   return AcDbEntity::subSetVisibility(pSubject, newVal, doSubents);
   // your Code
}

AcDb::Visibility MyVisibilityOverride::visibility() {
    return AcDbEntity::subVisibility();
    /// your code
}

If you still get crashes you have to search the reason elsewhere.


Thomas Brammer ● Software Developer ● imos AGLinkedIn
If an answer solves your problem please [ACCEPT SOLUTION]. Otherwise explain why not.

Message 3 of 3

fehrsZBFB9
Advocate
Advocate

Maybe this crash has nothing to do with my code. It only happens with Advance Steel. Neither with pure AutoCAD nor with Architecture. Thanks anyway.

0 Likes