Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » 4DIAC - Framework for Distributed Industrial Automation and Control » FORTE terminate when pressing "Launch local FORTE"(Error when launching FORTE)
FORTE terminate when pressing "Launch local FORTE" [message #1737828] Wed, 13 July 2016 10:38 Go to next message
Michele Citro is currently offline Michele CitroFriend
Messages: 29
Registered: June 2016
Junior Member
Good morning,

I'm using the environment 4DIAC for 3 months.
I'm developping an application for an automatic warehouse.

Today, after some day of normal use, in deployment of application FORTE ends as soon as I press the botton "Launch local forte". While FBRT work correctly.

I create forte.exe with Visual Studio Express, and it's in the correct folder /bin/win32/src/Release

I tried to unistall and install both FORTE then 4DIAC, but the problem persists.

What could be the problem?
Thank you.

Best regards,
Michele CItro
Re: FORTE terminate when pressing "Launch local FORTE" [message #1737835 is a reply to message #1737828] Wed, 13 July 2016 11:32 Go to previous messageGo to next message
Jose Maria Jesus Cabral Lassalle is currently offline Jose Maria Jesus Cabral LassalleFriend
Messages: 199
Registered: February 2016
Senior Member
Hi,

at which commit of the FORTE repository are you when compiling it? Which version of Windows and 4DIAC are you running? Does only FORTE terminates or does it also 4DIAC? Did you compile FORTE with own developed Function Blocks?

Regards,

Jose Cabral
Re: FORTE terminate when pressing "Launch local FORTE" [message #1737844 is a reply to message #1737835] Wed, 13 July 2016 12:59 Go to previous messageGo to next message
Michele Citro is currently offline Michele CitroFriend
Messages: 29
Registered: June 2016
Junior Member
Hi Jose,
thank you for the answer.

I hope to reply to your questions correclty.
Then,
1. I don't understand. What do you mean?

2. I use S.O. Windows 7 and 4DIAC 1.8M1

3. Only FORTE terminates, while FBRT and the environment (4DIAC) will be active without errors on display.

4. Yes, I'm compiling FORTE with my personal FB. If I use default forte.exe (in folder ../runtime/FORTE/1.8M1/) it works. Instead, this behavior appears with my forte.exe, also if in Visual Studio I don't see errors.

The attachement shows this behavior.

Best regards,
Michele Citro
Re: FORTE terminate when pressing "Launch local FORTE" [message #1737847 is a reply to message #1737844] Wed, 13 July 2016 13:28 Go to previous messageGo to next message
Jose Maria Jesus Cabral Lassalle is currently offline Jose Maria Jesus Cabral LassalleFriend
Messages: 199
Registered: February 2016
Senior Member
Hi,

regarding question 1, I meant which state of the git repository of FORTE (since it is updated constantly), but I see now that there FORTE source in differente versions to be downloaded.

Let me suggest to download the las version of FORTE (RC2) here http://www.eclipse.org/4diac/en_dow.php and try again.

If this doesn't solve, there's a newer version of 4DIAC too (RC2). Maybe the problem is the exportation to C++ files. Try the new version of 4DIAC with the new version of FORTE.

If the problem persists, it should be something in the FB that is not correct, and it's not beeing detected.

Regards,

Jose Cabral
Re: FORTE terminate when pressing "Launch local FORTE" [message #1737872 is a reply to message #1737847] Wed, 13 July 2016 16:17 Go to previous messageGo to next message
Michele Citro is currently offline Michele CitroFriend
Messages: 29
Registered: June 2016
Junior Member
Hi,

thank you for the possible solutions.
I will try soon.

At the same time, I show you the screen of Visual Studio after compiling FORTE.
Maybe, it can be helpful.

Regards,
Michele Citro
Re: FORTE terminate when pressing "Launch local FORTE" [message #1737873 is a reply to message #1737872] Wed, 13 July 2016 16:30 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1560
Registered: January 2014
Senior Member

Hi,

reading the comments so far it seems to be one of your own FBs. Have you edited manually the cpp code? Does your FORTE crash always in the same stage of the download? Could you run a debug version of FORTE in VS. Withthat we may get a hint from the VS debugger where the problem is.

Thanks,
Alois
Re: FORTE terminate when pressing "Launch local FORTE" [message #1737910 is a reply to message #1737873] Thu, 14 July 2016 06:00 Go to previous messageGo to next message
Michele Citro is currently offline Michele CitroFriend
Messages: 29
Registered: June 2016
Junior Member
Good morning,

no, I don't remember to have edited manually the cpp code. But I will verify this possibility.
At the same time, FORTE crash already of the download before, when I push button "Launch local FORTE". Next, pushing the button Download, there is the right problem of connection refused.

Using the new version of FORTE (RC2), I have the same problem, the same exactly.
But, I haven't tried yet with the new version of 4DIAC.

Thank you all,
Michele CItro
Re: FORTE terminate when pressing "Launch local FORTE" [message #1737913 is a reply to message #1737910] Thu, 14 July 2016 06:51 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1560
Registered: January 2014
Senior Member

Hi,

In this case it would be extremely interesting to not use "Launch local FORTE" button but run FORTE directly with VS so that the debugger can kick in and tell us whats going on here.

Alois
Re: FORTE terminate when pressing "Launch local FORTE" [message #1738013 is a reply to message #1737913] Fri, 15 July 2016 05:21 Go to previous messageGo to next message
Michele Citro is currently offline Michele CitroFriend
Messages: 29
Registered: June 2016
Junior Member
Hi Alois,

what I can do this?
I never did it directly with VS.

At the same time, I found the FB that causes the problem.
I have substitued now with its original version (this FB is interface with the warehouse, then it isn't modified after its creation), but there is the problem yet.

Thank you so much.

Regards,
Michele Citro

[Updated on: Fri, 15 July 2016 05:36]

Report message to a moderator

Re: FORTE terminate when pressing "Launch local FORTE" [message #1738024 is a reply to message #1738013] Fri, 15 July 2016 07:19 Go to previous messageGo to next message
Jose Maria Jesus Cabral Lassalle is currently offline Jose Maria Jesus Cabral LassalleFriend
Messages: 199
Registered: February 2016
Senior Member
Hi,

1 - You need first to set VS to Debug mode

2- Then, you must put a breakpoint clicking on the gray column next to the point where you want the program to stop when it arrives. I'd recommend to put on the FB where you think the problem is.

3 - Click on the bar Debug->Start Debugging F5

The program should run and stop where you put the breakpoint. If it doesn't stop the problem is before that, and it can't get to that point.

Look at the picture for a better understanding, try the debugging and see if you find where the problem might be.

Regards,

Jose Cabral
Re: FORTE terminate when pressing "Launch local FORTE" [message #1738152 is a reply to message #1738024] Sat, 16 July 2016 09:35 Go to previous messageGo to next message
Michele Citro is currently offline Michele CitroFriend
Messages: 29
Registered: June 2016
Junior Member
Hi,

thank you for the precise directions.
I reapeted it several times, but the process ends without errors.

Summarizing, I found the FB that causes error. It doesn't cause error during VS compiling but causes <terminate> in 4DIAC, next the pressure of button "Launch local FORTE".
What I can do yet?

In attachement, I upload the FB in question with its code (.cpp e .h).
I would be grateful if you could try it in a project.

Thank you so much,
Michele Citro

  • Attachment: FB.rar
    (Size: 8.82KB, Downloaded 126 times)
Re: FORTE terminate when pressing "Launch local FORTE" [message #1738225 is a reply to message #1738152] Mon, 18 July 2016 09:18 Go to previous messageGo to next message
Kirill Dorofeev is currently offline Kirill DorofeevFriend
Messages: 70
Registered: February 2016
Member
Hi Michele,

your FB cpp code looks like it was edited manually after exporting FB from 4diac. For example, in your fbt file both INIT and REQ algorithms are empty, whereas in cpp alg_INIT is non-empty. I exported your FB, compiled forte and it runs smoothly. See attached generated cpp and h files. So the problem is probably somewhere in your code, you've added.

Best regards,
Kirill
Re: FORTE terminate when pressing "Launch local FORTE" [message #1738233 is a reply to message #1738152] Mon, 18 July 2016 10:15 Go to previous messageGo to next message
Jose Maria Jesus Cabral Lassalle is currently offline Jose Maria Jesus Cabral LassalleFriend
Messages: 199
Registered: February 2016
Senior Member
Hi, I checked your code.

1. I noted that you wrote your own code in FB. Did you export the FB using 4DIAC and then wrote your implementation?
2. I noticed also that in your FB you use functions of a library of cifX, I suppose is related to a special communciation card in your computer, right?
Regarding this, normally you don't use Basic Functional Blocks for communication matter, but the Services Functional Block. This is related to the 61499 standard (Alois could tell better which rules are being broken or not), but in any case, FORTE shouldn't terminate because of that.

Since I don't have the library, I couldn't test your situation properly. What I did was to replace all the calls to your specific library with dummies implementation that do nothing. I compiled and ran FORTE and it didn't terminate.

Now, going back to debugging. Could you give more details of where exactly did you put your breakpoint? If you put it where the image above shows, the program should stop there. Did it stop there or terminated before even getting there?

Regards,

Jose Cabral
Re: FORTE terminate when pressing "Launch local FORTE" [message #1738297 is a reply to message #1738233] Mon, 18 July 2016 18:49 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1560
Registered: January 2014
Senior Member

Hi,

Using the skeleton of a basic fB for implementing a service interface function block can be a good option for application triggered function blocks. So this is definitely not the cause of the issue. What could be is that the dll needed for this FB can not be loaded at startup time and therefore the program is exited.

I also noted that you are using FORTE_TRACE for generating debug output. Please don't do that. FORTE_TRACE is for tracing events and deactivated per default. Better use one of the DEVLOG defines. But here you also need to ensure that the according log level is activated so that you will see any output.

Cheers,
Alois
Re: FORTE terminate when pressing "Launch local FORTE" [message #1738350 is a reply to message #1738225] Tue, 19 July 2016 08:29 Go to previous messageGo to next message
Michele Citro is currently offline Michele CitroFriend
Messages: 29
Registered: June 2016
Junior Member
Kirill Dorofeev wrote on Mon, 18 July 2016 09:18
Hi Michele,

your FB cpp code looks like it was edited manually after exporting FB from 4diac. For example, in your fbt file both INIT and REQ algorithms are empty, whereas in cpp alg_INIT is non-empty. I exported your FB, compiled forte and it runs smoothly. See attached generated cpp and h files. So the problem is probably somewhere in your code, you've added.

Best regards,
Kirill


Hi Kirill,

thank you for the answer.
Yes, the FB it was edited manually after exporting FB from 4diac.
It worked always, but no now.

I know that the problem is in my own code,but I don't understand where.

Best regards,
Michele
Re: FORTE terminate when pressing "Launch local FORTE" [message #1738351 is a reply to message #1738233] Tue, 19 July 2016 08:51 Go to previous messageGo to next message
Michele Citro is currently offline Michele CitroFriend
Messages: 29
Registered: June 2016
Junior Member
Jose Maria Jesus Cabral Lassalle wrote on Mon, 18 July 2016 10:15
Hi, I checked your code.

1. I noted that you wrote your own code in FB. Did you export the FB using 4DIAC and then wrote your implementation?
2. I noticed also that in your FB you use functions of a library of cifX, I suppose is related to a special communciation card in your computer, right?
Regarding this, normally you don't use Basic Functional Blocks for communication matter, but the Services Functional Block. This is related to the 61499 standard (Alois could tell better which rules are being broken or not), but in any case, FORTE shouldn't terminate because of that.

Since I don't have the library, I couldn't test your situation properly. What I did was to replace all the calls to your specific library with dummies implementation that do nothing. I compiled and ran FORTE and it didn't terminate.

Now, going back to debugging. Could you give more details of where exactly did you put your breakpoint? If you put it where the image above shows, the program should stop there. Did it stop there or terminated before even getting there?

Regards,

Jose Cabral


Hi,
thank you for the answer.

I ask to you questions,

1. Yes, it's correct. But I remember that I putted them(.cpp and .h) in my directory without export. This because, I didn't write the code, but I received it for start the project. So, I don't know much about it.

2. Right, cifX allows me to comunicate with automation warehouse althrought through the computer.

Instead, going back to debugging,
I attach the result.
I have selected the debug mode, put the breakpoint in my .cpp, but the debug don't stop there, but it push ahead and it do a final error (seems after the compile).

Thank you so much.

Best regards,
Michele
Re: FORTE terminate when pressing "Launch local FORTE" [message #1738363 is a reply to message #1738351] Tue, 19 July 2016 09:50 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1560
Registered: January 2014
Senior Member

Hi,

for starting it would be good to see if you could place the breakpoint at the beginning of main() which you can find in the file src/arch/win32/main.cpp. The best place would be line 88 or so and then check if the function createDev is called and that the function does not immediately terminate. This function is only left when forte is shut down.

BR,
Alois
Re: FORTE terminate when pressing "Launch local FORTE" [message #1738381 is a reply to message #1738363] Tue, 19 July 2016 11:05 Go to previous messageGo to next message
Jose Maria Jesus Cabral Lassalle is currently offline Jose Maria Jesus Cabral LassalleFriend
Messages: 199
Registered: February 2016
Senior Member
HI,

the first thing to do is to put a breakpoint in the main() as Alois said.

Another thing I noted from the picture you posted is that you are trying to open the ALL_BUILD in Visual Studio. I'm not sure exactly how VS manages this, but the error you get seems to be because is not openning the right forte.exe file. Try debugging like is shown in the picture in this message.

I got the cifX libraries, compiled with the lib file, and FORTE runs correctly.

Regards,

Jose Cabral
  • Attachment: debug.png
    (Size: 36.27KB, Downloaded 125 times)
Re: FORTE terminate when pressing "Launch local FORTE" [message #1738600 is a reply to message #1738381] Thu, 21 July 2016 08:55 Go to previous message
Michele Citro is currently offline Michele CitroFriend
Messages: 29
Registered: June 2016
Junior Member
Hi,
thank you both.

I did some experiments, how you suggested.
In particular, I debbugged how told here:

Jose Maria Jesus Cabral Lassalle wrote on Tue, 19 July 2016 11:05

I'm not sure exactly how VS manages this, but the error you get seems to be because is not openning the right forte.exe file. Try debugging like is shown in the picture in this message.


In this way, VS indicated un error in a .dll that I use (cifX).
So, I have re-installed cifX driver and it works.

Thank you to help me to try the problem.
Thank you really.

Regards,
Michele Citro
Previous Topic:flip-flop tutorial: No RMT_DEV available in 4DIAC IDE
Next Topic:Basic FB as Event Source
Goto Forum:
  


Current Time: Thu Mar 28 09:32:19 GMT 2024

Powered by FUDForum. Page generated in 0.04551 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top