Author Topic: Mc-studio is seriously unstable!  (Read 177 times)

ashesman

  • Newbie
  • *
  • Posts: 12
    • View Profile
Mc-studio is seriously unstable!
« on: February 14, 2017, 03:46:46 pm »
Hi,

Sorry to make my first post a complaint!  What are the plans to improve mc-studio?  At the moment it is destroying my budget due to constantly crashing in many different ways!  Is there a new release or beta version available that may fix even some of these?

Here are some of the crashes I have seen so far:

- Access violation on opening a project
- "Cant read data from device" when stepping through the code.  Then need to restart debugging.
- If a crash happens during debugging while the device (mod120) was stopped at a break point it becomes useless and has to be power cycled.
- Turn power off to mod120 and ms-studio crasheswith a "mcSript has stopped working" windows message.
- Sometimes when trying to run I get a "Restart failed" message.
- Sometimes when trying to run code that has not changed since last time I debugged it I get "Can't set breakpoints"
- Sometimes when stopping debugging I get "Stop debugging failed"

I dont think these issues are related to connection problem or wireless issues, or my code!  All the other devices we have are talking nicely and I can always connect to the mod120 in the Devices screen, it is never not there.

Honestly I cannot use this IDE for longer than five minutes without one kind of crash or another!

Also, please please please implement find functionality!

Sorry!

Ashley
« Last Edit: February 14, 2017, 04:59:37 pm by ashesman »

Social Buttons


mc-John

  • Global Moderator
  • Full Member
  • *****
  • Posts: 212
    • View Profile
Re: Mc-studio is seriously unstable!
« Reply #1 on: February 14, 2017, 05:35:27 pm »
We are working on mcStudio to get it better and more stable.

One of the things that is very annoying is that the old virtual device, used for debugging, is still active and is not working correctly. You should not use the virtual device. Arithmetic operations problems like dividing by zero and overflow is related to that. The reason that the virtual device is still there is that it is a lot of work to remove it, but it will be removed in the next version.

The problem with the logging file occurs when you try to open mcStudio twice. This can be by choice or because a previous error occurred that left mcStudio running in the background. I this happens please go to task manager and kill the process.

Quote
- If a crash happens during debugging while the device (mod120) was stopped at a break point it becomes useless and has to be power cycled.
I have never seen that error so I will add it to the list.

Quote
- Sometimes when trying to run I get a "Restart failed" message.
- Sometimes when trying to run code that has not changed since last time I debugged it I get "Can't set breakpoints"
- Sometimes when stopping debugging I get "Stop debugging failed"
All those cases are related to losing the connection. If the module is close to the gateway this means in almost all cases that the module resets. The most common cause is running out of memory. If that happens the module will reset.  Don't forget the modules have very limited resources and cannot handle every problem.

Quote
Also, please please please implement find functionality!
I suppose you mean Find in Documents Ctrl+F is not implemented. Most people use the Find: in the toolbar. It colors the text and with F3 and Shift-F3 you can navigate. See attachment. There "st" is typed into the Find box and all text containing st is highlighted. With mach case and Whole word you can control the type of searching.

Also in the script manual is a complete list of the short cuts if you want to use them.


ashesman

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Mc-studio is seriously unstable!
« Reply #2 on: February 14, 2017, 06:12:11 pm »
Also, File Save As does not seem to work correctly.  The file is saved but the current file name does not update and then code editing area just ends up blank.

If you move a projects file system location you get the first error shown below.  After that you are screwed as every time you try open mc-studio it tries to reopen the project from the new location and crashes!  Now I cant open mc-studio at all!!!
« Last Edit: February 14, 2017, 06:17:17 pm by ashesman »

ashesman

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Mc-studio is seriously unstable!
« Reply #3 on: February 14, 2017, 07:36:41 pm »
More problems: 

If I try open a project I get the exception attached.  If I go into the project and change the %20 used for the space in the file name to an actual space the project will open fine.  Unfortunately every time the project file is saved it returns to the same problem.

<?xml version="1.0" encoding="utf-8"?>
<ProjectSetting xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <ProjectName>CLH Scales</ProjectName>
  <DeviceType>mcMod120</DeviceType>
  <LastDocumentName>CLH%20Scales.mcScript</LastDocumentName>
  <DocumentSettings>
    <DocumentSetting>
      <Name>CLH HX711 Weight</Name>
      <FileSpec>CLH%20Scales.mcScript</FileSpec>
      <Row>11</Row>
      <Col>17</Col>
      <BreakPointLineNumbers />
    </DocumentSetting>
  </DocumentSettings>
  <ManualCompile>false</ManualCompile>
</ProjectSetting>

ashesman

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Mc-studio is seriously unstable!
« Reply #4 on: February 14, 2017, 09:25:26 pm »
Also, if stop debugging fails, which it often does, then you can never get back to editing code.  It stays in debug mode forever as every time you click stop it fails...  There seems to be no timeout or forcing back to editing mode.  Only way out is to shut mc-studio and restart (after editing your project file as per my previous post).

