SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Github Development
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Github Development Discussion related to SageTV Open Source Development. Use this forum for development topics about the Open Source versions of SageTV, hosted on Github.

Reply
 
Thread Tools Search this Thread Display Modes
  #41  
Old 09-10-2015, 02:40 PM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
SageTVClient seems to work great for me so far.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers.
Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA.
Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room
Reply With Quote
  #42  
Old 09-10-2015, 02:59 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
Ditto on the Client. Placeshifter seems to work ok. SageTVService.exe doesn't seem to work at all. It's really weird actually. It seems to start ok but then in the log it says that Sage.exit() has been called. The exe's stay running but there's no CPU usage on them and the used memory doesn't get any larger.
Attached Files
File Type: zip sagetv_1.zip (220.4 KB, 150 views)
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #43  
Old 09-10-2015, 03:08 PM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
Quote:
Originally Posted by Taddeusz View Post
Ditto on the Client. Placeshifter seems to work ok. SageTVService.exe doesn't seem to work at all. It's really weird actually. It seems to start ok but then in the log it says that Sage.exit() has been called. The exe's stay running but there's no CPU usage on them and the used memory doesn't get any larger.
Just to verify, you were still using it as an installed service, correct? not launching the SageTVService.exe directly?
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers.
Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA.
Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room
Reply With Quote
  #44  
Old 09-10-2015, 03:09 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
Quote:
Originally Posted by Fuzzy View Post
Just to verify, you were still using it as an installed service, correct? not launching the SageTVService.exe directly?
Yes, of course.
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #45  
Old 09-10-2015, 03:29 PM
wnjj wnjj is offline
Sage Icon
 
Join Date: Jan 2009
Posts: 1,514
I'll have to check into it closer when I get home.

SageTVService is built from the SageLauncher project as a build option (like Client and Placeshifter are). So when I built everything I saw in there I got a SageTVService.exe. I now notice there's also a SageTVServiceControl project in the .sln file that I didn't build. It must have been hiding in the gui.

Is there a SageTVServiceControl.exe in your installed version? I'll probably need to compile that one too it seems.
Reply With Quote
  #46  
Old 09-10-2015, 03:34 PM
SHS's Avatar
SHS SHS is offline
Moderator
 
Join Date: Mar 2003
Location: Vinita, Oklahoma
Posts: 4,589
Quote:
Originally Posted by wnjj View Post
Ok, here's a zip containing the following, recompiled in VS2015:

SageTV.exe
SageTVService.exe
SageTVClient.exe
SageTVPlaceshifter.exe
SageTVStudio.exe

I left out SageTVLite.exe, SageTVLiteService.exe and SageTVRecorder.exe to get under the file size limit. Are those even used anymore anyway?

I assume this means people can now use the PC clients and placeshifters without a license using these and a V9 jar?

I think the launcher code is simple enough that there are no VS2015-specific runtime dependencies. I've only tried SageTV.exe on top of a V7.1.9 install on win7 but I think they should run. Hopefully someone on an XP system can verify this.

I've yet to go through all of the numerous DLL's in the SageTV install directory to account for them all. There are many more than what are currently in the VS solution. Some are obviously VS2005 runtime libraries and maybe others are 3rd party available but there are also stv*.dll files that I haven't figured out how to build.

In the end, is it appropriate to host binaries that don't have source code? Theoretically there are DLL's in 7.1.9 that may never need recompiled so we could just add them as needed. Perhaps there are obsolete ones in 7.1.9?
Thanks
It look you need get a hold digtial signature later on

Last edited by SHS; 09-10-2015 at 04:02 PM.
Reply With Quote
  #47  
Old 09-10-2015, 03:53 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
Quote:
Originally Posted by wnjj View Post
I'll have to check into it closer when I get home.

SageTVService is built from the SageLauncher project as a build option (like Client and Placeshifter are). So when I built everything I saw in there I got a SageTVService.exe. I now notice there's also a SageTVServiceControl project in the .sln file that I didn't build. It must have been hiding in the gui.

Is there a SageTVServiceControl.exe in your installed version? I'll probably need to compile that one too it seems.
Yes, it simply is just a method to start/stop or otherwise configure the SageTV service. The service itself can always be controlled by using "net start sagetv" or "net stop sagetv".
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #48  
Old 09-10-2015, 07:30 PM
SHS's Avatar
SHS SHS is offline
Moderator
 
Join Date: Mar 2003
Location: Vinita, Oklahoma
Posts: 4,589
Quote:
Originally Posted by Taddeusz View Post
Ditto on the Client. Placeshifter seems to work ok. SageTVService.exe doesn't seem to work at all. It's really weird actually. It seems to start ok but then in the log it says that Sage.exit() has been called. The exe's stay running but there's no CPU usage on them and the used memory doesn't get any larger.
Yup I'm seeing the same thing as well
Reply With Quote
  #49  
Old 09-11-2015, 11:58 AM
Narflex's Avatar
Narflex Narflex is offline
Sage
 
Join Date: Feb 2003
Location: Redondo Beach, CA
Posts: 6,349
This is very weird....from looking at the log file where it has the stack trace of what's calling SageTV.exit()...there's no origin before that; and the 'main' thread is what's calling it.

