The online racing simulator
LFS Buddies for G15
(23 posts, started )
#1 - Wulle
LFS Buddies for G15
Hi,

found time to code another small application for the G15 which is called 'LFS Buddies for G15'.

Features:
- Displays which of your LFS buddies is currently online
- Notification is shown when a buddy goes online/offline
- Buddy details show server and track configuration information

Since it's easier for me to maintain/update the binaries in only one thread, please download them from the german 4players forum:

http://lfs.foren.4players.de/viewtopic.php?t=18758

Carefully read the 'readme.txt' ... and keep in mind: version 0.1.0 ... there might still be some bugs hidden (probably they will be obvious, ).

Ermm, one thing: You have to be connected to the internet to use the application (which itself in an interval of 60 seconds requests the host information from LFS-world).

Wulle
OMG Wulle, I had this idea for this same sort of app before, now I have a use for my G15!

Sweet

On starting it, I get this crash

[Header]
2008-01-02 10:21:36,803 [1] FATAL LFS_Buddies_for_G15.LFSBuddies (null) - Fatal exception caught.
System.Exception: There was a failure when attempting to execute : LgLcd.lgLcdInit(result: 1722 )
at Mtn.LgLcdFramework.LcdOutput.HandleErrorFromLcd(Int32 result, String text)
at Mtn.LgLcdFramework.LcdOutput.Initialise()
at LFS_Buddies_for_G15.Controller.BuddiesLcdOutput..ctor(LFSBuddyBean a_bean)
at LFS_Buddies_for_G15.LFSBuddies..ctor()
at LFS_Buddies_for_G15.LFSBuddies.Main(String[] args)
[Footer]

Any reasons?

EDIT: Font's weren't installed properly, however the app looks a bit messed on my G15, teh bottom labels are a bit too far down.
EDIT2: Yet again, restarting the app fixed that too.
If I was a G15 user, I would use it. But I'm not, so it's useless to me but I feel sure many people will find it useful
#4 - Wulle
Quote from dawesdust_12 :Any reasons?

Quote from Wulle :Carefully read the 'readme.txt'

rofl, ;-)

btw: just found the first bug. no, it's not really a bug: Compiled the application to not go into background (highest prio). I am going to change that in the next version (so you are able to see something else than the buddy-app on your lcd display, )
It's slightly embarrassing, but almost a good idea in my post, becuase then idiots will figure it out quicker.
Crash log:

[Header]
2008-01-02 21:02:06,901 [1] FATAL Util.LFSWorldAccessor (null) - Unable to update buddylist, because:System.Net.WebException: The operation has timed out
at System.Net.HttpWebRequest.GetResponse()
at LFS_Buddies_for_G15.Util.LFSWorldAccessor.readHosts(LFSBuddyBean bean)
System.Net.WebException: The operation has timed out
at System.Net.HttpWebRequest.GetResponse()
at LFS_Buddies_for_G15.Util.LFSWorldAccessor.readHosts(LFSBuddyBean bean)
2008-01-02 23:27:12,505 [8] FATAL Controller.BuddiesLcdOutput (null) - Caught unexpected exception: System.NullReferenceException: Object reference not set to an instance of an object.
at LFS_Buddies_for_G15.View.ScreenBuddyLCDManager.refresh(LFSBuddyBean bean)
at LFS_Buddies_for_G15.Controller.BuddiesLcdOutput.refreshActiveScreen(LFSBuddyBean bean)
at LFS_Buddies_for_G15.Controller.BuddiesLcdOutput.handleButtonThreeDown()
at LFS_Buddies_for_G15.Controller.BuddiesLcdOutput.myController_SoftButtonDown(LcdButton buttons)
System.NullReferenceException: Object reference not set to an instance of an object.
at LFS_Buddies_for_G15.View.ScreenBuddyLCDManager.refresh(LFSBuddyBean bean)
at LFS_Buddies_for_G15.Controller.BuddiesLcdOutput.refreshActiveScreen(LFSBuddyBean bean)
at LFS_Buddies_for_G15.Controller.BuddiesLcdOutput.handleButtonThreeDown()
at LFS_Buddies_for_G15.Controller.BuddiesLcdOutput.myController_SoftButtonDown(LcdButton buttons)
2008-01-02 23:27:12,585 [1] FATAL LFS_Buddies_for_G15.LFSBuddies (null) - Fatal exception caught.
System.NullReferenceException: Object reference not set to an instance of an object.
at LFS_Buddies_for_G15.View.ScreenBuddyLCDManager.refresh(LFSBuddyBean bean)
at LFS_Buddies_for_G15.Controller.BuddiesLcdOutput.refreshActiveScreen(LFSBuddyBean bean)
at LFS_Buddies_for_G15.LFSBuddies..ctor()
at LFS_Buddies_for_G15.LFSBuddies.Main(String[] args)
[Footer]

