GLBasic forum

Main forum => Beta Tests => Topic started by: Hemlos on 2014-Aug-12

Title: NOAA GOES 15 & 13 - Satelite Weather Recorder and Time Lapse.
Post by: Hemlos on 2014-Aug-12
NOAA GOES - West Hemisphere Satelite Weather Recorder and Time Lapse.

I couldnt hold this back anymore....it works good and its time to share a beta version.

The complete project is attached to this message.
This is a test, yet a fully functioning program.

Downloads the latest imagery, and plays it back in a time lapse.
You need to let it run for a few days to get a good lapse.

Edit:
I uploaded the previous 4 days, dating from the last upload time here, as it is not a cloud database, it is local aquisition.

More information can be found in the project.
Compile in GLBasic.


Version 140910:
Title: Re: NOAA GOES - East Hemisphere Satelite Weather Recorder and Time Lapse.
Post by: MrTAToad on 2014-Aug-20
Its rather clever!
Title: Re: NOAA GOES - East Hemisphere Satelite Weather Recorder and Time Lapse.
Post by: Hemlos on 2014-Aug-24
Bingo, found a european satelite = http://www.ssd.noaa.gov/eumet/neatl/
Next version will include this imagery as an option or something....i have to think about this.

So far my ram is under 2 gig with almost 3 weeks of imagery, looks good so far.

Another thing im thinking about ...not likely but mybe .... put up a host that serves an archive of imagery to the program, as opposed to downloading from noaa and building the archive locally.
Title: Re: NOAA GOES - East Hemisphere Satelite Weather Recorder and Time Lapse.
Post by: erico on 2014-Aug-24
Quote from: Hemlos on 2014-Aug-24
...
So far my ram is under 2 gig with almost 3 weeks of imagery, looks good so far.
...

Great!

One thing, since you have an earth map going, can´t you do the same with, let´s say, the sky?
It could could probably be worth to those people into stars stuff and maybe there are data about that going on around the net.

So instead of looking into a ball, your camera could be inside the ball.
Just some idea.

Title: Re: NOAA GOES - East Hemisphere Satelite Weather Recorder and Time Lapse.
Post by: Hemlos on 2014-Aug-24
'Be the ball, nananananana' -Chevy Chase, Caddy Shack

I will definetly keep it in mind, if i find a ball to sit in.
Title: Re: NOAA GOES 15 & 13 - Satelite Weather Recorder and Time Lapse.
Post by: Hemlos on 2014-Sep-03
I have a solution for an loop of indefinite size....should be able to play years...on any computer.

