1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-03 17:54:06 +00:00
jvoisin 534e20cf3a Replace another assert with a throw
It fixes the following crash:

```nasm
[----------------------------------registers-----------------------------------]
RAX: 0xffffffffffffffe4
RBX: 0x7fffffffbd88 --> 0x0
RCX: 0x555555861f01 --> 0xd6000055555582fa
RDX: 0x1
RSI: 0x0
RDI: 0xff
RBP: 0x2e94
RSP: 0x7fffffff9bb0 --> 0x0
RIP: 0x55555574e286 (<_ZN4ESM44Cell4loadERNS_6ReaderE+182>:	mov    eax,DWORD PTR [rax+0xc])
R8 : 0x0
R9 : 0x555555836bd0 --> 0x555555861f90 --> 0x100000000000000
R10: 0xffffffff
R11: 0x0
R12: 0x7fffffffbd88 --> 0x0
R13: 0x7fffffffbd30 --> 0x7fffffffbd28 --> 0xff0001
R14: 0x7fffffff9da0 --> 0x10fc
R15: 0x7fffffff9ea8 --> 0x7fffffff9eb8 --> 0x0
EFLAGS: 0x10206 (carry PARITY adjust zero sign trap INTERRUPT direction overflow)
[-------------------------------------code-------------------------------------]
   0x55555574e27c <_ZN4ESM44Cell4loadERNS_6ReaderE+172>:	mov    rdi,r12
   0x55555574e27f <_ZN4ESM44Cell4loadERNS_6ReaderE+175>:	xor    esi,esi
   0x55555574e281 <_ZN4ESM44Cell4loadERNS_6ReaderE+177>:	call   0x5555557edfb0 <_ZNK4ESM46Reader3grpEm>
=> 0x55555574e286 <_ZN4ESM44Cell4loadERNS_6ReaderE+182>:	mov    eax,DWORD PTR [rax+0xc]
   0x55555574e289 <_ZN4ESM44Cell4loadERNS_6ReaderE+185>:	cmp    eax,0xff
   0x55555574e28e <_ZN4ESM44Cell4loadERNS_6ReaderE+190>:	ja     0x55555574e314 <_ZN4ESM44Cell4loadERNS_6ReaderE+324>
   0x55555574e294 <_ZN4ESM44Cell4loadERNS_6ReaderE+196>:	cmp    al,0x5
   0x55555574e296 <_ZN4ESM44Cell4loadERNS_6ReaderE+198>:	jne    0x55555574e314 <_ZN4ESM44Cell4loadERNS_6ReaderE+324>
[------------------------------------stack-------------------------------------]
0000| 0x7fffffff9bb0 --> 0x0
0008| 0x7fffffff9bb8 --> 0x0
0016| 0x7fffffff9bc0 --> 0x0
0024| 0x7fffffff9bc8 --> 0x0
0032| 0x7fffffff9bd0 --> 0x0
0040| 0x7fffffff9bd8 --> 0x0
0048| 0x7fffffff9be0 --> 0x0
0056| 0x7fffffff9be8 --> 0x0
[------------------------------------------------------------------------------]
Legend: code, data, rodata, value
Stopped reason: SIGSEGV
0x000055555574e286 in ESM4::Cell::load (this=0x7fffffff9da0, reader=...) at /home/jvoisin/dev/openmw/openmw/components/esm4/loadcell.cpp:68
68	   if (reader.grp().type == ESM4::Grp_ExteriorSubCell && reader.grp().label.grid[1] == 0
gdb-peda$ bt
    this=<optimized out>, reader=...) at /home/jvoisin/dev/openmw/openmw/apps/esmtool/tes4.cpp:547
    recordInvocable=...) at /home/jvoisin/dev/openmw/openmw/./components/esm4/readerutils.hpp:31
    at /home/jvoisin/dev/openmw/openmw/./components/esm4/readerutils.hpp:23
    at ../csu/libc-start.c:381
```
2023-05-21 20:07:52 +02:00
..
2023-04-09 00:23:32 +02:00
2022-09-22 21:35:26 +03:00
2023-04-09 00:23:32 +02:00
2023-04-09 00:23:32 +02:00
2023-04-09 00:23:32 +02:00
2023-04-30 16:26:03 +02:00
2022-09-22 21:35:26 +03:00
2022-09-22 21:35:26 +03:00
2023-04-09 18:52:11 +02:00
2023-04-09 18:52:11 +02:00
2023-04-09 18:52:11 +02:00
2023-04-09 18:52:11 +02:00
2022-09-22 21:35:26 +03:00
2023-04-09 18:52:11 +02:00
2023-04-09 18:52:11 +02:00
2022-09-22 21:35:26 +03:00
2022-09-22 21:35:26 +03:00
2022-09-22 21:35:26 +03:00
2023-04-09 18:52:11 +02:00
2023-04-09 18:52:11 +02:00
2022-09-22 21:35:26 +03:00
2023-04-09 18:52:11 +02:00
2023-04-09 18:52:11 +02:00
2023-05-12 22:05:54 +02:00
2022-09-22 21:35:26 +03:00
2022-09-22 21:35:26 +03:00
2023-04-09 18:52:11 +02:00
2023-04-09 18:52:11 +02:00
2023-04-09 18:52:11 +02:00
2023-04-09 18:52:11 +02:00
2022-09-22 21:35:26 +03:00
2022-10-09 16:44:18 +02:00
2022-09-22 21:35:26 +03:00
2023-04-09 18:52:11 +02:00
2023-04-09 18:52:11 +02:00
2022-09-22 21:35:26 +03:00
2022-09-22 21:35:26 +03:00
2022-09-22 21:35:26 +03:00
2022-09-22 21:35:26 +03:00
2022-09-22 21:35:26 +03:00
2023-05-17 22:59:34 +02:00
2023-05-17 22:59:34 +02:00
2022-09-22 21:35:26 +03:00
2023-04-30 16:26:03 +02:00
2022-09-22 21:35:26 +03:00
2022-09-22 21:35:26 +03:00
2023-05-17 22:59:34 +02:00
2023-05-17 22:59:34 +02:00
2022-09-22 21:35:26 +03:00
2022-09-22 21:35:26 +03:00
2022-10-09 16:44:18 +02:00
2023-04-09 18:52:11 +02:00
2023-04-09 18:52:11 +02:00
2022-09-22 21:35:26 +03:00
2023-04-09 18:52:11 +02:00
2022-09-22 21:35:26 +03:00
2022-09-22 21:35:26 +03:00
2022-09-22 21:35:26 +03:00
2022-09-22 21:35:26 +03:00
2022-09-22 21:35:26 +03:00
2023-04-09 18:52:11 +02:00
2023-04-09 18:52:11 +02:00
2022-09-22 21:35:26 +03:00
2022-09-22 21:35:26 +03:00
2022-09-22 21:35:26 +03:00
2022-09-22 21:35:26 +03:00
2022-09-22 21:35:26 +03:00
2022-09-22 21:35:26 +03:00
2022-09-22 21:35:26 +03:00
2022-09-22 21:35:26 +03:00
2022-09-22 21:35:26 +03:00
2022-09-22 21:35:26 +03:00
2022-09-22 21:35:26 +03:00
2023-02-03 23:00:09 +01:00
2022-09-22 21:35:26 +03:00
2022-09-22 21:35:26 +03:00
2022-09-22 21:35:26 +03:00
2022-09-22 21:35:26 +03:00
2022-09-22 21:35:26 +03:00
2022-09-22 21:35:26 +03:00
2022-09-22 21:35:26 +03:00
2023-04-09 18:52:11 +02:00
2023-01-29 02:35:06 +01:00
2022-09-22 21:35:26 +03:00
2022-09-22 21:35:26 +03:00
2023-05-20 19:35:06 +02:00
2022-09-22 21:35:26 +03:00
2022-09-22 21:35:26 +03:00
2022-09-22 21:35:26 +03:00
2023-04-09 18:52:11 +02:00
2023-04-09 18:52:11 +02:00
2023-05-21 20:07:52 +02:00
2023-04-04 09:59:35 +02:00
2023-04-09 00:23:32 +02:00