#115 Assertion failures in wincvsView.cpp (Trunk / 2.0.3)?

WinCvs
closed-fixed
WinCvs (90)
4
2006-02-07
2006-02-06
No

Just having a look at the code on the trunk (2.0.3 I
think) and I think I've found problem with the use of
CSingleLock and CCriticalSection - basically the code
is passing a timeout which is not permitted in that
context - so in debug mode I get a lot of assertion
failure in afx(blah-blah-blah)dot(blah). The same
problem seems to be discussed here (warning - lots of
adverts and you can only visit this page once per day
without registering):
http://www.experts-
exchange.com/Programming/Programming_Languages/MFC/Q_2
1711876.html

The MSDN documentation is clear as mud on this issue -
there certainly is a lot of "suggestion" that non-
infiinite numbers with a CriticalSection do not make
sense, but nothing in black and white - and in non-
debug mode there is no evidence that the call
actually fails... The closest is here (because
CSingleLock on a CCriticalSection will ultimately
call CCriticalSection:Lock() anyway - but I'd hardly
call this proof:
http://msdn.microsoft.com/library/default.asp?
url=/library/en-
us/vclib/html/_mfc_ccriticalsection.asp

"If timed waits are necessary, you can use a CMutex
object instead of a CCriticalSection object."

Provided that the speed of wincvsView() is not
critical then I suggest that my mods are probably a
better way to handle sync (see attached context diff -
also pasted below).

If the speed is critical then you can probably
replace the calls (untested):
!lock.Lock(20000)
with
!lock.Lock()

Discussion

  • Arthur Barrett

    Arthur Barrett - 2006-02-06

    context diff

     
  • Jerzy Kaczorowski

    • priority: 5 --> 4
    • status: open --> closed-fixed
     
  • Jerzy Kaczorowski

    Logged In: YES
    user_id=119527

    Mon Feb 06 2006 Jerzy Kaczorowski <kaczoroj@hotmail.com>
    * WinCvs 2.0.3
    - #1424895 - Specify INFINITE timeout for view
    synchronisation object to prevent assertions in VS.NET

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks