Linuxcnc is shutting down while loading ngc file

More
31 Jan 2015 16:55 #55500 by Kaushik
Hello,
I wanted to change the syntax of writing ngc file Eg. for variables we use #<Cnst_var> but i want to change it to $[Const_var]. I made appropriate changes to interp_read.cc and interp_array.cc. But, when i try to load ngc file in gmoccapy, its shutting down and gives an error on terminal...

5774 Segmentation fault $EMCDISPLAY -ini "$INIFILE" $EMCDISPLAYARGS $EXTRA_ARGS

Thanks in advance

Regards
Kaushik

Please Log in or Create an account to join the conversation.

More
31 Jan 2015 19:00 #55503 by ArcEye

I wanted to change the syntax of writing ngc file Eg. for variables we use #<Cnst_var> but i want to change it to $[Const_var].


Afraid if you want to change the whole way named parameters are designated and used, you are pretty much on your own.
$[name] actually means something in bash, ie access the contents/value of variable, no idea if that is relevant, but seems a good reason not to use it.

If you have existing code which uses named params in this way, you could simply write a filter script to change it to a #<name> syntax

I made appropriate changes to interp_read.cc and interp_array.cc.


Without seeing what you did and checking there are no other files affected, cannot comment

5774 Segmentation fault $EMCDISPLAY -ini "$INIFILE" $EMCDISPLAYARGS $EXTRA_ARGS


This is quite a generic fault and not very useful of itself. dmesg should show which library or process threw the segfault which may assist more

regards
The following user(s) said Thank You: Kaushik

Please Log in or Create an account to join the conversation.

More
31 Jan 2015 20:01 - 31 Jan 2015 20:06 #55504 by Kaushik
dmesg is giving me


[[16932.404524] hm2/hm2_5i24.0: registered
[16932.404525] hm2_5i24.0: initialized AnyIO board at 0000:04:00.0
[16932.433145] hm2/hm2_5i24.0: The hm2 pet_watchdog function is no longer needed.
[16932.433149] hm2/hm2_5i24.0: It will be removed before LinuxCNC 2.7.
[16932.433151] hm2/hm2_5i24.0: The hm2 write function now pets the watchdog.
[17040.789625] gmoccapy[13840]: segfault at 68 ip b75a689c sp bfee68c4 error 4 in libc-2.13.so[b7563000+15f000]
[17041.451940] hm2_5i24.0: dropping AnyIO board at 0000:04:00.0
[17041.451944] hm2/hm2_5i24.0: unregistered
[17041.451980] hm2_pci: driver unloaded
[17041.453153] hm2: unloading
[17043.535319] RTAI[math]: unloaded.
[17043.536517] SCHED releases registered named ALIEN PEDV$D
[17043.541118] RTAI[malloc]: unloaded.
[17043.637112] RTAI[sched]: unloaded (forced hard/soft/hard transitions: traps 0, syscalls 0).
[17043.638593] I-pipe: head domain RTAI unregistered.
[17043.638628] RTAI[hal]: unmounted.


Regards
Kaushik
Last edit: 31 Jan 2015 20:06 by Kaushik.

Please Log in or Create an account to join the conversation.

More
31 Jan 2015 21:47 - 31 Jan 2015 21:48 #55507 by ArcEye
Hi

Unfortunately libc is so widely used, the error is far from illustrative.

The best way to get a segfault is usually to pass a NULL pointer or iterate beyond the end of an array etc. but it could be anything.

You seem to be running this on a real machine, the fault arising during the initialisation of the hm2 drivers, which may or may not be coincidental.

To make it simple, what happens when you run the axis_mm sim or similar on the amended code?

If it still segfaults, zip the entire config plus the amended source files, that is the only way to test anything

regards
Last edit: 31 Jan 2015 21:48 by ArcEye.
The following user(s) said Thank You: Kaushik

Please Log in or Create an account to join the conversation.

Time to create page: 0.057 seconds
Powered by Kunena Forum