Board index FlightGear Support Hardware

Frequent constant random crashes

Joysticks, pedals, monitors.

Re: Frequent constant random crashes

Postby chrisb » Thu Mar 20, 2014 1:52 pm

Hooray wrote in Thu Mar 20, 2014 9:06 am: And you don't need the whole repo for that - but it makes sense to check out the fgdata repo if you intend to do any development

I dont know how to get part of a repo


I used the depth option to not get the history

Might want to add that to the wiki as apparently its a common problem especially if .net 4.5 is installed

please feel free to get involved in the wiki, all contributions are appreciated, and we're there to help you in case you get stuck somewhere.

Made a few changes to the wiki this and the --depth option that I used and added a few links, I didnt know about the bittorrent page
chrisb
 
Posts: 136
Joined: Mon Oct 21, 2013 8:46 pm
Location: YLIL, YMML
Callsign: cnb123
Version: git
OS: Win7 64bit

Re: Frequent constant random crashes

Postby chrisb » Mon Apr 07, 2014 10:38 am

I'm fairly certain this is joystick related and it is new
I downgraded to 2.12.1 and it has not crashed yet with the js plugged in
It has previously crashed on all newer versions including the latest git but only when the joystick is plugged in
chrisb
 
Posts: 136
Joined: Mon Oct 21, 2013 8:46 pm
Location: YLIL, YMML
Callsign: cnb123
Version: git
OS: Win7 64bit

Re: Frequent constant random crashes

Postby Hooray » Mon Apr 07, 2014 12:00 pm

if that's the case, we need to check what may have been in changed in between 2.12.1 and 3.0 that may be joystick/Nasal related
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11979
Joined: Tue Mar 25, 2008 8:40 am

Re: Frequent constant random crashes

Postby Philosopher » Mon Apr 07, 2014 9:47 pm

wow, this just keeps coming up... hmm... I have no idea why it would work with 2.12 if Git doesn't work.

I guess my idea would be to run a Nasal stress test that emulate bindings running, to see if we can reproduce it out of joystick state. I don't really have too much time to work on it yet, but maybe soon.

(also see: viewtopic.php?f=3&t=22578&p=205308#p205308)
Thanks,
Philosopher
(inactive but lurking occasionally...)
Philosopher
 
Posts: 1590
Joined: Sun Aug 12, 2012 6:29 pm
Location: Stuck in my head...
Callsign: AFTI
Version: Git
OS: Mac OS X 10.7.5

Re: Frequent constant random crashes

Postby Hooray » Mon Apr 07, 2014 10:33 pm

aren't bindings always compiled() afresh ?
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11979
Joined: Tue Mar 25, 2008 8:40 am

Re: Frequent constant random crashes

Postby Philosopher » Tue Apr 08, 2014 1:59 am

Okay, I cooked something up and tested it. Here's the script (adjust FILE var at top to point at a sane place):
Code: Select all
# Stress test

var FILE = "/Users/philosopher/Dropbox/Mihihehe/crash_index.log";
var namespace = nil;
var run1 = func {
   if (namespace == nil) namespace = {};
   var testfn = compile(testfn_str);
   call(testfn, nil, nil, namespace);
};

var run = func(times=100008) {
   var f = io.open(FILE, 'w');
   io.seek(f, 0, io.SEEK_SET);
   for (var i=0; i<times; i+=1) {
        io.write(f, i~"");
        io.seek(f, 0, io.SEEK_SET);
      run1();
   }
   io.write(f, "");
   io.close(f);
};

var testfn_str = '
   var j = [];
   for (var i=0; i<10; i+=1)
      append(j, [[[]],[[]],[[]],[[]]]);
   setsize(j, 0);
';

var _t = systime();
run(); namespace = nil;
printf("memory succeeded (took %03f seconds)", systime()-_t);

var testfn_str = '
   var y = props.globals.getNode("sim");
   y.getValue("author");
';

var _t = systime();
run(); namespace = nil;
printf("getNode succeeded (took %03f seconds)", systime()-_t);

var old_cmdarg = globals.cmdarg;
var _cmdarg = props.Node.new();
globals.cmdarg = func _cmdarg;
var testfn_str = '
   cmdarg().setValue("setting", rand());
   controls.throttleAxis();
';

var _t = systime();
run(); namespace = nil;
printf("throttleAxis succeeded (took %03f seconds)", systime()-_t);
globals.cmdarg = old_cmdarg;

globals.__test_tmp = {};
var testfn_str = '
   var g = props.Node.new().getNode("binding", 1);
   g.setValues({
      "command": "nasal",
      "module": "__test_tmp",
      "script": "controls.mixtureAxis()",
      "setting": rand(),
   });
   props.runBinding(g);
';

var _t = systime();
run(); namespace = nil;
printf("binding running succeeded (took %03f seconds)", systime()-_t);
delete(globals, "__test_tmp");

And run with --prop:/nasal/test/file=/..../stress_test.nas (again, adjust to work).

Not all the time, but some of the time it crashes on the last part - running nasal-command bindings. For example, my $FILE (which holds the index of the test, aka how many times it has succeeded so far) reads 94586 after the last run that crashed FG. Haven't gotten a backtrace, but I assume it would be similar.

Given these (preliminary) results, it must be something with the fgcommand or FGNasalSys:handleCommand()... Because I'm compiling code on the fly in the previous test snippets, and essentially doing the same things as the C++, except maybe in a safer fashion (hehe, that's a little ironic). I wonder, if I don't call a function, it shouldn't reach the setupArgs(), so it might not crash? Will test some other permutations then.

