MicroCodeStudioPlus keeps crashing.


Closed Thread
Results 1 to 40 of 68

Hybrid View

  1. #1
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,170


    Did you find this post helpful? Yes | No

    Default Re: MicroCodeStudioPlus keeps crashing.

    Of course Mecanique should fix this, but I am trying to see anything in common to all the cases.

    If indeed there is a driver, a program or something else that we miss this moment, maybe it will lead to a solution.

    Do all crashes (of different users) give the same error message?

    Ioannis

  2. #2
    Join Date
    Sep 2009
    Posts
    755


    Did you find this post helpful? Yes | No

    Default Re: MicroCodeStudioPlus keeps crashing.

    If I may add, to me, problem probably doesn't have anything with hardware, drivers, etc...
    A List index out of bauds(0) points to me, that some of list isn't initialized. I don't know how they triggering recognition of keywords, and auto correct etc.
    I think that error probably jump out while typing. So it needed to be specific combination, I think someone mention that error is related with typing comments.
    I don't know what programing language they use, but simple TRY ... CATCH should do a trick, or in VB on error resume next in every sub routine. That isn't a lot of work, but it can ignore error, or point to line of code where is happening.
    Anyway, that I use in my programs to prevent crashes, and when error do happen, user can send me print screen with detailed description in MSGBOX. Saved me lot of times...

  3. #3
    Join Date
    Oct 2004
    Posts
    440


    Did you find this post helpful? Yes | No

    Default Re: MicroCodeStudioPlus keeps crashing.

    I agree with pedja089. Finding the set of repeatable circumstances which cause the crash would be the most beneficial as it would give the author something to work with in debugging what's probably several thousand lines of code.

    Norm
    Last edited by Normnet; - 8th February 2018 at 00:55.

  4. #4
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,621


    Did you find this post helpful? Yes | No

    Default Re: MicroCodeStudioPlus keeps crashing.

    Of course, and don't think for a second we haven't tried to but it really does feel totally random. Except for the fact that it has never ever (not for me at least) crashed when just sitting idle, it's ALWAYS been while I have been typing on the keyboard.

    The strange thing is that sometimes it could work for Days without a single crash and sometimes it would crash 5 times in 20 minutes.

    picster, I don't think it has anything to do with hardware so I'd certainly try it on the W10 machine you have. That would actually be a good test since you know it used to crash on that very same machine under W7, correct?

  5. #5
    Join Date
    Sep 2009
    Posts
    755


    Did you find this post helpful? Yes | No

    Default Re: MicroCodeStudioPlus keeps crashing.

    So, i was correct. They only need to put one try catch, in subroutine that is called for each key press.
    And sooner or later it will show it self with detailed description in MSG box.
    I'm 99% sure, that is sometimes expecting next letter or previous to be typed, but it isn't there.
    Does anyone notice patter if this happens to specific command or randomly?
    It also can be helpful if you notice that it crash while typing in middle of word, or if typing new word.
    Eg if you type ADIN, and want to add letter C, in middle of word.
    Now we just need source code to correct that
    EDIT:
    I think, for .net application you can actually get line number where error occurred.

  6. #6


    Did you find this post helpful? Yes | No

    Default Re: MicroCodeStudioPlus keeps crashing.

    From my experience, it tends to crash more when typing remarks, but then again, I document to death, so that's probably not relevant. I have seen it crash when typing commands of any kind, and even when NOT typing, which leads me to believe that it's not necessarily driven by user / keyboard / mouse events. From my own Windows programming experience, it is reminiscent of an array dimension error where something is reading or writing outside its defined array space, out of bounds. I agree that an overall error trap with diagnostic codes within the program is something that seems sensible if the author is serious about trying to narrow this down. For Windows to display the error instead, it seems to bypass any useful internal error trapping within the program.

    I have never programmed in Delphi, so I'm not familiar with the nuances of arrays, memory allocation, or error trapping, and my thoughts may be off base in that regard.

    Picster

  7. #7
    Join Date
    Oct 2004
    Posts
    440


    Did you find this post helpful? Yes | No

    Default Re: MicroCodeStudioPlus keeps crashing.

    Quote Originally Posted by picster View Post
    ...I have never programmed in Delphi, so I'm not familiar with the nuances of arrays, memory allocation, or error trapping, and my thoughts may be off base in that regard.
    Picster
    I program with Delphi and access violations can occur (array overrun) for one. I use an add-on called madExcept as one of my debugging tools. Included in the crash report is usually the offending line number.

    Norm
    Last edited by Normnet; - 8th February 2018 at 23:36.

  8. #8
    Join Date
    Apr 2014
    Location
    OK
    Posts
    557


    Did you find this post helpful? Yes | No

    Default Re: MicroCodeStudioPlus keeps crashing.

    Quote Originally Posted by pedja089 View Post
    If I may add, to me, problem probably doesn't have anything with hardware, drivers, etc...
    A List index out of bauds(0) points to me, that some of list isn't initialized. I don't know how they triggering recognition of keywords, and auto correct etc.
    I think that error probably jump out while typing. So it needed to be specific combination, I think someone mention that error is related with typing comments.
    I don't know what programing language they use, but simple TRY ... CATCH should do a trick, or in VB on error resume next in every sub routine. That isn't a lot of work, but it can ignore error, or point to line of code where is happening.
    Anyway, that I use in my programs to prevent crashes, and when error do happen, user can send me print screen with detailed description in MSGBOX. Saved me lot of times...
    Do users get access to the program code? Try/Catch isn't something that would be found on the user's end of things.

  9. #9
    Join Date
    Sep 2009
    Posts
    755


    Did you find this post helpful? Yes | No

    Default Re: MicroCodeStudioPlus keeps crashing.

    No. Just when exception is catch, you can get detailed description about it. You can convert it to string, and then display in msgbox with some custom info. Eg I put name of subroutine, etc...
    This is VB .Net code:
    Code:
    Public Class Form1
    
        Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
            Dim i As Integer, x As Integer = 1, y As Integer = 0
            Try
                i = x / y
            Catch ex As Exception
                MsgBox(ex.ToString, MsgBoxStyle.Critical, "Button1")
            End Try
        End Sub
    End Class
    Result when I click on button:
    Name:  Untitled.png
