Tons of false errors

24 posts, 0 answers
  1. Daniel Billingsley
    Daniel Billingsley avatar
    95 posts
    Member since:
    Apr 2010

    Posted 28 May 2010 Link to this post

    I have a fairly complex project that VS compiles without hitch - there are only two warnings in the entire project according to VS.

    I turn on JustCode and I now have 171 JC errors.  Since I now have bold annoying red squigglies all over, I now have to ignore them altogether or turn JustCode off.

    I'm choosing to leave it off.  The only thing I've really found useful was the formatting, which it does very well.
  2. Dennis :: Dr. Code
    Admin
    Dennis :: Dr. Code avatar
    22 posts

    Posted 02 Jun 2010 Link to this post

    Hi Daniel Billingsley,

    Sorry to hear that. Which version are you using? Q1 or Q1 SP? We are fixing such false positives with high priority, so each new version gets better in that respect. We'll release the first test version of Q2 soon, which will have more issues fixed. It's possible that your issues are already fixed as well.

    Of course you could also give us some info about the false positives you are seeing. So we could make sure they are fixed for Q2. Sometimes a very small issue (e.g. JC not beeing able to find a particular type) can cause a lot of errors to be shown. Thanks for your help.


    Kind regards,
    Dennis :: Dr. Code
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. DevCraft banner
  4. Daniel Billingsley
    Daniel Billingsley avatar
    95 posts
    Member since:
    Apr 2010

    Posted 02 Jun 2010 Link to this post

    Q1 SP.

    I've already uninstalled the product, because it activates every time I open VS.  I'll try again in a couple quarters when it maybe is working better.

    I didn't spend a lot of time investigating the errors, as it was obviously so far out of control it wasn't going to be useful.  But I do remember in the code that many of the marked errors where indeed JC apparently not finding the type.
  5. Hans Kratz
    Admin
    Hans Kratz avatar
    102 posts

    Posted 08 Jun 2010 Link to this post

    Hello Daniel Billingsley,

     sorry to hear that you had to uninstall JustCode.

    We will release a beta version of the next release later this week. Maybe you could give it a spin and tell us if it works better for you? We are very interested in fixing those kinds of issues so your feedback would be greatly appreciated.

    Regards,
    Hans Kratz
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  6. mark leavesley
    mark leavesley avatar
    56 posts
    Member since:
    Sep 2012

    Posted 15 Jun 2010 Link to this post

    Hello,

    I also have a lot of false errors. Our project is quite large and used by clients round the world, there are no errors in VS but JC reports 502! Nearly all of them are this:

    VisualBasic.Net: Unknown method 'DBVarCharName()' of 'blah'

    The source line is:

    strr_NEW_COLUMN_DATA_TYPE(0) = DB.DBVarCharName() & "(145)"

    With the empty parenthesis underlined in red.

    If I right click on DBVarCharName and choose 'Just Navigate' and 'Go to definition' it jumps right to it! 

    How can it be an unknown method if it can navigate to it? The method definition is:

    Public Overloads ReadOnly Property DBVarCharName() As String

    Regards,
    Mark Leavesley
  7. mark leavesley
    mark leavesley avatar
    56 posts
    Member since:
    Sep 2012

    Posted 15 Jun 2010 Link to this post

    PS I'm using the latest beta, 2010.1.610.1
  8. Hans Kratz
    Admin
    Hans Kratz avatar
    102 posts

    Posted 17 Jun 2010 Link to this post

    Hi Mark,

    I tried to reproduce the issue with the information you provided but failed. This is some of the code I tried:

    Module Module1
        Sub Main()
            Dim foo As String
            Dim obj As X
            foo = obj.DBVarCharName() & "(145)"
        End Sub
    End Module
     
    Class X
        Inherits Y
        Public Overrides ReadOnly Property DBVarCharName() As String
            Get
                Return Nothing
            End Get
        End Property
    End Class
     
    Public Class Y
        Public Overridable ReadOnly Property DBVarCharName() As String
            Get
                Return Nothing
            End Get
        End Property
    End Class

    This code does not produce any false errors here but of course it is just a small experiment. In order to investigate the issue we need more information or (at best) a small testcase with which we can reproduce this problem.

    As Dennis said before, we are very interested in fixing issue like that and adding code which previously produced such issues to our regression suite. So please help us figuring this out.

    Best wishes,
    Hans Kratz
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  9. mark leavesley
    mark leavesley avatar
    56 posts
    Member since:
    Sep 2012

    Posted 17 Jun 2010 Link to this post

    Hello,

    We will create a test solution for you, but might be a day or two.


    Regards,
    Mark Leavesley
  10. mark leavesley
    mark leavesley avatar
    56 posts
    Member since:
    Sep 2012

    Posted 17 Jun 2010 Link to this post

    In the course of creating the test solution and comparing it to our real code I worked out the problem, below the modified solution:

    Module Module2 
      Sub Main() 
        Dim foo As String 
        Dim obj As X = Nothing 
        foo = obj.DBVarCharName() & "(145)" 
      End Sub 
    End Module 
     
    Class X 
      Inherits Y 
    End Class 
     
    Public Class Y 
      Public Overridable ReadOnly Property DBVarCharName() As String 
        Get 
          Return Nothing 
        End Get 
      End Property 
     
      Public Overridable ReadOnly Property DBVarCharName(ByVal bar As IntegerAs String 
        Get 
          Return Nothing 
        End Get 
      End Property 
    End Class 

    Attached is the error it generates. Hope this helps.


    Regards,
    Mark Leavesley


  11. mark leavesley
    mark leavesley avatar
    56 posts
    Member since:
    Sep 2012

    Posted 17 Jun 2010 Link to this post

    Looking through the other errors JC has reported...it's quite illuminating:

        For i = 1 To D709B_PLANNING_SALES_PERIOD_COMPARISON_COUNT() 
          If i > 1 Then : strl_SQL = strl_SQL & "," : End If 
          strl_SQL = strl_SQL & " str_selected" & i 
        Next 
     

    Produces " Missing 'Next' " (see attachment) , "There is no applicable member or variable '[Next]'", "Unexpected end of block" and "Unexpected end of statement", twice.

    Whereas:
          strl_SQL = strl_SQL & "                           ) AS drv_insert  
     

    Rightfully produces an error "Missing line break", though I would suggest it's a bit misleading as the line break is not missing, it's the closing quote. Alarmingly, not only does VS not produce an error, the code actually runs and works as intended.

    I also have a number of errors about using comparison operators with strings, i.e:

    If string1 > string2 then

    Unconventional maybe, but not actually an error?

    The flip side to the error I reported earlier is that I have several "Several methods are applicable to ...", but it's not true!


    Regards,
    Mark Leavesley
  12. Hans Kratz
    Admin
    Hans Kratz avatar
    102 posts

    Posted 18 Jun 2010 Link to this post

    Hello Mark,

    thanks a lot for your thorough investigation of those issues. I was able to reproduce all of them here with the information you provided and added them as four distinct bug reports to our issue tracker so you will be notified automatically once they are taken care of. We are dedicated to fixing them for the Q2 release or for the Q2 Service Pack 1 at the latest. 

    Thanks again for those most excellent reports. Since many of the VB language features (e.g. the support for unterminated string literals) are undocumented we rely on publicly available sourcecode and user feedback like yours to improve our VB support. If you encounter any other problems like this please report.

    I have awarded you Telerik points for your effort.


     Greetings,
    Hans Kratz
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  13. mark leavesley
    mark leavesley avatar
    56 posts
    Member since:
    Sep 2012

    Posted 18 Jun 2010 Link to this post

    Hello,

    Thanks for that.

    You mean the lack of errors about the missing quote is intentional?!

    We have often noticed that VS2008 doesn't flag missing keywords but when you edit the line the missing word is inserted. Are these behaviours listed anywhere?

    Regards,
    Mark Leavesley
  14. Hans Kratz
    Admin
    Hans Kratz avatar
    102 posts

    Posted 18 Jun 2010 Link to this post

    Hi Mark,

    well, one would expect that the language specification describes what is accepted by the compiler and what is not. Of course there are always bugs in language specifications and in compilers.

    The VB.net language specification for VB.net 9 can be found here:
    http://www.microsoft.com/downloads/en/confirmation.aspx?familyId=39de1dd0-f775-40bf-a191-09f5a95ef500&displayLang=en

    Section 2.4.4 talks about string literals. There is nothing in there which suggests that an unterminated string literal like this are allowed. Still as you said the VB.net compiler compiles it just fine. So it is an undocumented feature/bug in the VB.net compiler.

    We will change JustCode to accept unterminated string literals (since the VB.net compiler accepts them too) but emit a warning for them (since it is ugly to have them and not backed by the VB spec).

    Greetings,
    Hans Kratz
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  15. Matthew
    Matthew avatar
    1 posts
    Member since:
    Sep 2010

    Posted 29 Sep 2010 Link to this post

    With X initialized to Nothing, I think the error is correct.  There wouldn't be a compile time error, but it will fail at runtime.
  16. Hans Kratz
    Admin
    Hans Kratz avatar
    102 posts

    Posted 05 Oct 2010 Link to this post

    Hello Matthew,

    I think all the issues (good code marked as erroneous by JustCode) that Mark raised in this thread have been fixed. Can you elaborate on which problem you are referring to?

    Regards,
    Hans Kratz
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  17. David Brown
    David Brown avatar
    12 posts
    Member since:
    Apr 2005

    Posted 13 Oct 2010 Link to this post

    Hi all,

    I, too, am experiencing a lot of false positives - 132 errors in 70 files.  All are: ASP.Net tags: File does not belong to a project.  The file referenced is a Master file.  VS 2010 lists no errors.  Specifically,

    <%@ page language="vb" autoeventwireup="false" masterpagefile="~/Templates/MasterPage.Master" codebehind="WebPage.aspx.vb" inherits="WebPage" %>
    <%@ mastertype virtualpath="~/Templates/MasterPage.Master" %>

    In both lines, JustCode (2010.3.1004.1) identifies "~/Templates/MasterPage.Master" as a file not belonging to the project.

    Thanks,
    David

     
  18. Daniel Billingsley
    Daniel Billingsley avatar
    95 posts
    Member since:
    Apr 2010

    Posted 13 Oct 2010 Link to this post

    Please don't take this the wrong way....

    but there are some things that Telerik has done really well, and some that make me just scratch my head.

    CodeRush and ReSharper are both such great products, I have to wonder about the wisdom of spending your resources playing "catch up" there vs. adding features in areas where you are leading the industry.  The way you'll keep me as a customer isn't by making another code tool that works almost as good as the competition - it's by making the products I couldn't find at the competition when I ended up with Telerik even better than what they're writing to keep up with you.
  19. Hans Kratz
    Admin
    Hans Kratz avatar
    102 posts

    Posted 24 Oct 2010 Link to this post

    Hi David!

    It would be great if you could help us tracking down this issue. This is a website, right? Do you open it from the local filesystem, local IIS or remote IIS?

     
    All the best,
    Hans Kratz
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  20. Hans Kratz
    Admin
    Hans Kratz avatar
    102 posts

    Posted 24 Oct 2010 Link to this post

    Hello Daniel,

    I think we have quite a bit to offer with JustCode. It is true that we we have to catch up in quite a few areas but there are other areas where the competition has to catch up (e.g. JavaScript support, solution checking speed, ...).

    Of course false errors are very annoying which is why fixing them is one of our top priorities. For example the issues Mark reported were all fixed AFAIK. In order to fix them however we need a way to reproduce the problem, e.g. code snippets when sufficient, information about the solution setup or ideally a test solution which exhibits the problem. It would be really great if you could help us make JustCode better.

    Best wishes,
    Hans Kratz
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  21. Andreas Kaech
    Andreas Kaech avatar
    121 posts
    Member since:
    Sep 2004

    Posted 13 Nov 2010 Link to this post

    Hi Telerik,
    I'm testing JC and see a few advantages over the competitors.
    But, look to the attachment. There is a strange JustCode-Error in a third-party js-file (simile-ajax-bundle.js).
    I'm curious what's the reason.
    Thanks,
    Andreas
  22. mark leavesley
    mark leavesley avatar
    56 posts
    Member since:
    Sep 2012

    Posted 15 Nov 2010 Link to this post

    I think JC is interpreting your hex sequence as a character rather than a literal. What happens if you do  "\u00" + "22";?

    Regards,
    Mark Leavesley
  23. Hans Kratz
    Admin
    Hans Kratz avatar
    102 posts

    Posted 18 Nov 2010 Link to this post

    Hi Andreas,

    Thanks for pointing this out. JustCode does not interpret this unicode character sequence correctly. I have added this problem to our issue tracker and it will be fixed in one of the next releases. Until then you can tell JustCode to ignore the error by pressing Alt-Enter on the error and choosing 'Ignore this Error / Warning'

     

    Best wishes,
    Hans Kratz
    the Telerik team
    See What's New in JustCode in Q3 2010 on Thursday, November 18, 2010 11:00 AM - 12:00 PM EST: Register here>>
  24. Chris
    Chris avatar
    8 posts
    Member since:
    Nov 2010

    Posted 23 Nov 2010 Link to this post

    Since people seem to be using this thread to report false positives, I'll add one. I just started trying out JustCode today, and so far I like it. :) I found this problem in an Outlook 2007 Add-in project (using VSTO, which is what you get if you create a new project under Office > 2007).

    The false positives are on Outlook., and anything derived from it.

    I've got Microsoft.Office.Interop.Outlook imported as part of the project (which is done automatically in this type of project). I suspect the issue JustCode is having is around this user namespace import: Outlook = Microsoft.Office.Interop.Outlook

    I've included some code that illustrates the problem, but you can make it appear by simply creating a new Outlook 2007 add-in and doing "dim asdf as Outlook.Mailitem= nothing"

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As Microsoft.Office.Tools.Ribbon.RibbonControlEventArgs) Handles Button1.Click
           Dim mail As Outlook.MailItem = Nothing
               Dim inspector As Outlook.Inspector = CType(Context, Outlook.Inspector)
     
               mail = TryCast(inspector.CurrentItem, Outlook.MailItem)
               If mail Is Nothing Then
                   ' didn't work
                   Throw New Exception("Outlook Mail Item could not be created.")
     
               End If
       End Sub
  25. Hans Kratz
    Admin
    Hans Kratz avatar
    102 posts

    Posted 26 Nov 2010 Link to this post

    Hello Chris,

    thanks a lot for the feedback. It was quite easily reproducible. The problem is that JustCode does not properly pick up the project-level aliased namespace import Outlook = Microsoft.Office.Interop.Outlook. So as a workaround you can just add the following at the beginning of the file and JustCode should show no errors anymore.

    Imports Outlook = Microsoft.Office.Interop.Outlook

    I marked this for fixing in the Q3 Service Pack.

    Kind regards,
    Hans Kratz
    the Telerik team
    Browse the videos here>> to help you get started with JustCode
Back to Top
DevCraft banner