On Windows; the EXE is what invokes the JVM and ends up starting up the Sage class; which invokes the SageTV class (and creates a whole bunch of threads from there). Then it leaves the constructor and goes back into the code in the EXE with the JVM still running. It then runs in the Windows message loop, processing messages from there. There is code in that loop to invoke SageTV.exit(); but only upon receiving a specific message (0x400 + 700 is the message code). I didn't find anywhere in the Java code that would send that message. It is sent from the service handle in the EXE if it receives the SERVICE_CONTROL_SHUTDOWN or SERVICE_CONTROL_STOP messages.

So it seems it would be getting one of those messages for some reason. I'm wondering if maybe it's some security thing with Windows where it notices that a service's EXE has been changed from the one that was originally registered to run the service (I'm totally guessing at this). So maybe if the SageTVServiceControl.exe was used to deregister and reregister it; then it might not make it exit like that.....although this wouldn't be that great of security since it's already letting the EXE run and do whatever damage it wants to before kindly asking it to terminate itself.

You can also remove/install the SageTV Service with the SageTVService.exe by just running:

SageTVService.exe -remove
SageTVService.exe -install

That's the first thing I'd try...and if that doesn't work then try adding some more debugging in the EXE itself for that message handler to see what's happening there (and if in fact that is the route that is causing it to be terminated).
__________________
Jeffrey Kardatzke
Google
Founder of SageTV
Reply With Quote
  #50  
Old 09-11-2015, 12:13 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
Quote:
Originally Posted by Narflex View Post
This is very weird....from looking at the log file where it has the stack trace of what's calling SageTV.exit()...there's no origin before that; and the 'main' thread is what's calling it.

On Windows; the EXE is what invokes the JVM and ends up starting up the Sage class; which invokes the SageTV class (and creates a whole bunch of threads from there). Then it leaves the constructor and goes back into the code in the EXE with the JVM still running. It then runs in the Windows message loop, processing messages from there. There is code in that loop to invoke SageTV.exit(); but only upon receiving a specific message (0x400 + 700 is the message code). I didn't find anywhere in the Java code that would send that message. It is sent from the service handle in the EXE if it receives the SERVICE_CONTROL_SHUTDOWN or SERVICE_CONTROL_STOP messages.

So it seems it would be getting one of those messages for some reason. I'm wondering if maybe it's some security thing with Windows where it notices that a service's EXE has been changed from the one that was originally registered to run the service (I'm totally guessing at this). So maybe if the SageTVServiceControl.exe was used to deregister and reregister it; then it might not make it exit like that.....although this wouldn't be that great of security since it's already letting the EXE run and do whatever damage it wants to before kindly asking it to terminate itself.

You can also remove/install the SageTV Service with the SageTVService.exe by just running:

SageTVService.exe -remove
SageTVService.exe -install

That's the first thing I'd try...and if that doesn't work then try adding some more debugging in the EXE itself for that message handler to see what's happening there (and if in fact that is the route that is causing it to be terminated).
Let me regigger my Sage.jar. The stack trace is initiated from the SageTV.java file in the shutdown hook. I'll move it to Sage.exit() and see what I get.
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #51  
Old 09-11-2015, 12:51 PM
wnjj wnjj is offline
Sage Icon
 
Join Date: Jan 2009
Posts: 1,514
I looked into SageTVServiceControl.exe and it turns out I had compiled it but it doesn't have the bright green SageTV icon so I didn't see it in the Release directory.

The problem with rebuilding that is it needs a manifest file to support the elevated UAC permissions needed to install the service. There's no manifest in the current project but even if there was, VS2015 compiling manifests for XP supported EXE's is likely different. I tried a few things and couldn't get it to work properly.

Jeff, since you suggested the SageTVService.exe can install itself via command line options it seems like it too would need a manifest for UAC. I wonder if that is contributing to the issue.
Reply With Quote
  #52  
Old 09-11-2015, 12:55 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
Ok, I think I've discovered some of the confusion. The new SageTVService.exe is not writing to the log. I would guess this means that Sage.jar is not being executed.
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #53  
Old 09-11-2015, 02:28 PM
wnjj wnjj is offline
Sage Icon
 
Join Date: Jan 2009
Posts: 1,514
Quote:
Originally Posted by Taddeusz View Post
Ok, I think I've discovered some of the confusion. The new SageTVService.exe is not writing to the log. I would guess this means that Sage.jar is not being executed.
I wonder if it's something to do with user permissions when launching Java from the service mode? Like I mentioned before, the missing manifest may be affecting this too.
Reply With Quote
  #54  
Old 09-11-2015, 02:32 PM
Taddeusz Taddeusz is offline
SageTVaholic
 
