Board index FlightGear Development Canvas

NavDisplay & MapStructure discussion (previously via PM)

Canvas is FlightGear's new fully scriptable 2D drawing system that will allow you to easily create new instruments, HUDs and even GUI dialogs and custom GUI widgets, without having to write C++ code and without having to rebuild FlightGear.

Re: NavDisplay & MapStructure discussion (previously via PM)

Postby Hooray » Sat May 31, 2014 6:46 pm

Hyde wrote in Sat May 31, 2014 5:44 pm:@Philosopher
git main branch's canvas ND has not worked quite long time.
Could you update at least no nasal error and ND workable?

This is all fixed in the canvas-hackers repo, so we're aware of it - there are also quite a few improvements and optimizations coming up. This is all scheduled to go into 3.2, so no need to worry - like I mentioned previously when people asked about this, you could have simply applied the trivial patch that I posted to make it work:
Subject: NavDisplay & MapStructure discussion (previously via PM)

Hooray wrote:
F-JYL wrote in Fri May 09, 2014 4:40 am:So can you tell what have to be done to make it usable again ?


Well, as I mentioned already previously, due to some recent refactoring, the .setRange()/getPosCoord() methods now need to be called prior to the MapStructure layers getting added (the constructors depend on those properties now), or you need to return early if any of those calls return nil (in searchCmd) - so as a quick workaround, something like the following one-liner should probably work if added to MapStructure.nas itself:
Code: Select all
diff --git a/Nasal/canvas/MapStructure.nas b/Nasal/canvas/MapStructure.nas
index 1bc20fe..12778ce 100644
--- a/Nasal/canvas/MapStructure.nas
+++ b/Nasal/canvas/MapStructure.nas
@@ -484,6 +484,7 @@ var SymbolLayer = {
                return nil;
        },
        searchCmd: func() {
+               if (me.map.getPosCoord() == nil or me.map.getRange() == nil) return []; # handle layers not yet fully initialized
                var result = me.controller.searchCmd();
                # some hardening TODO: don't do this always - only do it once during initialization, i.e. layer creation ?
                var type=typeof(result);



This should check if the map isn't yet initialized properly (i.e. range/position being n/a), and return an empty set of results (i.e. a vector) instead of running the actual searchCmd() as provided by the MapStructure .lcontroller file, which "depends" on those properties being available now.
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: 11329
Joined: Tue Mar 25, 2008 8:40 am

Re: NavDisplay & MapStructure discussion (previously via PM)

Postby Philosopher » Sat May 31, 2014 6:54 pm

The only problem right now is that I can't push it, otherwise it'd be fine.

P.S. Hyde sent me a PM and I told him not to apply that to master, since I was going to push our work in a few weeks anyways. But, with Gitorious.org not accepting the commit... I don't know what to do.
Code: Select all
Counting objects: 119, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (64/64), done.
Writing objects: 100% (73/73), 1.10 MiB, done.
Total 73 (delta 49), reused 19 (delta 8)
error: insufficient permission for adding an object to repository database ./objects

fatal: failed to write object
error: unpack failed: unpack-objects abnormal exit
Auto packing the repository for optimum performance.
error: insufficient permission for adding an object to repository database /srv/oldgitorious/repositories/e25/93d/9271d1f1a891ffc43b04039628e3b4ff64.git/objects

fatal: unable to force loose object
error: failed to run repack
To git@gitorious.org:fg/fgdata.git
 ! [remote rejected] master -> master (n/a (unpacker error))
error: failed to push some refs to 'git@gitorious.org:fg/fgdata.git'
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: NavDisplay & MapStructure discussion (previously via PM)

Postby Hooray » Sat May 31, 2014 7:00 pm

must be some local issue or privilege related then, Hyde just pushed his EFB work: https://gitorious.org/fg/fgdata/commit/ ... b880cfd212

So, he could also just push those changes from the canvas-hackers clone in the meantime
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: 11329
Joined: Tue Mar 25, 2008 8:40 am

Re: NavDisplay & MapStructure discussion (previously via PM)

Postby Hyde » Sat May 31, 2014 7:03 pm

Do you want me try?
Hyde
 
Posts: 728
Joined: Fri Aug 12, 2011 1:09 pm
Location: Peachtree city, GA
Callsign: N407DS
Version: GIT
OS: Fedora 25

Re: NavDisplay & MapStructure discussion (previously via PM)

Postby Philosopher » Sat May 31, 2014 7:09 pm

Sure, it would be great if you could try. I think I created a test branch on the clone called "topics/canvas-push-test" with the commits already squashed (and ready for master). So you could try pulling that, pulling origin/master with --rebase, and pushing back to origin. (But I don't think it's a local issue, so I'm skeptical that it will work.)
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: NavDisplay & MapStructure discussion (previously via PM)

Postby Hyde » Sun Jun 01, 2014 12:17 pm

I get the same error when I try to merge from canvas-hackers-fgdata and push to fgdata.

I may push just copying the modified files. Can I try or do you want to do by yourself?
Hyde
 
Posts: 728
Joined: Fri Aug 12, 2011 1:09 pm
Location: Peachtree city, GA
Callsign: N407DS
Version: GIT
OS: Fedora 25

Re: NavDisplay & MapStructure discussion (previously via PM)

Postby Hooray » Sun Jun 01, 2014 10:10 pm

It's now 3-4 people (F-JJTH, Philosopher and Hyde) affected by this, and it seems only to happen with fgdata main.
However, not sure why this would happen ONLY with MapStructure related patches apparently ??
But it seems people are able to push other stuff !? Pretty weird.
BTW: I updated Philosopher's branch and created a merge request, give it another try: https://gitorious.org/fg/fgdata/merge_requests/256

PS: Copying files should not be a problem - Philosopher's commit is completely squashed, so there's no revision history to retain
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: 11329
Joined: Tue Mar 25, 2008 8:40 am

Re: NavDisplay & MapStructure discussion (previously via PM)

Postby Philosopher » Sun Jun 01, 2014 10:15 pm

Copying files is essentially what I did though - I didn't use rebase at all, just switched the branch without checking out files and committed. All the files seem to have the same mode, so I can't imagine any permissions errors. I think it's just something with the server and pushing "objects" (don't know exactly what those are).... but I would've thought the EFB would've been affected too, because it has PNGs and new files. SO has answers about server-side permissions being wrong with this error (also one about this occurring on GitHub once).
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: NavDisplay & MapStructure discussion (previously via PM)

Postby Hooray » Sun Jun 01, 2014 10:18 pm

this is true, typically that is a server-side problem, unless local privileges (SSH keys etc) may have changed - which doesn't seem to be the case here, because you are pushing to other repos, and because other fgdata commits seem unaffected

Otherwise, I'd just apply the whole thing as a patch and try to push that.
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: 11329
Joined: Tue Mar 25, 2008 8:40 am

Re: NavDisplay & MapStructure discussion (previously via PM)

Postby F-JJTH » Mon Jun 02, 2014 12:43 am

Hooray wrote in Sun Jun 01, 2014 10:10 pm:It's now 3-4 people (F-JJTH, Philosopher and Hyde) affected by this

Thorsten has been also affected. I have some change about GPSmap196 that I can't push because of this bug.
I've recently sent a mail to the Gitorious team, I'm waiting their answer. I hope the size of fgdata is not the source of the problem :/

The problem is clearly on server side because /srv/oldgitorious/repositories/e25/93d/9271d1f1a891ffc43b04039628e3b4ff64.git/objects is a path located on gitorious server.

Regards,
Clément
User avatar
F-JJTH
 
Posts: 697
Joined: Fri Sep 09, 2011 11:02 am

Re: NavDisplay & MapStructure discussion (previously via PM)

Postby Hooray » Mon Jun 02, 2014 12:06 pm

yes, the path is a local server path obviously - but that alone doesn't necessarily have to make it a server-side problem (even though I do agree that this seems most likely now).

but size alone is not going to be the problem, because all those 1:1 clones still work properly - it's probably the pure age of the repository having an effect here, i.e. it may need some TLC (git gc clean): http://stackoverflow.com/questions/3532 ... -bare-repo

All those binary files in fgdata are a huge problem for git... most clones are not as old, and we tend to delete/re-create them once they out of sync, so the main fgdata repo is clearly the oldest.

Fortunately, it's not a big deal because of the decentralized nature of git, a broken CVS/SVN setup is MUCH more worrisome...

But at some point all the binary stuff (aircraft !) should really be moved to a separate repository.
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: 11329
Joined: Tue Mar 25, 2008 8:40 am

Re: NavDisplay & MapStructure discussion (previously via PM)

Postby hvengel » Mon Jun 02, 2014 10:35 pm

I also been having issues with pushing updates up to fgdata git for several weeks now. So the issue appears to be fairly wide spread. Until I saw this thread I thought that it was specific to myself in some way. I am in the middle of a big change that I would like to finish before doing my next push and this is perhaps 2 weeks out. Hopefully this is resolved by then. In the mean time I will keep an eye on this thread.
hvengel
Retired
 
Posts: 1128
Joined: Sun Dec 24, 2006 4:35 am
Location: Minden Nevada

Re: NavDisplay & MapStructure discussion (previously via PM)

Postby F-JJTH » Tue Jun 03, 2014 9:18 am

Hi,
I received the answer from Gitorious team, there was an issue about file permissions on server side.
It's now fixed and I've been able to push my change.

Kind regards,
Clément
User avatar
F-JJTH
 
Posts: 697
Joined: Fri Sep 09, 2011 11:02 am

Re: NavDisplay & MapStructure discussion (previously via PM)

Postby Hooray » Tue Jun 03, 2014 11:42 am

Hyde, given that there are a apparently quite a few people affected by the 777 ND not working, you may want to pull --rebase and test/review the changes in the "updated-pushtest" branch and try to commit the whole thing if it looks okay. Testing-wise it would make sense to focus on aircraft using the NavDisplay (777 & 747) as well as the new map-canvas dialog that you can find under equipment.
Also there should be no Nasal errors shown in the console.
Let us know if there are any problems
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: 11329
Joined: Tue Mar 25, 2008 8:40 am

Re: NavDisplay & MapStructure discussion (previously via PM)

Postby Philosopher » Tue Jun 03, 2014 12:02 pm

Yay! thanks Clément for getting in touch with them – really helpful.
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

PreviousNext

Return to Canvas

Who is online

Users browsing this forum: No registered users and 10 guests