View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000132 | Gameplay + OpenGL | [All Projects] Bug | public | 2017-01-27 23:54 | 2017-01-29 11:29 |
Reporter | ZZYZX | ||||
Assigned To | Graf Zahl | ||||
Priority | low | Severity | crash | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Summary | 0000132: ZScript VM doesn't seem to initialize scripted fields in subclasses properly | ||||
Description | Basically, I have a native class defined in these files https://github.com/jewalky/gzdoom/blob/thereisnospoon/src/events.h https://github.com/jewalky/gzdoom/blob/thereisnospoon/src/events.cpp https://github.com/jewalky/gzdoom/blob/thereisnospoon/wadsrc/static/zscript/events.txt Then I create a subclass, for example like this: http://pastebin.com/6XpEE33W The field "myS" is never initialized to a proper string: when trying to access it, then in debug mode, it's 00000000 (assertion failed: Chars != null), and in release mode it just crashes to desktop. Is this a problem with my code or with GZDoom? Note: providing a struct there, e.g. like this http://pastebin.com/WNWMZyLT, does not crash. Also, if I do this in Actor, it seems to work alright (i.e. inheriting actor and putting a string field in it works). Made a bug because otherwise Graf keeps forgetting. | ||||
Tags | No tags attached. | ||||
Struct link: http://pastebin.com/WNWMZyLT Broke in the bug. |
|
Do you have a complete, ready to test, example for this? I am still trying to wrap my head around these fragments. | |
Make a build of https://github.com/jewalky/gzdoom/tree/thereisnospoon Then take this pk3 and run it, it will crash upon entering the map. crash.pk3 (669 bytes) |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2017-01-27 23:54 | ZZYZX | New Issue | |
2017-01-27 23:56 | ZZYZX | Note Added: 0000263 | |
2017-01-29 05:34 | Graf Zahl | Note Added: 0000273 | |
2017-01-29 05:50 | Graf Zahl | Assigned To | => Graf Zahl |
2017-01-29 05:50 | Graf Zahl | Status | new => feedback |
2017-01-29 06:49 | ZZYZX | File Added: crash.pk3 | |
2017-01-29 06:49 | ZZYZX | Note Added: 0000277 | |
2017-01-29 06:49 | ZZYZX | Status | feedback => assigned |
2017-01-29 11:29 | Graf Zahl | Status | assigned => resolved |
2017-01-29 11:29 | Graf Zahl | Resolution | open => fixed |