Author |
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: December 18 2005 at 12:03 | IP Logged
|
|
|
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 |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: December 19 2005 at 22:58 | IP Logged
|
|
|
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 |
|
|
krommetje Super User
Joined: December 29 2004 Location: Netherlands
Online Status: Offline Posts: 695
|
Posted: December 20 2005 at 07:01 | IP Logged
|
|
|
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 |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: December 20 2005 at 07:55 | IP Logged
|
|
|
Thanks Dave.
I believe this also causes the standard GV web page to hang (not load).
|
Back to Top |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: December 20 2005 at 12:00 | IP Logged
|
|
|
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 |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: December 20 2005 at 13:43 | IP Logged
|
|
|
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 |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: December 22 2005 at 19:48 | IP Logged
|
|
|
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 |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: December 22 2005 at 20:41 | IP Logged
|
|
|
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 |
|
|
TonyNo Moderator Group
Joined: December 05 2001 Location: United States
Online Status: Offline Posts: 2889
|
Posted: December 22 2005 at 20:46 | IP Logged
|
|
|
You're welcome!
|
Back to Top |
|
|
krommetje Super User
Joined: December 29 2004 Location: Netherlands
Online Status: Offline Posts: 695
|
Posted: December 24 2005 at 03:30 | IP Logged
|
|
|
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 |
|
|
dhoward Admin Group
Joined: June 29 2001 Location: United States
Online Status: Offline Posts: 4447
|
Posted: January 03 2006 at 14:25 | IP Logged
|
|
|
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 |
|
|