View Issue Details

IDProjectCategoryView StatusLast Update
0005376The Dark ModCodingpublic24.12.2022 09:29
Reportergrayman Assigned To 
PrioritynormalSeveritycrashReproducibilityalways
Status acknowledgedResolutionopen 
Summary0005376: Quiet crash when switching between FMs if a script has syntax problems
DescriptionWhen TDM is trying to load a new mission, if there are syntax problems with the <mymission>.script file, TDM can quietly crash without saying why.

It would be nice if TDM's script parser identified when there's a syntax problem, and displayed a message saying so, w/o just going away. The exact location in the script file would be nice, but the minimum would be to declare that there's a problem with the script file.

This can save time for those of us who include lots of scripting in our missions, but occasionally screw up a nested comment or some other syntax problem.

Thanks.
Steps To Reproduce1) Make sure your currentfm.txt is blank. Download the attached 5376.pk4 FM and place it in your darkmod/fms folder. This is an FM with a script bug in the script folder (missing semicolon on line 6).
2) Start TDM, click on New Mission, you get a message telling you there's a new FM "5376", select this FM in the list and restart TDM.
3) TDM will restart, but quietly crashes with no error message about the script. Terminate the process i.e. via task manager.
4) Start TDM again, this time via the .exe. Now you get the usual script error message (see attached .txt) and TDM won't start.
TagsNo tags attached.

Activities

Dragofer

Dragofer

24.12.2022 08:43

developer   ~0015630

Last edited: 24.12.2022 09:29

I believe what is meant here is that if you use the ingame menu to switch TDM to a new FM with an error in a .script file in the /script folder (i.e. missing ; or undefined variable) and let TDM try to restart itself, TDM won't give you an error window and will just get frozen during startup
Dragofer

Dragofer

24.12.2022 09:17

developer   ~0015631

Last edited: 24.12.2022 09:18

Added reproduction steps and a test FM.
5376_error.txt (6,054 bytes)   
TDM 2.11/64 #10189 (1435:10189) win-x86_64 Dec  1 2022 21:15:44
2808 MHz Intel CPU with SSE & SSE2 & SSE3 & SSSE3 & SSE41 & AVX & AVX2 & FMA3
Winsock Initialized
Found interface: {6A5A4A31-F2EA-42A1-A9DA-78FA0E3E2576} Realtek PCIe GbE Family Controller - 0.0.0.0 NULL netmask - skipped
Found interface: {49355B32-B9DA-4AD9-830C-D8E339AEAEA6} Bluetooth Device (Personal Area Network) - 0.0.0.0 NULL netmask - skipped
Found interface: {74E4A9D4-9F7B-4AAB-9BEC-8D181EA7B038} Wintun Userspace Tunnel - 0.0.0.0 NULL netmask - skipped
Found interface: {9020DA5A-6C67-4FC7-8067-DC7E732A12B2} TAP-Windows Adapter V9 - 0.0.0.0 NULL netmask - skipped
Found interface: {FE23C381-270F-46CE-BE84-2E65F273DA19} Realtek RTL8821AU Wireless LAN 802.11ac USB 2.0 Network Adapter - 192.168.0.197/255.255.255.0
Found interface: {195C9D81-F68C-4A97-B8CA-A2A02A607C87} Microsoft Wi-Fi Direct Virtual Adapter - 0.0.0.0 NULL netmask - skipped
Found interface: {F6EE1C6C-75BF-4784-A59D-329488562D54} Microsoft Wi-Fi Direct Virtual Adapter #2 - 0.0.0.0 NULL netmask - skipped
Sys_InitNetworking: adding loopback interface
Found Intel CPU, features: SSE SSE2 SSE3 SSSE3 SSE41 AVX AVX2 FMA3
TDM using AVX2 for SIMD processing.
Found 0 new missions and 0 packages.
------ Initializing File System ------
Current search path:
  [M] D:\Personal\darkmod_svn/fms/5376
  [M] D:\Personal\darkmod_svn\fms\5376\5376.pk4 (8 files - 0x56b2841f)
  [C] D:\Personal\darkmod_svn/
File System Initialized.
--------------------------------------
Couldn't open journal files
----- Initializing Decls -----
------------------------------
I18N: SetLanguage: 'english'.
I18N: Found no character remapping for english.
I18N: 1320 strings read from strings/english.lang
I18N: 'strings/fm/english.lang' not found.
execing default.cfg
Gamepad modifier button assigned to 6
execing Darkmod.cfg
execing DarkmodKeybinds.cfg
log file 'qconsole.log' opened on Sat Dec 24 10:15:57 2022

