Double click on compilataion error in Beremiz console cousing strange behavior

Issue #11 closed
Ynikeev VS created an issue

Create project with ST program. Write code with syntax mistake. Then try to compile and double click on error message in console.

Comments (5)

  1. Andrey Skvortsov

    Please define more precisely what do you mean by 'strange behavior'. And example would be really helpful.

  2. Ynikeev VS reporter

    Cousing error: error cousing.jpg

    After than opens this:

    opens error.jpg

    And program hangs (зависает так пишется?) for long time.

  3. Andrey Skvortsov

    Could you try this patch? This fixes segmentation fault and hanging, but three open will be open anyway. This is actually matiec issue. But the first open window is usually the right one, so I leave this.

    #!
    
    diff -r ce9c0e68389c ProjectController.py
    --- a/ProjectController.py  Tue Nov 22 18:42:48 2016 +0300
    +++ b/ProjectController.py  Wed Nov 23 16:33:54 2016 +0300
    @@ -1080,8 +1080,17 @@
         def ShowError(self, logger, from_location, to_location):
             chunk_infos = self.GetChunkInfos(from_location, to_location)
             for infos, (start_row, start_col) in chunk_infos:
    -            start = (from_location[0] - start_row, from_location[1] - start_col)
    -            end = (to_location[0] - start_row, to_location[1] - start_col)
    +            # start = (from_location[0] - start_row, from_location[1] - start_col)
    +            # end = (to_location[0] - start_row, to_location[1] - start_col)
    +
    +            row = 1 if from_location[0] < start_row else (from_location[0] - start_row)            
    +            col = 1 if (start_row != from_location[0]) else (from_location[1] - start_col)
    +            start = (row, col)
    +
    +            row = 1 if to_location[0] < start_row else (to_location[0] - start_row)            
    +            col = 1 if (start_row != to_location[0]) else (to_location[1] - start_col)
    +            end = (row, col)
    +            
                 if self.AppFrame is not None:
                     self.AppFrame.ShowError(infos, start, end)
    
  4. Ynikeev VS reporter

    Now it works! Thanks! Is it possible to higligt the mistake in code instead oppeinig config-resorse?

  5. Log in to comment