Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Bug Reports
 PowerHome Messageboard : PowerHome Bug Reports
Subject Topic: Blank Global Variables Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: December 18 2005 at 12:03 | IP Logged Quote TonyNo

I think I've seen this enough to report...

If you have a GV with a null value, and try to do a comparison on it, PH crashes.

This is the code I used...
Code:
JUMP if( "{TSTAT FUNC}" = "CHG", 1, 3)
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: December 19 2005 at 22:58 | IP Logged Quote dhoward

Tony,

I placed your code into a macro and tested it. I couldnt get PowerHome to crash (the upcoming version has better crash detection code), which is good, however the macro just prematurely exited...not good.

So Ive searched and replaced the whole of PowerHome and added the following to all SELECT instances from the global_variables table: isnull(value,'')

This will cause any NULL values (I shouldnt be letting any in there but they're sneaking in somehow) to be returned as an empty string. This should fix the problem.

This will be in the next beta (I know, I know, any day now ).

Thanks for catching this for me.

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
krommetje
Super User
Super User
Avatar

Joined: December 29 2004
Location: Netherlands
Online Status: Offline
Posts: 695
Posted: December 20 2005 at 07:01 | IP Logged Quote krommetje

I can second TonyNo and if I recollect correctly you have pointed out that if a GV has a NULL value, any evaluation will cause PH to crash. Since then, when I create any new GV's 'll put in a zero before I start evaluating..

Peter
Back to Top View krommetje's Profile Search for other posts by krommetje Visit krommetje's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: December 20 2005 at 07:55 | IP Logged Quote TonyNo

Thanks Dave.

I believe this also causes the standard GV web page to hang (not load).
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: December 20 2005 at 12:00 | IP Logged Quote dhoward

Im not sure if this will fix the problem with the GV web page. When adding the code yesterday, the GV web page already had a check for null and replacing with an empty string. Have you confirmed that it's a null GV value that causes the page not to load?

Also, do you know how nulls are getting into the GV table? In order to test yesterday, I had to use a Direct SQL statement to purposely set the value to null. If you have any idea on how the nulls are getting in, I might be able to prevent that from happening as well .

Thanks,

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: December 20 2005 at 13:43 | IP Logged Quote TonyNo

I'll double-check the null effect.

They get in by creating new GV's and not assigning values to them.

I was also setting them to "" in my code to clear a flag.
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: December 22 2005 at 19:48 | IP Logged Quote TonyNo

Reporting in...

I just nulled out a GV on the GV web page and no crash.

In PH, created a new GV, clicked on refresh, and executed an "if(" on it... Immediate exit!
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: December 22 2005 at 20:41 | IP Logged Quote dhoward

Mooooahahhhahahaha,

Duhh, of course. I thought that I had the initial value of a global variable always set to empty string in the PowerHome Explorer. I just double-checked this and what do you know, I didnt have this setup. Well, it is now. Whenever a global variable is created from within the Explorer, it will default to an empty string. Also, now anytime a global is retrieved, if it should happen to be null, it will automatically be translated to an empty string. And finally, if all else fails, the crash protection in the next beta should keep PowerHome from exiting or blowing up .

Thanks for all the detective work .

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: December 22 2005 at 20:46 | IP Logged Quote TonyNo



You're welcome!
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
krommetje
Super User
Super User
Avatar

Joined: December 29 2004
Location: Netherlands
Online Status: Offline
Posts: 695
Posted: December 24 2005 at 03:30 | IP Logged Quote krommetje

dhoward wrote:
And finally, if all else fails, the crash protection in the next beta should keep PowerHome from exiting or blowing up .


This next Beta promisses to be really something ... Hopefully I can tease Dave with something else now that the Uptime code has been updated...



Peter
Back to Top View krommetje's Profile Search for other posts by krommetje Visit krommetje's Homepage
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: January 03 2006 at 14:25 | IP Logged Quote dhoward

Oh Im sure you'll find something . Im hoping to have this out any day now. The Insteon has been a little tough since it's so radically different from X-10. Im doing my best to test everything but there have been some MAJOR underlying changes so I have no doubt everyone will be keeping me busy .

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum