steveneads Posted December 1, 2017 Share Posted December 1, 2017 Hi I've recently started to experience code down-loading failing with the message "Download process failed with a segmentation fault" (465 board). I have now updated to IDE version 2.2.1.25 (PPMAC firmware is 2.1.1.3), but the problem persists. If I repeat the download it's often OK the second time. What's going wrong? Another colleague is also having the same problem. I've attached a copy of the messages given by the IDE during compiling and downloading. Thanks Stevedownload error.txt Link to comment Share on other sites More sharing options...
bradp Posted December 4, 2017 Share Posted December 4, 2017 Just for a test can you make sure all C-programs (cplc, capps, usercode) and script PLC programs are stopped before you download. And make sure nothing is started automatically during download. This would include setting the useraldo.cfunc=1 if you are doing this. Link to comment Share on other sites More sharing options...
Clopedandle Posted December 4, 2017 Share Posted December 4, 2017 I noticed this happened a ton when I had a large number of "send" commands in Script PLCs. You could try commenting those out if you have any to see if it helps. I never did get a solution from Tech Support on that, come to think of it. Link to comment Share on other sites More sharing options...
steveneads Posted December 5, 2017 Author Share Posted December 5, 2017 Hi Brad Currently my pp_startup.txt contains: UserAlgo.CFunc=1; enable plc 1; I will try removing UserAlgo.CFunc=1 from pp_startup.txt, adding a 2 second delay at the start of PLC 1 and then set UserAlgo.CFunc=1 in this plc, to delay these actions. Is this what you had in mind? I'll see whether this helps. Steve Link to comment Share on other sites More sharing options...
bradp Posted December 5, 2017 Share Posted December 5, 2017 You do not need to add it to your PLC. For download testing just remove both of these from the pp_startup. Then if you can download several times with no problem we can assume the starting of these features is making the download problem. Also make sure UserAlgo,CFunc=0 before you do any downloading. Link to comment Share on other sites More sharing options...
steveneads Posted December 12, 2017 Author Share Posted December 12, 2017 Hi Brad I'm still getting this fault - but it doesn't happen all the time. I have just had it again after being very careful to make sure that nothing I could think of was running. Firstly I set UserAlgo.CFunc=0, then using the task manager I made sure that all PLCs and C applications were stopped. I then did a build and download which generated the segmentation error (attached). Finally I checked that UserAlgo.CFunc was still zero and that nothing was running. This was the case. What can be generating the error? It seems to me that there's a problem in the download process. Is it because we have a large project? It seems that our problems have recently appeared with a sizeable amount of C application code being added. We need some help here! Stevedownload error 2.txt Link to comment Share on other sites More sharing options...
bradp Posted December 12, 2017 Share Posted December 12, 2017 At this point I think the next step is to get your project and try to duplicate the problem here. Please contact fmacaluso@deltatau.ch. He will of course ask some questions to come up to speed and will want the project to start testing and trying to duplicate. Link to comment Share on other sites More sharing options...
george.kontogiorgos Posted June 8, 2020 Share Posted June 8, 2020 Hi all! I observed the same problem (segmentation fault) and I am suspecting that my large lines on one of my PLCs are causing the problem. Even if I comment them, the segmentation fault occurs, and, if I remove them, the segmetation fault disappear. Any suggestions about what could I do to solve the problem? I would like to know if compilation does not support large lines of code and if there is a way to download the programs without breaking the calculation in other small pieces. Thanks! Link to comment Share on other sites More sharing options...
Omron Forums Support Posted June 11, 2020 Share Posted June 11, 2020 George, Are you encrypting your project? What IDE and firmware version are you using? Can you paste in an example line that causes a segmentation fault even when commented? Link to comment Share on other sites More sharing options...
george.kontogiorgos Posted June 12, 2020 Share Posted June 12, 2020 What IDE and firmware version are you using? IDE: 4.3.2.19 firmware: 2.5.4.0 Are you encrypting your project? I do not know how to see it, could you please show me? Maybe done by this: Sys.WpKey = $AAAAAAAA? I put this just on one pmh file... All files must contain it? Can you paste in an example line that causes a segmentation fault even when commented? Sure, there are two screenshots showing the problem, one of my plc with large lines (which causes segmentation fault even commented) and the other show the output of the error. The example line (there are many as you can see on screenshot): P76=7.9992320737209082e-10*P62/(sqrt(0.0018178205616991184*pow(1.2476547842401508e-5*P60 + 3.7523452157598445e-5*P61 - P65, 2) + 1)*sqrt(0.0010528003526296867*pow(1.4283513097072426e-5*P60 + 3.5716486902927524e-5*P61 - P65, 2) + 1)) + 0.00050000000000000001*P62*(-5.3709337312250722e-13*P60 - 1.3430231271822752e-12*P61 + 3.7602330006095687e-8*P65)*(5.3194893290244149e-7*P60 + 1.5998464147441817e-6*P61 - 0.042635906952932505*P65)/(sqrt(0.0018178205616991184*pow(1.2476547842401508e-5*P60 + 3.7523452157598445e-5*P61 - P65, 2) + 1)*pow(0.0010528003526296867*pow(1.4283513097072426e-5*P60 + 3.5716486902927524e-5*P61 - P65, 2) + 1, 3.0/2.0)) + 0.00050000000000000001*P62*(-8.5103659313096439e-13*P60 - 2.5595085507698126e-12*P61 + 6.8210902878015602e-8*P65)*(5.3194893290244149e-7*P60 + 1.5998464147441817e-6*P61 - 0.042635906952932505*P65)/(pow(0.0018178205616991184*pow(1.2476547842401508e-5*P60 + 3.7523452157598445e-5*P61 - P65, 2) + 1, 3.0/2.0)*sqrt(0.0010528003526296867*pow(1.4283513097072426e-5*P60 + 3.5716486902927524e-5*P61 - P65, 2) + 1)) - 6.5106109364062736e-13*P64*(0.00049450793067729688*P63 - 172.09999999999999)/(sqrt(3.1561671506122976e-13*pow(P64, 2) + 1)*sqrt(0.0010528003526296867*pow(1.4283513097072426e-5*P60 + 3.5716486902927524e-5*P61 - P65, 2) + 1)) - 5.6179775280898885e-7*P64*(0.00049450793067729688*P63 - 172.09999999999999)*(-5.3709337312250722e-13*P60 - 1.3430231271822752e-12*P61 + 3.7602330006095687e-8*P65)*(4.6345550827120609e-7*P60 + 1.1588887466803166e-6*P61 - 0.032446885099030487*P65)/(sqrt(3.1561671506122976e-13*pow(P64, 2) + 1)*pow(0.0010528003526296867*pow(1.4283513097072426e-5*P60 + 3.5716486902927524e-5*P61 - P65, 2) + 1, 3.0/2.0)) + (629.10000000000002 - 7.3904712280461367e-5*P63)*(-5.3709337312250722e-13*P60 - 1.3430231271822752e-12*P61 + 3.7602330006095687e-8*P65)/(sqrt(0.0018178205616991184*pow(1.2476547842401508e-5*P60 + 3.7523452157598445e-5*P61 - P65, 2) + 1)*pow(0.0010528003526296867*pow(1.4283513097072426e-5*P60 + 3.5716486902927524e-5*P61 - P65, 2) + 1, 3.0/2.0)) + (629.10000000000002 - 7.3904712280461367e-5*P63)*(-8.5103659313096439e-13*P60 - 2.5595085507698126e-12*P61 + 6.8210902878015602e-8*P65)/(pow(0.0018178205616991184*pow(1.2476547842401508e-5*P60 + 3.7523452157598445e-5*P61 - P65, 2) + 1, 3.0/2.0)*sqrt(0.0010528003526296867*pow(1.4283513097072426e-5*P60 + 3.5716486902927524e-5*P61 - P65, 2) + 1)) + 1.5998464147441817e-6*(0.00049450793067729688*P63 - 172.09999999999999)/(sqrt(3.1561671506122976e-13*pow(P64, 2) + 1)*sqrt(0.0018178205616991184*pow(1.2476547842401508e-5*P60 + 3.7523452157598445e-5*P61 - P65, 2) + 1)*sqrt(0.0010528003526296867*pow(1.4283513097072426e-5*P60 + 3.5716486902927524e-5*P61 - P65, 2) + 1)) + (0.00049450793067729688*P63 - 172.09999999999999)*(-5.3709337312250722e-13*P60 - 1.3430231271822752e-12*P61 + 3.7602330006095687e-8*P65)*(5.3194893290244149e-7*P60 + 1.5998464147441817e-6*P61 - 0.042635906952932505*P65)/(sqrt(3.1561671506122976e-13*pow(P64, 2) + 1)*sqrt(0.0018178205616991184*pow(1.2476547842401508e-5*P60 + 3.7523452157598445e-5*P61 - P65, 2) + 1)*pow(0.0010528003526296867*pow(1.4283513097072426e-5*P60 + 3.5716486902927524e-5*P61 - P65, 2) + 1, 3.0/2.0)) + (0.00049450793067729688*P63 - 172.09999999999999)*(-8.5103659313096439e-13*P60 - 2.5595085507698126e-12*P61 + 6.8210902878015602e-8*P65)*(5.3194893290244149e-7*P60 + 1.5998464147441817e-6*P61 - 0.042635906952932505*P65)/(sqrt(3.1561671506122976e-13*pow(P64, 2) + 1)*pow(0.0018178205616991184*pow(1.2476547842401508e-5*P60 + 3.7523452157598445e-5*P61 - P65, 2) + 1, 3.0/2.0)*sqrt(0.0010528003526296867*pow(1.4283513097072426e-5*P60 + 3.5716486902927524e-5*P61 - P65, 2) + 1)) + 590.10000000000002*(-5.3709337312250722e-13*P60 - 1.3430231271822752e-12*P61 + 3.7602330006095687e-8*P65)/(sqrt(0.0018178205616991184*pow(1.2476547842401508e-5*P60 + 3.7523452157598445e-5*P61 - P65, 2) + 1)*pow(0.0010528003526296867*pow(1.4283513097072426e-5*P60 + 3.5716486902927524e-5*P61 - P65, 2) + 1, 3.0/2.0)) + 590.10000000000002*(-8.5103659313096439e-13*P60 - 2.5595085507698126e-12*P61 + 6.8210902878015602e-8*P65)/(pow(0.0018178205616991184*pow(1.2476547842401508e-5*P60 + 3.7523452157598445e-5*P61 - P65, 2) + 1, 3.0/2.0)*sqrt(0.0010528003526296867*pow(1.4283513097072426e-5*P60 + 3.5716486902927524e-5*P61 - P65, 2) + 1)) I am using P-variables in order to implement the newton method to solve a non trivial inverse kinematics. These P-variables goes to native matrix operators. This line is one of the elements of jacobian matrix, which is used to implement newton method. It is very large due to the complexity of system kinematics Link to comment Share on other sites More sharing options...
george.kontogiorgos Posted July 3, 2020 Share Posted July 3, 2020 Hi Eric! I solved the problem by spliting the large equations into sums. I think this is an intrinscic problem of the compiler, since I saw some reports of this problem on other C compilers (just speculating) George Link to comment Share on other sites More sharing options...
Omron Forums Support Posted July 5, 2020 Share Posted July 5, 2020 Hi Eric! I solved the problem by spliting the large equations into sums. I think this is an intrinscic problem of the compiler, since I saw some reports of this problem on other C compilers (just speculating) George Good. :) I learned the current IDE has a line length limit of 8192, but I was not able to confirm if it applies to IDE versions that old yet. Link to comment Share on other sites More sharing options...
Recommended Posts