Author Topic: Project crashed overnight  (Read 10882 times)

AabeckControls

  • Full Member
  • ***
  • Posts: 193
    • View Profile
Project crashed overnight
« on: July 11, 2015, 09:27:08 AM »
Yesterday my project was 90% completed, only one screen left to do, all others were working reliably.

This morning when I opened the solution I immediately got a bunch of errors. A lot of the errors went away after I deleted a couple of MessageListByValue entries, rebuilt, then added them back.

Now I get a lot of other errors when I rebuilt the project - and I didn't change anything other than the above Message List's.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Project crashed overnight
« Reply #1 on: July 11, 2015, 09:36:50 AM »
Can you send me your solution?

AabeckControls

  • Full Member
  • ***
  • Posts: 193
    • View Profile
Re: Project crashed overnight
« Reply #2 on: July 11, 2015, 11:07:10 AM »
I noticed FormChangeButton was not in my toolbox and all the buttons on every page was gone - but it was in the Solutions window so I went to Add/Existing the selected the FormChange in the original folder I extracted the download to, yes to overwrite & then rebuilt. Now I re-added the buttons & when I rebuilt & got a lot of FormChangeButton errors but also a list of 118 errors for every object on the page (BasicLabel, BasicIndicator, StackLight, PilotLight, MomentaryButton) as "either undeclared or never assigned."

Then I decided to delete the entire project folder & copy a backup I made last night. Then almost everything was OK. On forms 5 & 12 I got errors for MessageListByValue & all 3 entries on the pages had empty collections.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Project crashed overnight
« Reply #3 on: July 11, 2015, 11:19:15 AM »
I would need the complete solution. It will be 15-20Mb, so you would have to put it on an FTP or something like DropBox.

AabeckControls

  • Full Member
  • ***
  • Posts: 193
    • View Profile
Re: Project crashed overnight
« Reply #4 on: July 11, 2015, 11:46:56 AM »
Zipped it, it's 22MEG.

Had to delete & re insert the Message's, re-add the collections, then saved, rebuilt - all succeeded, no failed's. But when the page tried to re-open a lot of errors, with the collections being empty again - after I saved them when full (one had 52 entries).

Put on WeTransfer: http://we.tl/DWNi4y3ttg

AabeckControls

  • Full Member
  • ***
  • Posts: 193
    • View Profile
Re: Project crashed overnight
« Reply #5 on: July 11, 2015, 12:41:42 PM »
Just re-entered both the list collections on Form5, saved, did NOT do a rebuild to cause any problems until this is resolved, opened Form 7 to do the collection there, got a lot of errors, then when I tried to go back to Form5 to copy the list - again I got a bunch of errors & the just-saved collections were now empty again.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Project crashed overnight
« Reply #6 on: July 11, 2015, 12:43:18 PM »
I downloaded and extracted the solution, opened it is VS, then immediately did a Build without changing anything and it did not give me any errors. I then opened every form and still no errors.

Before closing Visual Studio, try closing all the Design Views of your forms. If you have a design view open, and there is a problem with the controls, then it will generate similar errors. Do the same thing before performing a Rebuild All. The Rebuild All will delete all of the controls before regenerating them. If a form is open during this process, then it will generate errors also. This is just a caveat of having the controls in open source form.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Project crashed overnight
« Reply #7 on: July 11, 2015, 12:48:51 PM »
To keep from having to re-enter all of the messages, you can use an INI file.

- Right Click the AdvancedHMI project in Solution Explorer and Select Add New Item
- Add a text file
- In that text file, list your messages in this format:
Code: [Select]
1, My message 1
2, The second message
3, The next for 3
- Click on your text file once in Solution Explorer to select it
- In the Properties Window, change CopyToOutputDirectory to CopyIfNewer
- Now Select your MessageDisplayByValue
- In the Properties Window, set INIFileName to the name of the text file you added above

AabeckControls

  • Full Member
  • ***
  • Posts: 193
    • View Profile
Re: Project crashed overnight
« Reply #8 on: July 11, 2015, 02:13:42 PM »
Re-entered everything, closed all windows, did a rebuild with no errors, but when I tried to reopen any of the pages with a MessageList on them (all others opened fine) it error'd & the collection was again empty. Entered just 2 items in a collection, saved, closed the window, rebuilt, re-opened with errors & empty collections. Re-entered 2 more lines (also - now instead of starting a line 0 it starts at line 154, so obviously the collection is occupied somewhere), saved, copied the object, went to another screen & pasted it, but it pasted with an empty collection. Went back to the  other page with the object & it's collection was now empty. Tried this without saving or rebuilding & the collections were always empty when re-opened.

AabeckControls

  • Full Member
  • ***
  • Posts: 193
    • View Profile
Re: Project crashed overnight
« Reply #9 on: July 11, 2015, 02:24:47 PM »
It's working better now, I saved the whole project w/out any message lists, then closed the solution, then closed Visual Basic. When I reopened the solution I was able to keep the entries in the message lists between windows & after closing & re-opening them. Now going to try the text file option for the message lists.

AabeckControls

  • Full Member
  • ***
  • Posts: 193
    • View Profile
Re: Project crashed overnight
« Reply #10 on: July 11, 2015, 03:05:13 PM »
Tried the .txt file method, even tried the full path & name, but get an empty collection, even after rebuild successfully with all windows closed. When reopen it shows message 0 empty, still shows the .txt file as ini, when I start debugging it everything else works (project is complete except for this one list on 2 screens) but the list shows as:

AabeckControls

  • Full Member
  • ***
  • Posts: 193
    • View Profile
Re: Project crashed overnight
« Reply #11 on: July 11, 2015, 03:12:22 PM »
Am I doing this right? It seems to want a line 0, do I need to make it:

1 0 Error
2 1 Begin ... ?

When debugging the PLC is set to value 1 which should state "Begin"

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Project crashed overnight
« Reply #12 on: July 11, 2015, 03:15:30 PM »
It needs to be comma separated and without spaces:

1,Error
2,Begin....
3,Next message

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: Project crashed overnight
« Reply #13 on: July 11, 2015, 03:19:25 PM »
Attached is a sample INI file from a project I recently did

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: Project crashed overnight
« Reply #14 on: July 11, 2015, 06:30:23 PM »
I just tried your solution and it works fine on my computer.

I only made 1 small change: give MainForm name "MainForm" instead of "k" as it was showing.

Also, I had to disable subscriptions for all DF1Com1 drivers so I could go from form to form without delay (used OpcDaCom1 driver to assign values to MessageByValue components).

Collections on forms 5, 7 and 12 still show all messages and when a value is assigned it does show that particular message.

You have 2 MessageByValue controls, 1 and 3, on top of each other on Form12 "Hoist".

Form11 "Outputs" has 2 instances of DF1Com driver.

Not all your forms have "Home" button to return to the MainForm, only closing this form would end program properly while closing any other form would still leave program running in Debug mode (might be behaving differently with your setup). <-- Edit: Just noticed that "Home" button is there but AutoScroll property is not enabled on all forms.

My suggestion to you is: create a small test project from scratch and test your computer.
« Last Edit: July 11, 2015, 07:19:04 PM by Godra »