Tíquete #46418

Server crashing on startup in Windows

: 2023-01-02 05:09 Última Atualização: 2023-01-02 19:47

Relator:
Dono:
Tipo:
Estado:
Fechado
Componente:
Marcos:
Prioridade:
7
Gravidade:
5 - Medium
Resolução:
Fixed
Arquivo:
9

Details

Server crashes on Windows.

init_nls() gets first called before fc_support_init() that initializes support mutexes, including that of fallback fc_vsnprintf() implementation used on Windows. Another Windows specialty in play is that init_nls() might call fc_vsnprintf() for LANG setup.

Ticket History (3/18 Histories)

2023-01-02 05:09 Updated by: cazfi
  • New Ticket "Server crashing on startup in Windows" created
2023-01-02 05:49 Updated by: cazfi
  • Prioridade Update from 5 - Medium to 7
Comentário

Patch for master attached.

Will treat this issue as emergency build fix - no review period required before I may push fixes in. Given how long autotools based Windows builds take, I may even test only that fixes don't break linux, not that they really fix Windows, before pushing them in.

2023-01-02 06:13 Updated by: cazfi
Comentário

S3_1 version attached

2023-01-02 06:30 Updated by: cazfi
  • Dono Update from (Nenhum) to cazfi
  • Resolução Update from Nenhum to Accepted
  • Marco Update from (Nenhum) to 3.0.6 (fechado)
Comentário

S3_0 and S2_6 versions.

2023-01-02 12:26 Updated by: cazfi
Comentário

It seems that much bigger rearrangements are needed for fixing all the cases, and also the deinitialization part.

Attached new master version. Changes listed in commit message:

- fc_interface_init() renamed as libfreeciv_init()
- free_libfreeciv() renamed as libfreeciv_free()
- libfreeciv_init() takes a parameter telling if fc_interface check should be done, so programs without fc_interface can use it
- libfreciv_init() call added to modpack installer
- In other programs libfreeciv_init() call moved earlier, as needed
- init_nls() / free_nls() calls moved inside libfreeciv_init() / libfreeciv_free() to have them exactly right time

2023-01-02 13:22 Updated by: cazfi
Comentário

Another version for master, with unnecessary include removed. Up-to-date patches for all the other branches too.

2023-01-02 13:36 Updated by: cazfi
Comentário

I already know this still crashes on exit in Windows, but that's a minor issue compared to crash on start -> likely leave to a later ticket, and get forward with this.

2023-01-02 14:29 Updated by: cazfi
  • Estado Update from Aberto to Fechado
  • Resolução Update from Accepted to Fixed
2023-01-02 19:47 Updated by: cazfi
Comentário

Reply To cazfi

I already know this still crashes on exit in Windows, but that's a minor issue compared to crash on start -> likely leave to a later ticket, and get forward with this.

-> #46426

Editar

Please login to add comment to this ticket » Login