execing DarkmodPadbinds.cfg
Gamepad modifier button assigned to 6
execing autoexec.cfg
I18N: SetLanguage: 'english'.
I18N: Found no character remapping for english.
I18N: 1320 strings read from strings/english.lang
I18N: 'strings/fm/english.lang' not found.
----- Initializing OpenAL -----
Setup OpenAL device and context
OpenAL: found device 'OpenAL Soft on Headphones (2- High Definition Audio Device)' [ACTIVE]
OpenAL: found device 'OpenAL Soft on Speakers (2- High Definition Audio Device)'
OpenAL: found device 'OpenAL Soft on Digital Audio (HDMI) (High Definition Audio Device)'
OpenAL: device 'OpenAL Soft on Headphones (2- High Definition Audio Device)' opened successfully
OpenAL: HRTF is available
OpenAL vendor: OpenAL Community
OpenAL renderer: OpenAL Soft
OpenAL version: 1.1 ALSOFT 1.21.1
OpenAL: found EFX extension
OpenAL: HRTF is enabled (reason: 4 = ALC_HRTF_HEADPHONES_DETECTED_SOFT)
OpenAL: found 256 hardware voices
----- Initializing OpenGL -----
Initializing OpenGL subsystem
...getting default gamma ramp: success
...registered window class
...registered fake window class
...created window @ 3,313 (1298x767)
Initializing OpenGL driver
...getting DC: succeeded
...PIXELFORMAT 11 selected
...creating GL context: core-fc 
...making context current: succeeded
...initializing QGL

------- Input Initialization -------
Initializing DirectInput...
mouse: DirectInput initialized.
keyboard: DirectInput initialized.
------------------------------------
OpenGL vendor: ATI Technologies Inc.
OpenGL renderer: AMD Radeon(TM) RX460
OpenGL version: 3.3.14800 Core Profile Forward-Compatible Context 22.5.1 30.0.15021.11005 core
Checking required OpenGL features...
v - using GL_VERSION_3_3
v - using GL_EXT_texture_compression_s3tc
v - using WGL_VERSION_1_0
v - using WGL_ARB_pixel_format
Checking optional OpenGL extensions...
v - using GL_EXT_texture_filter_anisotropic
    maxTextureAnisotropy: 16.000000
v - using GL_ARB_stencil_texturing
v - using GL_EXT_depth_bounds_test
v - using GL_ARB_buffer_storage
v - using GL_ARB_texture_storage
v - using GL_ARB_multi_draw_indirect
v - using GL_ARB_vertex_attrib_binding
X - GL_ARB_compatibility not found
v - using GL_KHR_debug
v - using WGL_EXT_swap_control
Max active texture units in fragment shader: 32
Max combined texture units: 160
Max anti-aliasing samples: 8
Max geometry output vertices: 1023
Max geometry output components: 4095
Max vertex attribs: 29
---------- R_ReloadGLSLPrograms_f -----------
Linking GLSL program cubeMap ...
Linking GLSL program bumpyEnvironment ...
Linking GLSL program depthAlpha ...
Linking GLSL program fog ...
Linking GLSL program oldStage ...
Linking GLSL program blend ...
Linking GLSL program stencilshadow ...
Linking GLSL program shadowMapA ...
Linking GLSL program ambientInteraction ...
Linking GLSL program interactionStencil ...
Linking GLSL program interactionShadowMaps ...
Linking GLSL program interactionMultiLight ...
Linking GLSL program frob ...
Linking GLSL program soft_particle ...
Linking GLSL program tonemap ...
Linking GLSL program gaussian_blur ...
Linking GLSL program testImageCube ...
---------------------------------
Font fonts/english/stone in size 12 not found, using size 24 instead.
--------- Initializing Game ----------
The Dark Mod 2.11/64, win-x86_64, code revision 10189
Build date: Dec  1 2022
Initializing event system
...873 event definitions
Initializing class hierarchy
...172 classes, 866016 bytes for event callbacks
Initializing scripts
--------- Game Map Shutdown ----------
--------- Game Map Shutdown done -----
ERROR:Error: file script/tdm_bug.script, line 6: expected ';', found '}'


--------------------------------------
Error during initialization. Error: file script/tdm_bug.script, line 6: expected ';', found '}'


Shutting down OpenGL subsystem
...wglMakeCurrent( NULL, NULL ): success
...deleting GL context: success
...releasing DC: success
...destroying window
...restoring hardware gamma: success
...shutting down QGL
5376_error.txt (6,054 bytes)   
5376.pk4 (4,824 bytes)

Issue History

Date Modified Username Field Change
01.11.2020 17:54 grayman New Issue
24.12.2022 08:43 Dragofer Note Added: 0015630
24.12.2022 09:17 Dragofer Steps to Reproduce Updated
24.12.2022 09:17 Dragofer Note Added: 0015631
24.12.2022 09:17 Dragofer File Added: 5376_error.txt
24.12.2022 09:17 Dragofer File Added: 5376.pk4
24.12.2022 09:17 Dragofer Status new => acknowledged
24.12.2022 09:17 Dragofer Steps to Reproduce Updated
24.12.2022 09:18 Dragofer Note Edited: 0015631
24.12.2022 09:19 Dragofer Summary Quiet crash if a script has syntax problems => Quiet crash when switching between FMs if a script has syntax problems
24.12.2022 09:29 Dragofer Note Edited: 0015630