Segfault in OstcFirmwareCheck::checkLatest

Jan Mulder jan at
Sun Jan 12 11:34:41 PST 2020

When downloading from an OSTC4, I get the same error. A little 
investigation shows that in OstcFirmwareCheck::parseOstcFwVersion() a 
very unexpected string is parsed:

<head><title>301 Moved Permanently</title></head>
<center><h1>301 Moved Permanently"

where we expect a string like "[1.5.1]", being the first line in the file.

So, the problem is not data returned from the DC, but from the webserver 
(and totally unprotected parsing at Subsurface end). But, interestingly, 
visiting the mentioned changelog file from a browser (or curl), all 
looks just fine.

@Matthias: any recent change at HW's webserver end that might cause this?


On 11-01-2020 03:51, Gaetan Bisson wrote:
> Hi Anton,
> [2020-01-10 23:27:04 +0100] Anton Lundin:
>> On 09 January, 2020 - Gaetan Bisson wrote:
>>> Hi Anton,
>>> [2020-01-09 20:47:59 +0100] Anton Lundin:
>>>> So, can you re-run this and provide a libdivecomptuer logfile? I'd like
>>>> to see what the device actually says.
>>> Please find the log file attached. Let me know if there's anything else
>>> you'd like to know/have.
>>> Subsurface: v4.9.3-733-g042799eb2a4e, built with libdivecomputer v0.7.0-devel-Subsurface-NG (4eb34b1466e7dff3ee2c0dfbeeef3642c2166d8c)
>>> INFO: Open: name=/dev/ttyUSB0
>>> INFO: Configure: baudrate=115200, databits=8, parity=0, stopbits=0, flowcontrol=0
>>> INFO: Timeout: value=3000
>>> INFO: Sleep: value=300
>>> INFO: Purge: direction=3
>>> INFO: Write: size=1, data=BB
>>> INFO: Read: size=1, data=BB
>>> INFO: Read: size=1, data=4D
>>> INFO: Write: size=1, data=60
>>> INFO: Read: size=1, data=60
>>> INFO: Read: size=5, data=000A000000
>>> INFO: Read: size=1, data=4D
>>> INFO: Write: size=1, data=69
>>> INFO: Read: size=1, data=69
>>> INFO: Read: size=64, data=090A03074857204F5354432020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020
>>> INFO: Read: size=1, data=4D
>>> Event: model=10 (0x0000000a), firmware=775 (0x00000307), serial=2569 (0x00000a09)
>> The mind boggles. This device clearly identifies itself as a OSTC 3.
>> How can strcmp(data->product, "OSTC 4") == 0 be true then?
> Sorry but the device isn't with me right now.
> I'll double check later this weekend.
> Cheers.

More information about the subsurface mailing list