Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsFORTE terminate when pressing "Launch local FORTE"
https://www.eclipse.org/forums/index.php/mv/msg/1079252/1737828/#msg_1737828
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]]>Michele Citro2016-07-13T10:38:02-00:00Re: FORTE terminate when pressing "Launch local FORTE"
https://www.eclipse.org/forums/index.php/mv/msg/1079252/1737835/#msg_1737835
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]]>Jose Maria Jesus Cabral Lassalle2016-07-13T11:32:47-00:00Re: FORTE terminate when pressing "Launch local FORTE"
https://www.eclipse.org/forums/index.php/mv/msg/1079252/1737844/#msg_1737844
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
]]>Michele Citro2016-07-13T12:59:42-00:00Re: FORTE terminate when pressing "Launch local FORTE"
https://www.eclipse.org/forums/index.php/mv/msg/1079252/1737847/#msg_1737847
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.
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
]]>Jose Maria Jesus Cabral Lassalle2016-07-13T13:28:25-00:00Re: FORTE terminate when pressing "Launch local FORTE"
https://www.eclipse.org/forums/index.php/mv/msg/1079252/1737872/#msg_1737872
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]]>Michele Citro2016-07-13T16:17:50-00:00Re: FORTE terminate when pressing "Launch local FORTE"
https://www.eclipse.org/forums/index.php/mv/msg/1079252/1737873/#msg_1737873
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]]>Alois Zoitl2016-07-13T16:30:57-00:00Re: FORTE terminate when pressing "Launch local FORTE"
https://www.eclipse.org/forums/index.php/mv/msg/1079252/1737910/#msg_1737910
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
]]>Michele Citro2016-07-14T06:00:30-00:00Re: FORTE terminate when pressing "Launch local FORTE"
https://www.eclipse.org/forums/index.php/mv/msg/1079252/1737913/#msg_1737913
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]]>Alois Zoitl2016-07-14T06:51:24-00:00Re: FORTE terminate when pressing "Launch local FORTE"
https://www.eclipse.org/forums/index.php/mv/msg/1079252/1738013/#msg_1738013
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]]>Michele Citro2016-07-15T05:21:29-00:00Re: FORTE terminate when pressing "Launch local FORTE"
https://www.eclipse.org/forums/index.php/mv/msg/1079252/1738024/#msg_1738024
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]]>Jose Maria Jesus Cabral Lassalle2016-07-15T07:19:17-00:00Re: FORTE terminate when pressing "Launch local FORTE"
https://www.eclipse.org/forums/index.php/mv/msg/1079252/1738152/#msg_1738152
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
]]>Michele Citro2016-07-16T09:35:01-00:00Re: FORTE terminate when pressing "Launch local FORTE"
https://www.eclipse.org/forums/index.php/mv/msg/1079252/1738225/#msg_1738225
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]]>Kirill Dorofeev2016-07-18T09:18:06-00:00Re: FORTE terminate when pressing "Launch local FORTE"
https://www.eclipse.org/forums/index.php/mv/msg/1079252/1738233/#msg_1738233
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]]>Jose Maria Jesus Cabral Lassalle2016-07-18T10:15:18-00:00Re: FORTE terminate when pressing "Launch local FORTE"
https://www.eclipse.org/forums/index.php/mv/msg/1079252/1738297/#msg_1738297
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
]]>Alois Zoitl2016-07-18T18:49:19-00:00Re: FORTE terminate when pressing "Launch local FORTE"
https://www.eclipse.org/forums/index.php/mv/msg/1079252/1738350/#msg_1738350
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]]>Michele Citro2016-07-19T08:29:52-00:00Re: FORTE terminate when pressing "Launch local FORTE"
https://www.eclipse.org/forums/index.php/mv/msg/1079252/1738351/#msg_1738351
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]]>Michele Citro2016-07-19T08:51:36-00:00Re: FORTE terminate when pressing "Launch local FORTE"
https://www.eclipse.org/forums/index.php/mv/msg/1079252/1738363/#msg_1738363
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]]>Alois Zoitl2016-07-19T09:50:06-00:00Re: FORTE terminate when pressing "Launch local FORTE"
https://www.eclipse.org/forums/index.php/mv/msg/1079252/1738381/#msg_1738381
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]]>Jose Maria Jesus Cabral Lassalle2016-07-19T11:05:42-00:00Re: FORTE terminate when pressing "Launch local FORTE"
https://www.eclipse.org/forums/index.php/mv/msg/1079252/1738600/#msg_1738600
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.