Views: 1428
Size:  17.1 KB

    If they add something like this in MCS error should be located.
    Then they can just ignore it, or something, but main goal should be that all work is saved, before it crash.
    Eg they can just put few lines of code to create backup of all open files, to some location. Or to check on start up is there backup, and to ask user what to do, Restore from it, ignore, or what ever.
    Last edited by pedja089; - 11th February 2018 at 23:48.

  10. #10
    Join Date
    Oct 2004
    Posts
    440


    Did you find this post helpful? Yes | No

    Default Re: MicroCodeStudioPlus keeps crashing.

    Doesn't your exception notification only occur on a button1 click error meaning the try catch routine would need to be added throughout the possibly thousands of lines of IDE code. Could be done I guess but just saying.

  11. #11
    Join Date
    Sep 2009
    Posts
    755


    Did you find this post helpful? Yes | No

    Default Re: MicroCodeStudioPlus keeps crashing.

    No, yes, maybe It depends...
    It needed to be added only to events subroutine. Eg click, keypress, keydown, timer tick, etc... For MCS I think it is just few events for editor box(timer, keypress, keydown, keyup).
    If you call any subroutine or function, and error happens in function it will point to that function. So I can usually narrow down to single function. Then I usually menage to recreate that event, or if I can I'll add that error handler to that function, then make new exe, and wait for someone to report error.
    I usually put error handler while writing code.
    For some non critical stuff(changing txtbox color, formatting, preventing user to enter something wrong, etc) I just put "on error resume next". So it will just go over error, and probably with next char error should be gone, and formatted correctly.

  12. #12


    Did you find this post helpful? Yes | No

    Default Re: MicroCodeStudioPlus keeps crashing.

    Again, note that this is not always driven by user events. I've had mine "go off" when sitting idle... there is no discernable pattern, nor can it be reproduced at will.

    Hence an overall "on error" would probably help, just changing the defined popup or diagnostic message here and there within the code.

Similar Threads

  1. Micro Code Studio Crashing
    By timmers in forum mel PIC BASIC Pro
    Replies: 21
    Last Post: - 20th May 2017, 21:54
  2. Crashing 16F628 Code
    By hhaplant in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 24th March 2012, 10:40
  3. Crashing LCD
    By George in forum Off Topic
    Replies: 13
    Last Post: - 16th January 2012, 22:05
  4. pic program crashing
    By comwarrior in forum General
    Replies: 5
    Last Post: - 8th July 2009, 17:33
  5. Crashing program
    By Charles Linquis in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 6th April 2006, 03:57

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts