• Tracker

    Spaces
    Browse
    Statistics
  • /
  • /Stable Feedback
  • /DZG-3139
Back
1

RenderTargetWidget + SetWidgetWorld() crashes the client every time (access violation, read at 0x0)

CrashClientModded
1

State

Open
Issue key
DZG-3139
Access
Public
Space
DayZ
Project
Stable Feedback
Creator
zodiacal
Created
Dec 3, 2026
Views
3
Platform
PC Steam
What happened?
`RenderTargetWidget` and `SetWidgetWorld()` are part of the public script API (`scripts/1_Core/proto/EnWidgets.c`).
The `GAME_TEMPLATE` `RenderTarget` class (`scripts/2_GameLib/entities/RenderTarget.c`) uses them the same way.
In DayZ, creating a `RenderTargetWidget` and calling `SetWidgetWorld()` on it crashes the client on the next frame,
every time. It crashes in the main menu and in game, with camera 0 and with camera 1.

**Expected:** the widget shows the view of the given camera (a second view, picture-in-picture), or the call is refused
with a script error.

**Actual:** unhandled exception, "Access violation. Illegal read ... at 0x0". The game closes.
Reproduction steps
1. Unzip `RTCrashRepro_1.30.164423.zip`.
2. Start `DayZ_x64.exe -mod=<path>\@RTCrashRepro -nolauncher` (BattlEye not needed: main menu only).
3. Wait in the main menu. About 5 s after it appears, the mod runs:
   ```c
   RenderTargetWidget rt = RenderTargetWidget.Cast(GetGame().GetWorkspace().CreateWidget(RenderTargetWidgetTypeID,
       40, 40, 480, 270, WidgetFlags.VISIBLE | WidgetFlags.EXACTPOS | WidgetFlags.EXACTSIZE, ARGB(255, 255, 255, 255), 960));
   SetWidgetWorld(rt, anEntity, 0);   // DayZ has no GetWorldEntity(); any entity gives the same result
   rt.SetRefresh(1, 0);
   ```
4. The client crashes on the next frame.

Variant: with `-rtcam=1` the mod first sets camera 1 up (`SetCameraType(1, CameraType.PERSPECTIVE)`,
`SetCameraNearPlane(1, 0.1)`, `SetCameraFarPlane(1, 2000)`, `SetCameraVerticalFOV(1, 0.8)`, `SetCamera(1, pos, angles)`)
and then uses camera 1: same crash.
Exact build version (optional)
1.30.164423
Where did it happen?
Community
Is it modded?
No
Expected result
A working `RenderTargetWidget` would let mods make picture-in-picture scopes, vehicle mirrors, security-camera screens
and in-game camera items. Together with DZG-2402 (`MakeScreenshot()` only works with `-autotest`) it would also make
in-game photos possible.

Related: https://report.bistudio.com/issues/DZG-2402
Public attachments4 files · visible to everyone

crash_diag_camera0.log

1.2 KB

crash_retail_camera0.log

1.2 KB

crash_retail_camera1.log

1.2 KB

RTCrashRepro_1_30_164423.zip

3.6 KB

Reactions

Activity

    20 minutes ago
  • zodiacal
    created issue20 minutes ago

You are not signed in. Please sign in to see more details and to reply.

State

Open
Issue key
DZG-3139
Access
Public
Space
DayZ
Project
Stable Feedback
Creator
zodiacal
Created
Dec 3, 2026
Views
3