edit: wiki page now: http://wiki.flightgear.org/User:Philoso ... nd_crashes :D

edit2: Now it made it to a valiant 119428 times in the binding area, after 300008 in each of the others. So I'm pretty sure it's only the binding code, not the equivalent in Nasal that can cause this :D.

edit3: it keeps crashing on index 119428 on my system... quite suspicious :?
Last edited by Philosopher on Tue Apr 08, 2014 1:58 pm, edited 1 time in total.
Thanks,
Philosopher
(inactive but lurking occasionally...)
Philosopher
 
Posts: 1590
Joined: Sun Aug 12, 2012 6:29 pm
Location: Stuck in my head...
Callsign: AFTI
Version: Git
OS: Mac OS X 10.7.5

Re: Frequent constant random crashes

Postby chrisb » Tue Apr 08, 2014 7:02 am

I can certainly test this issue once a solution has been found
chrisb
 
Posts: 136
Joined: Mon Oct 21, 2013 8:46 pm
Location: YLIL, YMML
Callsign: cnb123
Version: git
OS: Win7 64bit

Re: Frequent constant random crashes

Postby Philosopher » Thu Apr 10, 2014 1:08 am

Thanks for your help in testing for the bug, I just submitted a patch that fixes it. If you use Git you'll probably get it tomorrow, otherwise I don't know if we will do a bugfix release yet. :? Either way, it will be fixed in 3.2 for sure.
Thanks,
Philosopher
(inactive but lurking occasionally...)
Philosopher
 
Posts: 1590
Joined: Sun Aug 12, 2012 6:29 pm
Location: Stuck in my head...
Callsign: AFTI
Version: Git
OS: Mac OS X 10.7.5

Re: Frequent constant random crashes

Postby chrisb » Wed Apr 16, 2014 7:25 pm

This issue appears to be fixed
chrisb
 
Posts: 136
Joined: Mon Oct 21, 2013 8:46 pm
Location: YLIL, YMML
Callsign: cnb123
Version: git
OS: Win7 64bit

Re: Frequent constant random crashes

Postby chrisb » Mon Jun 16, 2014 6:49 am

This has started up again, is it becuase git is under heavy development?
chrisb
 
Posts: 136
Joined: Mon Oct 21, 2013 8:46 pm
Location: YLIL, YMML
Callsign: cnb123
Version: git
OS: Win7 64bit

Re: Frequent constant random crashes

Postby Hooray » Mon Jun 16, 2014 7:19 am

nope, this shouldn't happen anymore - I guess it's a different bug, so if possible, please try to provide a backtrace: http://wiki.flightgear.org/Troubleshoot ... Backtraces
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11979
Joined: Tue Mar 25, 2008 8:40 am

Previous

Return to Hardware

Who is online

Users browsing this forum: No registered users and 1 guest