Edit:  I did however notice that if you click run it will say run failed and then go back to editing mode!

ashesman

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Mc-studio is seriously unstable!
« Reply #5 on: February 14, 2017, 09:30:27 pm »
And another one for you after clicking run after successfully connecting to my real device in the device window.  Seems to still think it is using a virtual device.  (see attached)

Why does it default back to the virtual device when it loses your real device.  How confusing and misleading!

mc-John

  • Global Moderator
  • Full Member
  • *****
  • Posts: 212
    • View Profile
Re: Mc-studio is seriously unstable!
« Reply #6 on: February 14, 2017, 09:36:10 pm »
I found in source control that I solved that problem. And yes %20 is translated to a single space.
The error in the attachment indicates that it searches for the file with %2520. I googled the problem and it is the result for a uri translation. It needs to translate twice to get into this situation.

I will look into the problem and will add code to replace the characters and all other exception, because there are more characters like  + _& etc.

ashesman

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Mc-studio is seriously unstable!
« Reply #7 on: February 14, 2017, 09:36:27 pm »
After freshly starting mc-studio, then connecting to my device.  I got the attached error.  I have been debugging on this device for an hour now and just saw this for the first time...

mc-John

  • Global Moderator
  • Full Member
  • *****
  • Posts: 212
    • View Profile
Re: Mc-studio is seriously unstable!
« Reply #8 on: February 14, 2017, 10:05:56 pm »
Quote
Why does it default back to the virtual device when it loses your real device. 
I know that it is a problem as described in my previous answer. See below
Quote
The reason that the virtual device is still there is that it is a lot of work to remove it, but it will be removed in the next version.

Quote
It stays in debug mode forever as every time you click stop it fails...
Because mcStudio does not know in what state it is. There is a timeout of 5 seconds if a function fails but the mode does not change

Quote
I have been debugging on this device for an hour now and just saw this for the first time...
In almost all cases this means that the device is not reacting. Loading code is retried 5 times per 128 bytes.
I don't know why it is doing that but it could be that the spectrum is very full or jammed.




ashesman

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Mc-studio is seriously unstable!
« Reply #9 on: February 14, 2017, 10:08:04 pm »
I dot think RF problems.  We have many of these running now and they work fine once they are programmed.  Also, restarting mc-studio always fixes the problem so probably not RF related...

mc-John

  • Global Moderator
  • Full Member
  • *****
  • Posts: 212
    • View Profile
Re: Mc-studio is seriously unstable!
« Reply #10 on: February 14, 2017, 10:47:44 pm »
Some information about the space problem.

I knew that I solved the problem with the space because it was in source control. It is now a different problem because spaces (and %20) are now translated to %2520 as you showed in the attachment. I really wanted to find the problem and after googling for an hour I found the problem. Previous versions of mcStudio are build on .Net framework version V4.0. The last version is build against a higher .Net version and the URI functions that are used are changed. See https://msdn.microsoft.com/en-us/library/hh367887(v=vs.110).aspx

Very tricky, anyway I will have it solved in the next version. For now just remove the space form the filename and it will work fine.



Bartw

  • Newbie
  • *
  • Posts: 29
    • View Profile
Re: Mc-studio is seriously unstable!
« Reply #11 on: February 15, 2017, 05:01:35 am »
I often get this crash when i am trying to connect to a Mc205


mc-John

  • Global Moderator
  • Full Member
  • *****
  • Posts: 212
    • View Profile
Re: Mc-studio is seriously unstable!
« Reply #12 on: February 15, 2017, 10:15:29 am »
Are you using a windows on a Mac or a Windows PC?

ashesman

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: Mc-studio is seriously unstable!
« Reply #13 on: February 15, 2017, 01:11:56 pm »
Windows PC (and so is Bartw).  Running Windows 10.

mc-John

  • Global Moderator
  • Full Member
  • *****
  • Posts: 212
    • View Profile
Re: Mc-studio is seriously unstable!
« Reply #14 on: February 16, 2017, 01:01:16 am »
Thanks. The Macs have a lot of issues with the FTDI drivers, that's why I asked.

I can only recreate this by removing the USB cable when writing. The driver just returns a FT_IO_ERROR. Looked into the FTDI documentation and that is not very clear. I have seen this problem in the past when there are ground loops. I worked for a company that has bought an opto-isolated USB hub to solve a number of disconnecting problems with devices with FTDI chips. That helped a lot. Also look at the quality of the cable, some cheap cables are not copper but iron with a copper  layer. (Test with a magnet)

It difficult to find that problem from here because I don't have any idea what this can be. Best thing do is check for ground loops and connect the device direct to the computer without a hub, so the quality of the hub is removed from the equation.

Sorry that I can give you a more clear answer.