Im going to do a small rewrite test, itll load 4 images only(2 that are showing, 2 are loading. And as the animation plays, itll load images, this will cause a delay and that delay will become the lower limit for the FPS timer.

As a sideffect, memory will be freed up big time!  :good:
Lets see how it goes, ill be back soon...
Title: Re: NOAA GOES 15 & 13 - Satelite Weather Recorder and Time Lapse.
Post by: fuzzy70 on 2014-Sep-03
Quote from: Hemlos on 2014-Sep-03
I have a solution for an loop of indefinite size....should be able to play years...on any computer.

Im going to do a small rewrite test, itll load 4 images only(2 that are showing, 2 are loading. And as the animation plays, itll load images, this will cause a delay and that delay will become the lower limit for the FPS timer.

As a sideffect, memory will be freed up big time!  :good:
Lets see how it goes, ill be back soon...
Sounds like possibly like a good solution.

:offtopic: BTW you don't happen to plan on a GLB Seti program do you  ;)

Lee
Title: Re: NOAA GOES 15 & 13 - Satelite Weather Recorder and Time Lapse.
Post by: Hemlos on 2014-Sep-04
SETI is a joke.  :bed:

Where is the best place to hide?   :D

Title: Re: NOAA GOES 15 & 13 - Satelite Weather Recorder and Time Lapse.
Post by: Hemlos on 2014-Sep-07
Im trying to find a memory leak in this program.
Apparently ...even though i am only using 3 ID's for LOADSPRITE, the RAM on my computer gets used up after about 8 hours running.
The program crashes with a C++ runtime error message.

If anyone from the team could do a little testing and try to get the same results as i have, that would be greatly appreciated.
Or even better yet, just review the code and try to find a memory leak that i caused in the code.
Im not so sure its my code causing the leak, or is it GLBasic internally causing it?

Also, this program is one of many programs that go "BLACK SCREEN" when it is minimized for more than 15 minutes.

Title: Re: NOAA GOES 15 & 13 - Satelite Weather Recorder and Time Lapse.
Post by: Hemlos on 2014-Sep-08
This is a screenshot of the error message i am getting..
Title: Re: NOAA GOES 15 & 13 - Satelite Weather Recorder and Time Lapse.
Post by: fuzzy70 on 2014-Sep-08
That's interesting, how did you manage to get a Visual C++ Runtime error when GLB progs use GCC?. Or is that error from the GLB IDE

Lee
Title: Re: NOAA GOES 15 & 13 - Satelite Weather Recorder and Time Lapse.
Post by: Hemlos on 2014-Sep-08
I was just running the binary on my desktop.
It does that after running the program for a while, hour or two.
Mind you it is loading 225 frames now (thats 450 images)
But they only load as they are used...reusing loadsprite 0 and 1 every frame.

I think it might be a memory leak in loadsprite or im not using it correctly?

The ram usage slowly increases with time.
Title: Re: NOAA GOES 15 & 13 - Satelite Weather Recorder and Time Lapse.
Post by: fuzzy70 on 2014-Sep-08
For some reason that error to me points to something else. Like I said earlier GLBasic uses GCC to compile the final program & all the library files that are used during compilation are GCC ones as VisualC ones are a completely different format & cannot be used in GCC (or vice-versa).

Because of that I can't see how your GLB program can cause a Visual C runtime error as it cant use it hence why I asked if it was your program & not the GLB IDE,which I believe is Visual C++ based judging by the runtimes being installed when you install GLB.

I have had VC runtime errors before (although never with GLB) & that was caused by a conflicting install of either a program or a driver & the solution was done by re-installing the runtime or on a couple of cases windows update had a newer version.

Very interesting problem though.

Lee

EDIT: I have just downloaded your program from the 1st post & will see what happens on my system, if the ram leaks I should get an error quicker than you as my test system only has 2GB of ram.
Title: Re: NOAA GOES 15 & 13 - Satelite Weather Recorder and Time Lapse.
Post by: fuzzy70 on 2014-Sep-08
Well I ran the program for around an hour minimized & when I clicked on the task bar to show it again all was fine as in no black screen but the animation showing as it should.

Memory usage had increased from the circa 40MB at start to around 120MB after the hour so definitely a leak somewhere, however I cannot for the life of me find my tracing program which shows every process/thread associated with a running program (gives way more info than windows task manager/resource monitor).

I did have to stop the program as it was rather cpu heavy, averaging around 50-60% usage, as I needed to do other things on my pc that required the cpu so didn't manage to get to the stage of running out of memory & the error you get.

Lee
Title: Re: NOAA GOES 15 & 13 - Satelite Weather Recorder and Time Lapse.
Post by: Hemlos on 2014-Sep-09
I think i nailed the memory leak...i had made changes that i forget to follow up on in my core lib.
testing

New test is uploaded to the top of the thread.
Hopefully this version fixes all the 'issues' and i can move on.
Title: Re: NOAA GOES 15 & 13 - Satelite Weather Recorder and Time Lapse.
Post by: mentalthink on 2014-Sep-09
Hemlos don't you think put the image in a real 3D sphere?¿, I look the map only it's part of South and Nort America, but I suposse the nasa will give all the globe complete...

Really it's very awesome the things can do GLBasic, this can be very good Demo can do the soft, not all have to be games...

Very very inetersting.
Title: Re: NOAA GOES 15 & 13 - Satelite Weather Recorder and Time Lapse.
Post by: Hemlos on 2014-Sep-09
@MT
Nah, other than noaa 15 and 13, they only show one other map that i can find, for europe and it isnt that great, just europe and north africa.
Aside from that, i would need the maps to be square not round to paste it to a sphere.
I love the idea though and i will certainly keep it in mind if i find more data resources on the web.

@All
I have tested the current version, with not much difference in bugs.
I cant find the memory leak, and my current code is rock solid, from what i can tell...debugger is OK with everything too.
I think it might be LOADSPRITE, or NETWEBGET....i need to do many more tests to get to the bottom of this issue to be certain.

Still getting that C++ Microsoft runtime error too, when my ram hits around 47% used of 8 gb.
Im going to reactivate my swap to see if this is the problem...although i dont like running that with an SSD. :rant:
My spidey senses are detecting at least 2 bug reports in the near future.

@fuzzy (or anyone that can fit into this test here that i describe below:
Do you have any programs you wrote that you can test, maybe games and run it for an hour or two (match time ran, runtime test) to test if you get a memory leak with some arbritrary glbasic binary other than this program?
Im just curious to see if its a compilation error with GLBasic or something.
A program with jpg images and maybe type definitions would be ideal to test this.

Title: Re: NOAA GOES 15 & 13 - Satelite Weather Recorder and Time Lapse.
Post by: Hemlos on 2014-Sep-10
Screenshot of the ms c++ error
I show my whole desktop...and you will notice i run nothing special on this computer...its a very clean windows 7.
Title: Re: NOAA GOES 15 & 13 - Satelite Weather Recorder and Time Lapse.
Post by: fuzzy70 on 2014-Sep-10
I'll see what I can find, I know for a fact though that I have no programs that use jpgs as I rarely use them. One thing that springs to mind is the isometric type landscape using fbm & noise, that's a cpu hogger or my mandelbrot generator is another. Nearly all my other programs don't really do much without user input.

Btw done a test of your program again (same version as I tested last time) but this time booted into windows 7 x64. Left it for around same time as last however memory usage was more than double my previous test & also suffered the black screen from restoring from being minimised. Previous test was done in windows 8.1 x64, same pc & gfx drivers etc just have dual boot.

Lee
Title: Re: NOAA GOES 15 & 13 - Satelite Weather Recorder and Time Lapse.
Post by: mentalthink on 2014-Sep-10
No Hemlos I cooment done in 3D becuase don't have to be too much problem...

If you take a look to this image:

Yo can see a unwrapped Sphere, if you put with this unwrap your images each in each "plane Sphere" you will have a 3D sphere but textured , the only problem I think will be adjust each emisphere, but perhaps putting another layer over and painting something in a.png can solve the problem, ok it's a patch but can works.

I think done a sphere without too much polys can reprudice the texture in real time, or leabing the text at 512x512.

PS: The image about unwrao doens't square but not it's problem done in any 3D soft.
Title: Re: NOAA GOES 15 & 13 - Satelite Weather Recorder and Time Lapse.
Post by: Hemlos on 2014-Sep-10
Hey pretty cool mentalthink.
I did understand exactly what you meant in the first place.
The problem is the images i am getting ...both...together...equal only half the earth.
Thats 2 spherical images = 50% of the planet.
To make it work, one of these would need to be half the earth, and the other would need to be the backside(from my perspective, no offense to asia and europe, *chuckle* ) of the earth.

btw..uploading new update, this one make it compatible on all monitors(for fullscreen anyhow)
Plus, my core library grew 2 new objects, woo! lib_Info_Object_ and lib_IO_Object_ ..these provide I\o and Screen info.
Title: Re: NOAA GOES 15 & 13 - Satelite Weather Recorder and Time Lapse.
Post by: Hemlos on 2014-Sep-10
hey MT do you have a sphere.ddd with those texture coords in it?
i use a sphere in AGOSA but the mapping is a square that wraps incorrectly for this.
the map on my sphere will wrap a square across it horizontally
Title: Re: NOAA GOES 15 & 13 - Satelite Weather Recorder and Time Lapse.
Post by: mentalthink on 2014-Sep-10
hemlos here you have the model
Title: Re: NOAA GOES 15 & 13 - Satelite Weather Recorder and Time Lapse.
Post by: Hemlos on 2014-Sep-11
thanks mt

edit:
Quote
Problem signature:
  Problem Event Name:   APPCRASH
  Application Name:   NOAAGOES.exe
  Application Version:   0.0.0.0
  Application Timestamp:   541155bf
  Fault Module Name:   NOAAGOES.exe
  Fault Module Version:   0.0.0.0
  Fault Module Timestamp:   541155bf
  Exception Code:   40000015
  Exception Offset:   000fa2aa
  OS Version:   6.1.7601.2.1.0.768.3
  Locale ID:   1033
  Additional Information 1:   a4e0
  Additional Information 2:   a4e07350d6f1cbce82f87fcf9f84379f
  Additional Information 3:   ad77
  Additional Information 4:   ad774b102cd27dbbb0b00716e3f239f8
this is the windows error message i get when it crashes.
i have optimized the program, there are no explicits, and no overstacks.
Title: Re: NOAA GOES 15 & 13 - Satelite Weather Recorder and Time Lapse.
Post by: Hemlos on 2014-Sep-18
Alrighty..i dont like "making due" when the power is RiGhT there.
However, i dont really have a choice.
Ive come to terms with this project and will have to split it up.

As moru suggested, run a host in a terminal, and i did with success.
It even runs in a terminal on linux.linux compile, perfect for a host.
So i set it up on an OLD(7 or 8 years old now) ibm compatible pc using linux mint 17 mate, 32 bit OS.

Now i need to setup a viewer, should be easy, its mostly done as it were.
Unfortunetly i tried everything i can think of and cant nail down this memory leak.
BTW i did have this leak in linux too...so its either opengl itself, or perhaps the internal structure of a glbasic command.
Furthermore, i will be continuing to test this problem with new software that im planning on.
I am very patient and will sniff it out like a blood hound, woof.

I brainstormed up a new function to work with console/terminal windows, i named it _GETTIMER()
Which allows for a timer to work the same way as GETTIMER() where is reports the milliseconds per frame.
Without showscreen, it even works in linux compiles...and its purely glbasic code.
I added  this to the next update for SVSAPI, which is a function inside the lib_terminal_object_ module.
If you want to be techinical like this, just return PassesPerSecond instead to recieve fps instead.

Just call this function at the end of a main loop or something and stdout the output to see the frametime, note, not fps:

Code (glbasic) Select
FUNCTION _GETTIMER:
//GETTIMER() returns frametime in ms.
// this doesnt work in a console\terminal because it is depandant on SHOWSCREEN.
//...SO we make one from system time, to be used in a looping routine, in a console.
// In a way, this function essentially replaces GETTIMER() and eliminates the need for SHOWSCREEN.
// One thing to note....it only updates one time per second. However, the response seems to be very accurate.
// SLEEP can be used along with this function, just dont sleep longer than >= one second.
// You can run a console at 10fps by SLEEP 100, and you can prove it with this function.
// There will be fluxuations in the response, and that will be due to your own code causing delays on the memory and/or the cpu.
STATIC PassesPerSecond%, Passes%
STATIC TimeOfLastPass$, TimeOfThisPass$
INC Passes, 1
TimeOfLastPass$ = TimeOfThisPass$
TimeOfThisPass$ = self.TIME_._Get_Seconds$()
IF TimeOfLastPass$ <> TimeOfThisPass$  //detects a new second from the system.
PassesPerSecond = Passes
Passes = 0
ENDIF
self.FrameTime = (1000/PassesPerSecond )
RETURN self.FrameTime
ENDFUNCTION
Title: Re: NOAA GOES 15 & 13 - Satelite Weather Recorder and Time Lapse.
Post by: Moru on 2014-Sep-18
When running on Linux, set up a schedule ("crontab -e" on ubuntu) to run your program every x minutes. No problems with memory leaks that way.
Title: Re: NOAA GOES 15 & 13 - Satelite Weather Recorder and Time Lapse.
Post by: Hemlos on 2014-Sep-18
Cool thanks moru, ill check that out for other purposes, but it isnt leaking on linux in a terminal as it is.
Im just stirring the pot moru, the point isnt to stop a memory leak for this one app.
The point of reporting this issue in this beta thread is to try and drum up help from the community; to help identify the cause, whether it occurs in any/all programs, or some command, and share them with G in a better bug report.
So far i have only been able to identify the single fact that it is occuring ONLY in Opengl graphical programs.
It isnt NETWEBGET either....my host has been running it for over 24 hours now without a single megabyte of memory being lost.

Id like to run a game server host with GLBasic's opengl graphics.
Between this memory bug and the blackout bug....GLBasic is definetly not able to do it graphically, indefintely, on any OS.
The memory leak has been reported to be experienced on windows 7, windows 8, and linux.