Page MenuHomeFeedback Tracker

Invalid #include should not crash the game
Closed, ResolvedPublic


Currently an <b>#include</b> preprocessor directive pointing to a non-existent file will terminate the game with a message box informing you that:
<i>Include file C:\Users\Deadfast\Documents\Arma 3 Alpha\missions\test.Stratis\defines.hpp not found.</i>

This happens no matter whether the #include is in a config.cpp, description.ext or a script file.

Instead, this should be handled via in in-game error message, similar to the one displayed when you try to execVM or preprocessFile a file that does not exist.


Legacy ID
Operating System
Windows 7
Feature Request
Steps To Reproduce
  1. Create a mission and save it.
  2. Create <b>init.sqf</b> in the mission's directory
  3. Put the following in <b>init.sqf</b>: <i>#include "doesnotexist.hpp"</i>
  4. Start the mission
  5. Observe the game crashing with an error message

Event Timeline

Deadfast edited Steps To Reproduce. (Show Details)Jun 16 2013, 1:13 PM
Deadfast edited Additional Information. (Show Details)
Deadfast set Category to Feature Request.
Deadfast set Reproducibility to Always.
Deadfast set Severity to None.
Deadfast set Resolution to Open.
Deadfast set Legacy ID to 4100589414.May 7 2016, 2:37 PM
Bohemia added a subscriber: AD2001.Jun 16 2013, 1:13 PM

It has been 3 months, and there's still issues with this. This issue also happens if you simply have an error in a .hpp file or whatever.
I was working on something yesterday, and then stopped without finishing my line that I was writing.

Forgot about it, loaded the mission, and boom:
This is really bad. If anything, just show an in game error message, and unload/don't load the mission... Having to restart the entire game is ridiculous.

Uhh, shouldn't you be posting yours as a duplicate to this? This issue is way older than yours, and it's kind-of related, where your game crashes, but your issue is about the include path itself not allowing you to go up a level.

Well, my issue is 50% about not being able to go one level and 50% game crashing. I just posted the link as a heads up in case anyone else finds this issue.

dedmen closed this task as Resolved.EditedAug 8 2020, 4:04 PM
dedmen claimed this task.
dedmen added a subscriber: dedmen.

Fixed in description.ext in 1.99
Rest is very likely "won't fix"

dedmen reopened this task as New.Aug 8 2020, 4:05 PM
dedmen removed dedmen as the assignee of this task.

Fixed: Crash when trying to host a server if a non-existent include exists in an exported PBO - FT-T139189
Fixed: Forced crash on broken #include when trying to host a server - FT-139189
Fixed: #include in description.ext was failing on files outside of a scenario's PBO - FT-T77179

Issue is probably fixed

LouMontana closed this task as Resolved.May 3 2021, 11:27 AM
LouMontana updated the task description. (Show Details)
LouMontana changed Resolution from Open to Fixed.
LouMontana edited Steps To Reproduce. (Show Details)
LouMontana edited Additional Information. (Show Details)
LouMontana set Operating System to Windows 7.