The App crashed and this is what the log file told me.
#7 - Wulle
Ah, thx a lot my alpha-tester, ;-)

Yep, a.) should consider timeouts and b.) seems to be a reference to a non-existing model entry (e.g. trying to render buddy details after buddy went offline or host changed details).

Going to examine both when back at home. After being 2 1/2 weeks on vacation I unfortunatly have to work again,
#8 - Wulle
Sigh, another crash log.

[Header]
2008-01-04 01:02:26,041 [1] INFO Util.LFSWorldAccessor (null) - Reading hosts and racers from LFS World
2008-01-04 01:03:26,212 [1] INFO Util.LFSWorldAccessor (null) - Reading hosts and racers from LFS World
2008-01-04 01:04:26,246 [1] INFO Util.LFSWorldAccessor (null) - Reading hosts and racers from LFS World
2008-01-04 01:05:26,323 [1] INFO Util.LFSWorldAccessor (null) - Reading hosts and racers from LFS World
2008-01-04 01:06:26,327 [1] INFO Util.LFSWorldAccessor (null) - Reading hosts and racers from LFS World
2008-01-04 01:07:26,399 [1] INFO Util.LFSWorldAccessor (null) - Reading hosts and racers from LFS World
2008-01-04 01:08:26,437 [1] INFO Util.LFSWorldAccessor (null) - Reading hosts and racers from LFS World
2008-01-04 01:09:26,517 [1] INFO Util.LFSWorldAccessor (null) - Reading hosts and racers from LFS World
2008-01-04 01:10:26,520 [1] INFO Util.LFSWorldAccessor (null) - Reading hosts and racers from LFS World
2008-01-04 01:11:26,565 [1] INFO Util.LFSWorldAccessor (null) - Reading hosts and racers from LFS World
2008-01-04 01:12:26,641 [1] INFO Util.LFSWorldAccessor (null) - Reading hosts and racers from LFS World
2008-01-04 01:13:26,691 [1] INFO Util.LFSWorldAccessor (null) - Reading hosts and racers from LFS World
2008-01-04 01:14:26,692 [1] INFO Util.LFSWorldAccessor (null) - Reading hosts and racers from LFS World
2008-01-04 01:15:26,784 [1] INFO Util.LFSWorldAccessor (null) - Reading hosts and racers from LFS World
2008-01-04 01:16:26,820 [1] INFO Util.LFSWorldAccessor (null) - Reading hosts and racers from LFS World
2008-01-04 01:16:38,451 [1] FATAL LFS_Buddies_for_G15.LFSBuddies (null) - Fatal exception caught.
System.NullReferenceException: Object reference not set to an instance of an object.
at LFS_Buddies_for_G15.View.ScreenBuddyLCDManager.refresh(LFSBuddyBean bean)
at LFS_Buddies_for_G15.Controller.BuddiesLcdOutput.refreshActiveScreen(LFSBuddyBean bean)
at LFS_Buddies_for_G15.LFSBuddies..ctor()
at LFS_Buddies_for_G15.LFSBuddies.Main(String[] args)
[Footer]

Happened after about 20 minutes or so, myself is on my buddy list, so I can test me joining and leaving servers.

EDIT: Crashed again after restarting it, nothing in error log though.
Quote from dawesdust_12 :Sigh, another crash log.

Happened with v0.1.1 or v0.1.0?
.
.
.
/me reminds himself of putting the version info into the log messages.
0.1.1, however, I just noticed something again, It seems sometimes like it's crashed, so my LCD clock is back into the foreground (It's set to manual switching), but then Sam joins a server, and it pops back into life. It goes into the background when inactive, but I can't switch to it.
Quote from dawesdust_12 :0.1.1, however, I just noticed something again, It seems sometimes like it's crashed, so my LCD clock is back into the foreground (It's set to manual switching), but then Sam joins a server, and it pops back into life. It goes into the background when inactive, but I can't switch to it.

