TelescopeControl: Bad serial port names on Windows

Bug #596167 reported by Neil Maron
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Stellarium
Fix Released
Undecided
Bogdan Marinov

Bug Description

Telescope plugin has an error when opening COM5-COM99. An extra ":" is appended to the device name causing it to fail unless you artificially rename the COM port to have the ":" in the windows name.

Sample log:

2010-06-18T23:16:47
Unsupported Windows version (I'm running this under Windows 7)
Compiled with GCC 4.4.0
Qt runtime version: 4.6.2
Qt compilation version: 4.6.2
Addressing mode: 32-bit
Total memory: 1013 MB (unreliable)
Total virtual memory: 2047 MB (unreliable)
Physical memory in use: 68%
Processor speed: 1596 MHz
Processor name: Intel(R) Atom(TM) CPU N270 @ 1.60GHz
Processor speed: 1596 MHz
Processor name: Intel(R) Atom(TM) CPU N270 @ 1.60GHz
C:\Program Files\Stellarium\stellarium.exe
 -------------------------------------------------------
[ This is Stellarium 0.10.5 - http://www.stellarium.org ]
[ Copyright (C) 2000-2010 Fabien Chereau et al ]
 -------------------------------------------------------
Writing log file to: "C:/Users/Neil1/AppData/Roaming/Stellarium/log.txt"
File search paths:
  0 . "C:\Users\Neil1\AppData\Roaming\Stellarium"
  1 . "."
Attempting to use an existing older config file.
Config file is: "C:\Users\Neil1\AppData\Roaming\Stellarium/config.ini"
WARNING StelFileMgr::setScreenshotDir dir is not writable: "C:/Users/Neil1/Desktop"
WARNING: problem while setting screenshot from config file setting: NOT_VALID
Qt GL paint engine is: "OpenGL"
Cache directory is: "C:\Users\Neil1\AppData\Local\stellarium\stellarium\cache"
Sky language is "en"
Application language is "en"
Loading Solar System data ...
Loaded 38 / 38 planet orbits
Loading star data ...
"Loading "./stars/default/stars_0_0v0_1.cat": 0_0v0_1; 5013"
"Loading "./stars/default/stars_1_0v0_1.cat": 1_0v0_1; 21999"
"Loading "./stars/default/stars_2_0v0_1.cat": 2_0v0_1; 151416"
"Loading "./stars/default/stars_3_1v0_0.cat": 3_1v0_0; 434064"
"Loading "C:\Users\Neil1\AppData\Roaming\Stellarium/stars/default/stars_4_1v0_0.cat": 4_1v0_0; 1725497"
"Loading "C:\Users\Neil1\AppData\Roaming\Stellarium/stars/default/stars_5_2v0_0.cat": 5_2v0_0; 7669011"
"Loading "C:\Users\Neil1\AppData\Roaming\Stellarium/stars/default/stars_6_2v0_0.cat": 6_2v0_0; 26615233"
"Loading "C:\Users\Neil1\AppData\Roaming\Stellarium/stars/default/stars_7_2v0_0.cat": 7_2v0_0; 57826266"
Finished loading star catalogue data, max_geodesic_level: 7
navigation/preset_sky_time is a double - treating as jday: 2.45151e+06
Loaded 10051 NGC records
Loading NGC name data ...
Loaded 222 / 222 NGC name records successfully
Loaded 88 / 88 constellation records successfully for culture "western"
Loaded 85 / 85 constellation art records successfully for culture "western"
Loaded 89 / 89 constellation names
Loading constellation boundary data ...
Loaded 782 constellation boundary segments
Loading star names from "./skycultures/western/star_names.fab"
Loaded 230 / 230 common star names
Loading star names from "./stars/default/name.fab"
Loaded 3215 / 4359 scientific star names
Creating GUI ...
Loaded plugin "TelescopeControl" .
TelescopeControl: No telescope server directory has been found.
TelescopeControl: Only embedded telescope servers are available.
TelescopeControl: Loaded successfully 1 telescopes.
initString: "PICO:TelescopeServerLx200:COM19:500000"
Creating telescope "PICO:TelescopeServerLx200:COM19:500000" ; name/type/params: "PICO" "TelescopeServerLx200" "COM19:500000"
TelescopeClientDirectLx200 paramaters: port, time_delay: "COM19" 500000
ERROR creating TelescopeClientDirectLx200: cannot open serial device "\\.\COM19:" <---The extra ":" is appended here.
TelescopeClient::create(): Unable to create a telescope client.
Unloaded plugin "TelescopeControl" .
Downloaded 0 files (0 kbytes) in a session of 28.99 sec (average of 0 kB/s + 0 files from cache (0 kB)).

Related branches

Revision history for this message
Bogdan Marinov (daggerstab) wrote :

I know which peace of the code does this. I think it happens with serial ports between 10 and 99, though. :) I'll try to release a patch later today.

description: updated
tags: added: telescope-control
removed: comxx plugin telescope
summary: - Telescope plugin has an error when opening COM5-COM99. An extra ":" is
- appended to the device name causing it to fail unless you artificially
- rename the COM port to have the ":" in the windows name.
+ TelescopeControl: Bad serial port names on Windows
Revision history for this message
Bogdan Marinov (daggerstab) wrote :

I have uploaded a patch (with an installer) here:
https://launchpad.net/stellarium/+download

Please try it both with normal and large port numbers and report the results here, so that I can commit the changes in the code to the repository.

Revision history for this message
Neil Maron (neil-maron) wrote : Re: [Bug 596167] Re: TelescopeControl: Bad serial port names on Windows
Download full text (8.9 KiB)

It still doesn't work. COM2 worked. COM19 did not. I think I applied the
patch correctly and here is a listing of the files leading me to think the
patch was installed. If it was then the same problem exists. If is was not
then I need to know what to do.

libstelMain.dll 6/19/2010 6:55 PM - would be your time.
stellarium.exe 6/19/2010 6:55 PM - would be your time.
unins000.dat 6/19/2010 3:52 PM - would be my time.
unins000.exe 6/19/2010 3:52 PM - would be my time.

New log file:
2010-06-19T16:12:25
Unsupported Windows version
Compiled with GCC 4.4.0
Qt runtime version: 4.6.2
Qt compilation version: 4.6.3
Addressing mode: 32-bit
Total memory: 1013 MB (unreliable)
Total virtual memory: 2047 MB (unreliable)
Physical memory in use: 67%
Processor speed: 1596 MHz
Processor name: Intel(R) Atom(TM) CPU N270 @ 1.60GHz
Processor speed: 1596 MHz
Processor name: Intel(R) Atom(TM) CPU N270 @ 1.60GHz
C:\Program Files\Stellarium\stellarium.exe
 -------------------------------------------------------
[ This is Stellarium 0.10.5 - http://www.stellarium.org ]
[ Copyright (C) 2000-2010 Fabien Chereau et al ]
 -------------------------------------------------------
Writing log file to: "C:/Users/Neil1/AppData/Roaming/Stellarium/log.txt"
File search paths:
  0 . "C:\Users\Neil1\AppData\Roaming\Stellarium"
  1 . "."
Attempting to use an existing older config file.
Config file is: "C:\Users\Neil1\AppData\Roaming\Stellarium/config.ini"
WARNING StelFileMgr::setScreenshotDir dir is not writable:
"C:/Users/Neil1/Desktop"
WARNING: problem while setting screenshot from config file setting:
NOT_VALID
Qt GL paint engine is: "OpenGL"
Cache directory is:
"C:\Users\Neil1\AppData\Local\stellarium\stellarium\cache"
Sky language is "en"
Application language is "en"
Loading Solar System data ...
Loaded 38 / 38 planet orbits
Loading star data ...
"Loading "./stars/default/stars_0_0v0_1.cat": 0_0v0_1; 5013"
"Loading "./stars/default/stars_1_0v0_1.cat": 1_0v0_1; 21999"
"Loading "./stars/default/stars_2_0v0_1.cat": 2_0v0_1; 151416"
"Loading "./stars/default/stars_3_1v0_0.cat": 3_1v0_0; 434064"
"Loading "C:\Users\Neil1\AppData\Roaming\Stellarium/stars/default/
stars_4_1v0_0.cat": 4_1v0_0; 1725497"
"Loading "C:\Users\Neil1\AppData\Roaming\Stellarium/stars/default/
stars_5_2v0_0.cat": 5_2v0_0; 7669011"
"Loading "C:\Users\Neil1\AppData\Roaming\Stellarium/stars/default/
stars_6_2v0_0.cat": 6_2v0_0; 26615233"
"Loading "C:\Users\Neil1\AppData\Roaming\Stellarium/stars/default/
stars_7_2v0_0.cat": 7_2v0_0; 57826266"
Finished loading star catalogue data, max_geodesic_level: 7
navigation/preset_sky_time is a double - treating as jday: 2.45151e+06
Loaded 10051 NGC records
Loading NGC name data ...
Loaded 222 / 222 NGC name records successfully
Loaded 88 / 88 constellation records successfully for culture "western"
Loaded 85 / 85 constellation art records successfully for culture "western"
Loaded 89 / 89 constellation names
Loading constellation boundary data ...
Loaded 782 constellation boundary segments
Loading star names from "./skycultures/western/star_names.fab"
Loaded 230 / 230 common star names
Loading star names from "./star...

Read more...

Revision history for this message
Peter Mousley (scrupeus) wrote : Re: [Bug 596167] Re: TelescopeControl: Bad serial port names on Windows

On 20/06/2010 2:19, Bogdan Marinov wrote:
> I have uploaded a patch (with an installer) here:
> https://launchpad.net/stellarium/+download
>
> Please try it both with normal and large port numbers and report the
> results here, so that I can commit the changes in the code to the
> repository.
>
>
Bogdan,

As reported by Neil, it's not working. The attached patch should (and
does for me) though - remove addition of ":" to the comm port name.
Pls note that I haven't tested with an external server, only the
built-in one using ports < and > 10.

Peter

Revision history for this message
Bogdan Marinov (daggerstab) wrote :

Thanks, Peter - your patch is exactly what I thought I had done, but it turns out that I have modified only TelescopeControl.cpp. :( Reminder to self - don't write code late in the evening and/or while tired.

Revision history for this message
Bogdan Marinov (daggerstab) wrote :

I have uploaded a new version of the patch to the same place. It should work now.

Revision history for this message
Peter Mousley (scrupeus) wrote :

On 20/06/2010 15:10, Bogdan Marinov wrote:
> Thanks, Peter - your patch is exactly what I thought I had done, but it
> turns out that I have modified only TelescopeControl.cpp. :( Reminder to
> self - don't write code late in the evening and/or while tired.
>
>
Good advice to yourself, but I bet you ignore it ;)

Revision history for this message
Peter Mousley (scrupeus) wrote :

On 20/06/2010 17:13, Bogdan Marinov wrote:
> I have uploaded a new version of the patch to the same place. It should
> work now.
>
>
You can imagine my surprise when it didn't work... After some
frustration I realised I'd applied the original patch :(
New patch okay. (Again, that is only with the built-in server and only
on XP.)

Did find another bug though...

If the scope is set to auto connect at start up and the connection fails
(serial port not available for example), the scope is removed from the
list of available scopes. It then needs to be re-created.

Attached patch seems to fix it (see comments in patch). I don't know if
there are any other side effects but I'll leave it to you think about.

Peter

Revision history for this message
Neil Maron (neil-maron) wrote : Re: [Bug 596167] Re: TelescopeControl: Bad serial port names on Windows
Download full text (5.4 KiB)

Good news. The patch worked this time. I did notice the other bug that the
scope was being removed from the list but I didn't know if that was just a
feature. It'll be good to have it all running. Thank you. I'll keep you
posted on any other "features". Nice work.
--Neil

On Sun, Jun 20, 2010 at 8:28 AM, Peter Mousley <email address hidden>wrote:

> On 20/06/2010 17:13, Bogdan Marinov wrote:
> > I have uploaded a new version of the patch to the same place. It should
> > work now.
> >
> >
> You can imagine my surprise when it didn't work... After some
> frustration I realised I'd applied the original patch :(
> New patch okay. (Again, that is only with the built-in server and only
> on XP.)
>
> Did find another bug though...
>
> If the scope is set to auto connect at start up and the connection fails
> (serial port not available for example), the scope is removed from the
> list of available scopes. It then needs to be re-created.
>
> Attached patch seems to fix it (see comments in patch). I don't know if
> there are any other side effects but I'll leave it to you think about.
>
> Peter
>
>
> ** Attachment added: "fix-scope-auto-connect.patch"
> http://launchpadlibrarian.net/50635423/fix-scope-auto-connect.patch
>
> --
> TelescopeControl: Bad serial port names on Windows
> https://bugs.launchpad.net/bugs/596167
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in Stellarium: New
>
> Bug description:
> Telescope plugin has an error when opening COM5-COM99. An extra ":" is
> appended to the device name causing it to fail unless you artificially
> rename the COM port to have the ":" in the windows name.
>
> Sample log:
>
> 2010-06-18T23:16:47
> Unsupported Windows version (I'm running this under Windows 7)
> Compiled with GCC 4.4.0
> Qt runtime version: 4.6.2
> Qt compilation version: 4.6.2
> Addressing mode: 32-bit
> Total memory: 1013 MB (unreliable)
> Total virtual memory: 2047 MB (unreliable)
> Physical memory in use: 68%
> Processor speed: 1596 MHz
> Processor name: Intel(R) Atom(TM) CPU N270 @ 1.60GHz
> Processor speed: 1596 MHz
> Processor name: Intel(R) Atom(TM) CPU N270 @ 1.60GHz
> C:\Program Files\Stellarium\stellarium.exe
> -------------------------------------------------------
> [ This is Stellarium 0.10.5 - http://www.stellarium.org ]
> [ Copyright (C) 2000-2010 Fabien Chereau et al ]
> -------------------------------------------------------
> Writing log file to: "C:/Users/Neil1/AppData/Roaming/Stellarium/log.txt"
> File search paths:
> 0 . "C:\Users\Neil1\AppData\Roaming\Stellarium"
> 1 . "."
> Attempting to use an existing older config file.
> Config file is: "C:\Users\Neil1\AppData\Roaming\Stellarium/config.ini"
> WARNING StelFileMgr::setScreenshotDir dir is not writable:
> "C:/Users/Neil1/Desktop"
> WARNING: problem while setting screenshot from config file setting:
> NOT_VALID
> Qt GL paint engine is: "OpenGL"
> Cache directory is:
> "C:\Users\Neil1\AppData\Local\stellarium\stellarium\cache"
> Sky language is "en"
> Application language is "en"
> Loading Solar System data ...
> Loaded 38 / 38 planet orbits
> Loading star data ...
> "Loading "....

Read more...

Revision history for this message
Bogdan Marinov (daggerstab) wrote :

Fix committed as revision 4715 of the trunk branch in Stellarium's Bazaar repository at Launchpad:
http://bazaar.launchpad.net/~stellarium/stellarium/trunk/revision/4714

Changed in stellarium:
assignee: nobody → Bogdan Marinov (daggerstab)
status: New → Fix Committed
Changed in stellarium:
milestone: none → 0.10.6
Changed in stellarium:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.