Join Date: Nov 2004
Location: Yukon, OK
Posts: 3,919
Quote:
Originally Posted by wnjj View Post
I wonder if it's something to do with user permissions when launching Java from the service mode? Like I mentioned before, the missing manifest may be affecting this too.
Just checked out the Windows logs and I don't see anything relating to it.
__________________
Server: i5 8400, ASUS Prime H370M-Plus/CSM, 16GB RAM, 15TB drive array + 500GB cache, 2 HDHR's, SageTV 9, unRAID 6.6.3
Client 1: HD300 (latest FW), HDMI to an Insignia 65" 1080p LCD and optical SPDIF to a Sony Receiver
Client 2: HD200 (latest FW), HDMI to an Insignia NS-LCD42HD-09 1080p LCD
Reply With Quote
  #55  
Old 09-11-2015, 02:49 PM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
I have a feeling a Windows manifest issue would prevent it from even launching, not let it start then immediately tell it to stop.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers.
Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA.
Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room
Reply With Quote
  #56  
Old 09-11-2015, 02:54 PM
JREkiwi's Avatar
JREkiwi JREkiwi is offline
Sage Icon
 
Join Date: Jan 2005
Location: Auckland, New Zealand
Posts: 2,132
I seem to recall getting a similar symptom when trying to start the service when I hadn't updated the sagetvservice.exe to the one that allowed V6 keys to be used in V7

Could it be related to the registration checking code?

John
Reply With Quote
  #57  
Old 09-12-2015, 01:14 PM
wnjj wnjj is offline
Sage Icon
 
Join Date: Jan 2009
Posts: 1,514
Quote:
Originally Posted by Taddeusz View Post
Ditto on the Client. Placeshifter seems to work ok. SageTVService.exe doesn't seem to work at all. It's really weird actually. It seems to start ok but then in the log it says that Sage.exit() has been called. The exe's stay running but there's no CPU usage on them and the used memory doesn't get any larger.

Update on this. I tried the service on my fairly clean win7 box. Something was definitely weird with that exe. I could start the service but when I tried to launch SageTV.exe for a UI it hung at "Service initializing...". I also could not seem to stop the service either. I recompiled the service exe with some debug code and then it ran fine. I then removed the debug code (back to the original source) and that worked too. Near as I can tell that build was messed up somehow. I forced a complete rebuild and I think this one may work. I'll attach it here.

Longer term these need hosted somewhere besides a thread and I know stuckless offered his up. For now, I have yet to make a GitHub account so I'll need to sort that out before I can officially contribute.

In the end, building the Windows exe's was pretty straightforward:

1) Install VS2015 Community Edition (it's free)
2) Enable the "Windows XP Support for C++. If you forget, go back via add/remove programs and select 'modify'. It's under Programming Languages|Visual C++
3) Install the latest JDK (32-bit).
4) Define the following environment variables:
... SAGEDEVJDK - <JDK dir> Mine is C:\Program Files (x86)\Java\jdk1.8.0_60
... SAGEDEVREL - <output dir> Directory where the 'release' exes end up
... SAGEDEVDEBUG - <output dir> Directory where the 'debug' exes end up
5) Open SageLauncher.vcproj (the VS2005 project). Click OK to the one-way upgrade.
6) Go into the project properties. At the top, select All Configurations then under Configuration Properties|General, change the Platform Toolset to "Visual Studio 2015 - Windows XP (v140_xp)".
8) Close the properties box then select the exe you want to build using the drop-down on the toolbar. There's Client, Service, etc. for debug and release. The plain old 'Debug' and 'Release' build SageTV.exe.
9) Build each one.

You only need the 'SageLauncher' directory and ..\..\include to be present to build these exe's.

Most of the time I spent previously was getting the DLL's to build. The overall solution file has dependencies on the DLL's when you try to build the exe's. If all we are doing for now is building exe's we can rely on the already-built 7.1.9 DLL's.
Attached Files
File Type: zip SageTV_V9_exe.zip (737.9 KB, 208 views)

Last edited by wnjj; 09-12-2015 at 03:20 PM.
Reply With Quote
  #58  
Old 09-12-2015, 03:13 PM
SHS's Avatar
SHS SHS is offline
Moderator
 
Join Date: Mar 2003
Location: Vinita, Oklahoma
Posts: 4,589
Just thought I let you know wnjj that new SageTVService.exe is working fine on my SageTV Server
You should edited your old post an remove that old zip

Last edited by SHS; 09-12-2015 at 03:17 PM.
Reply With Quote
  #59  
Old 09-12-2015, 03:19 PM
wnjj wnjj is offline
Sage Icon
 
Join Date: Jan 2009
Posts: 1,514
Quote:
Originally Posted by SHS View Post
Just thought I let you know wnjj that new SageTVService.exe is working fine on my SageTV Server
You should edited your old post an remove that old zip
Excellent! I replaced the zip in the old post since other places already refer to it.
Reply With Quote
  #60  
Old 09-12-2015, 03:33 PM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
No, who know show to build a windows installer.. :-)
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers.
Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA.
Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dev Environment Slugger SageTV Studio 10 01-28-2010 04:08 PM
Which is best design for SageTV environment? Petrucci Hardware Support 10 04-23-2009 01:21 PM
Sage Development Environment stuckless SageTV Studio 4 04-05-2008 06:14 AM
Business Environment pmolaughlin SageTV Software 0 02-13-2006 07:58 AM


All times are GMT -6. The time now is 05:51 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.