I was not able to replicate your above mentioned exception, but I added the program database (pdb) in version 0.1.2 that might help me to find the error. Can you do me a favour and reproduce the error?

Update: Version 0.1.2 available

-> http://lfs.foren.4players.de/viewtopic.php?t=18758
Hmm, I know what it does now, it doesn't stay in the foreground like it used to, it goes into the background until someone signs in, which is sorta annoying, but logical really.

So far it seems stable, if it crashes, I'll be throwing my toys in the manner of a log
Well, is this wrong?
<buddy>Wulle</buddy>
<buddy>Zipppy</buddy>
<buddy>seggons</buddy>

I didn't really understand what you said in the readme :S
Well, yes, it's correct. Your configuration file "configuration.xml" should look like this:

<?xml version="1.0" encoding="utf-8"?>
<lfsbuddies xmlns="lfsbuddiesSchema">
<!-- The LFS ident key-->
<identKey>1234567812345678</identKey>
<notificationSeconds>5</notificationSeconds>
<buddies>
<buddy>Wulle</buddy>
<buddy>Zipppy</buddy>
<buddy>seggons</buddy>
</buddies>
</lfsbuddies>

Note:
a.) Exchange the Ident-Key-Value '1234....' with your personal LFS-World Ident-Key
b.) You're of course allowed to drop me the list of buddies, :-)

If the application won't start, take a look at the file 'LFSBuddies.log' for any fatal error messages.
Okay, good, thanks for helping me out!

2008-01-05 05:46:59,182 [1] FATAL Util.Configuration (null) - ***Validation error:
2008-01-05 05:46:59,182 [1] FATAL Util.Configuration (null) - Severity:Warning
2008-01-05 05:46:59,182 [1] FATAL Util.Configuration (null) - Message :Could not find schema information for the element 'buddy'.
System.Xml.Schema.XmlSchemaValidationException: Could not find schema information for the element 'buddy'.

Had it stall where it said LFSW was unavailable (when it clearly was), and wouldn't updaye and have that in the log file a bunch of times repeatedly.
I'm sorry, with introducing the schema validation, the configuration.xml slightly changed. Should have mentioned it in the docs (for those users upgrading from <=0.1.1.

It's important either to use the configuration.xml supplied in version 0.1.2 or to add the namespace (xmlns) attribute manually to your existing configuration:

<lfsbuddies xmlns="lfsbuddiesSchema">
.
.

It's strange though, it runs for quite a while, then dies like that.

It'd be nicer though if we could have our buddies in a seperate file, so it's not overwritten.
Quote from dawesdust_12 :It's strange though, it runs for quite a while, then dies like that.

Saw it already in one of your earlier logfiles. Never happened to me to see a timeout on the connection. Maybe related to your internet access? Forced disconnect/reconnect by your ISP? Lost internet connection? If you have kept your logfiles, search for "Unable to update buddylist, because:" ... is it always a timeout or sometimes something else? Another question: Does it recover after a couple of minutes (e.g. after connection is available again)?

Quote from dawesdust_12 :It'd be nicer though if we could have our buddies in a seperate file, so it's not overwritten.

Hehe, don't expect to much updates anymore. Saying so, it wouldn't be worth to spend thoughts on buddy-migration/separation for updated configuration-schemas, :-)
Thanks for this great G15 applet Wulle.
After just getting a G15 I then discovered this and must say it is brilliant, works a treat and I can see my buddies LFS activities in real-time

EDIT: Only thing is it says it is not auto start-able in the settings, so can this be set somewhere in the cfg now or coded in a future update?
Quote from flinty72 :EDIT: Only thing is it says it is not auto start-able in the settings, so can this be set somewhere in the cfg now or coded in a future update?

No autostart for different reasons:
- No#1: I have no clue how to do this,
- No#2: Application might start before internet is available
- No#3: Windows autostart folder

Just some small changes. Nothing important for most of you:

Update 13.01.08: Version 0.1.3:
-> http://lfs.foren.4players.de/viewtopic.php?t=18758
Thanks for the reply Wulle, I did place it into the windows autostart folder after posting this the other day, works fine and no need for auto start now

Loving the new version with refresh time now being configurable & semi-auto update of buddies, sweet!

LFS Buddies for G15
(23 posts, started )
FGED GREDG RDFGDR GSFDG