Troubleshooting/Blam: Difference between revisions
m (→Ian's patch) |
(rewriting) |
||
Line 3: | Line 3: | ||
|} | |} | ||
This is a little bit technical. If you just want a solution go [http://oni.bungie.org/help/winxp.html here], or scroll to the bottom of the section. | This is a little bit technical. If you just want a solution go [http://oni.bungie.org/help/winxp.html here], or scroll to the bottom of the section. | ||
== | ==Causes== | ||
===Blam at startup=== | ===Blam at startup=== | ||
This problem has been traced to the overflow of a particular text buffer -- the one that lists the OpenGL extensions in the '''startup.txt''' file. | |||
If your version of Oni just crashed on startup, take a look at that file (it's in your [[Installation#Installation folder|Oni folder]]). At the end, there should be a rather big list | If your version of Oni just crashed on startup, take a look at that file (it's in your [[Installation#Installation folder|Oni folder]]). At the end, there should be a rather big list of available OpenGL extensions. If the list cuts off abruptly, that means that startup failed during its writing. | ||
When Oni was written, the OpenGL extension list dump was much shorter, and the developers did not allow for a larger dump. Modern graphics cards almost always cause this overflow. Fortunately, there is a patch (see "Solutions" below) for the PC and the Mac. | |||
===Other text buffer overflows=== | |||
There are other occasions when Oni dumps large amounts of text, and when the dumped text is larger than the buffer Bungie set up for it, you'll have an overflow, and Oni will crash. | |||
;Examples | ;Examples | ||
:'''debugger.txt''' - another debug log located in the Oni folder | :'''debugger.txt''' - another debug log located in the Oni folder | ||
:other debug logs enabled with the '''-debugfiles''' [[Customizing#Command-line arguments |command line argument]] | :other debug logs enabled with the '''-debugfiles''' [[Customizing#Command-line arguments |command line argument]] | ||
:console output in [[Developer Mode]] | :console output in [[Developer Mode]] | ||
===Debug logs=== | |||
What you should remember about them : | |||
*Some debug logs that can cause crashes are only enabled if you choose to do so. (See '''-debugfiles''' under [[Customizing#Command-line arguments |command line argument]].) | |||
*You can't disable the default debug logs ('''debugger.txt''' and '''startup.txt'''), so this cannot prevent the startup Blam. See the "Solution Links" below for patches for this. | |||
*Some other logs (debug files and console output) are either disabled in the executable you're using, or they're (re)enabled and in that case you ''may'' experience a crash. | |||
===Non-text buffer overflows=== | |||
There are fixed-size buffers that are not handled by Ian's patch, but can cause overflow just fine. | |||
;Movie buffer | |||
:See [[Customizing/Binding#What you should be careful about | here]] for details. | |||
<!--any other causes?--> | |||
You shouldn't encounter these situations if you play Oni "normally". | |||
===Out of range errors=== | |||
There are a number of situations where Oni will "Blam" that have little to do with buffers. Most often, the engine will attempt to address a region in memory but fail to find the expected data. | |||
;Pathfinding | |||
:Oni can generate too many pathfinding nodes if a pathfinding grid is inconsistent with the environment (rare) | |||
;Switching between characters | |||
:Oni will crash if you '''chr_focus''' to a character that's not drawn | |||
;Conflicts | |||
:Oni will crash if you fire a gun while in control of an active AI | |||
:Oni will crash if you "talk" to a neutral AI while in control of it | |||
:(it's a bit more complicated, but who cares?) | |||
;Inexistent stuff | |||
:Oni will crash if you call an inexistent function with the strong syntax. | |||
<!--any other causes?--> | |||
You shouldn't encounter these situations if you play Oni "normally". | |||
==About the Solutions== | |||
===Ian's patch=== | ===Ian's patch=== | ||
Ian Patterson (a professional coder, and the creator of OniTools, among other stuff) located the routine that writes to fixed-size text buffers (in '''startup.txt''' and elsewhere). Rather than making the problematic buffers larger or dynamic (adjusted at runtime), he completely disabled them. Thus he made the English version of Oni run without a "Blam" on startup on Windows XP with the most common GFX hardware/drivers. | Ian Patterson (a professional coder, and the creator of OniTools, among other stuff) located the routine that writes to fixed-size text buffers (in '''startup.txt''' and elsewhere). Rather than making the problematic buffers larger or dynamic (adjusted at runtime), he completely disabled them. Thus he made the English version of Oni run without a "Blam" on startup on Windows XP with the most common GFX hardware/drivers. | ||
Line 37: | Line 64: | ||
:make them larger, or dynamic, to avoid overflow | :make them larger, or dynamic, to avoid overflow | ||
===Recent | ===Recent driver fixes=== | ||
The present status of Ian's patch is unofficial. Although Ian suggested to Take2 and Godgames to release an official patch, there was no response. | The present status of Ian's patch is unofficial. Although Ian suggested to Take2 and Godgames to release an official patch, there was no response. | ||
However, action has been taken by GFX card manufacturers. Since Oni is not the only game for which the GL extension problem arises, the recent drivers provide a set of options that limits the list of GL extensions "seen" by the game. That's an alternative way to prevent Oni from crashing at startup, but it's highly manufacturer-dependent. | However, action has been taken by GFX card manufacturers. Since Oni is not the only game for which the GL extension problem arises, the recent drivers provide a set of options that limits the list of GL extensions "seen" by the game. That's an alternative way to prevent Oni from crashing at startup, but it's highly manufacturer-dependent. | ||
Line 43: | Line 70: | ||
:from your driver's interface, create an application profile for Oni.exe with "extension limit" set to ON. | :from your driver's interface, create an application profile for Oni.exe with "extension limit" set to ON. | ||
;ATI | ;ATI | ||
:well, my ATI FireGL T2 works fine without a patch... | <!--:well, my ATI FireGL T2 works fine without a patch...--> | ||
<!--good for you, but we still need that info ;--> | |||
; | |||
== | ==Solution Links== | ||
===Ian's patch=== | ===Ian's patch=== | ||
*[http://ianpatt.hp.infoseek.co.jp/oni/onipatch.zip Ian's patch] (ZIP) (patches several Oni versions, not only the English one) | *[http://ianpatt.hp.infoseek.co.jp/oni/onipatch.zip Ian's patch] (ZIP) (patches several Oni versions, not only the English one) | ||
*[http://ianpatt.hp.infoseek.co.jp/oni/patch_instructions/ instructions and troubleshooting ] (ignore the "send me a copy of your oni.exe in this forum thread, and I'll try and add support for that version") | *[http://ianpatt.hp.infoseek.co.jp/oni/patch_instructions/ instructions and troubleshooting ] (ignore the line "send me a copy of your oni.exe in this forum thread, and I'll try and add support for that version") | ||
*[http://ianpatt.hp.infoseek.co.jp/oni/oni_fixed.rar patched English version] (RAR) | *[http://ianpatt.hp.infoseek.co.jp/oni/oni_fixed.rar patched English version] (RAR) | ||
*a [http://oni.bungie.org/forums/index.php?threadid=92 very useful thread] on {{OCF}} (about Ian's patch and the "Blam" issue in general) | *a [http://oni.bungie.org/forums/index.php?threadid=92 very useful thread] on {{OCF}} (about Ian's patch and the "Blam" issue in general) |
Revision as of 17:01, 28 January 2008
This is a little bit technical. If you just want a solution go here, or scroll to the bottom of the section.
Causes
Blam at startup
This problem has been traced to the overflow of a particular text buffer -- the one that lists the OpenGL extensions in the startup.txt file. If your version of Oni just crashed on startup, take a look at that file (it's in your Oni folder). At the end, there should be a rather big list of available OpenGL extensions. If the list cuts off abruptly, that means that startup failed during its writing.
When Oni was written, the OpenGL extension list dump was much shorter, and the developers did not allow for a larger dump. Modern graphics cards almost always cause this overflow. Fortunately, there is a patch (see "Solutions" below) for the PC and the Mac.
Other text buffer overflows
There are other occasions when Oni dumps large amounts of text, and when the dumped text is larger than the buffer Bungie set up for it, you'll have an overflow, and Oni will crash.
- Examples
- debugger.txt - another debug log located in the Oni folder
- other debug logs enabled with the -debugfiles command line argument
- console output in Developer Mode
Debug logs
What you should remember about them :
- Some debug logs that can cause crashes are only enabled if you choose to do so. (See -debugfiles under command line argument.)
- You can't disable the default debug logs (debugger.txt and startup.txt), so this cannot prevent the startup Blam. See the "Solution Links" below for patches for this.
- Some other logs (debug files and console output) are either disabled in the executable you're using, or they're (re)enabled and in that case you may experience a crash.
Non-text buffer overflows
There are fixed-size buffers that are not handled by Ian's patch, but can cause overflow just fine.
- Movie buffer
- See here for details.
You shouldn't encounter these situations if you play Oni "normally".
Out of range errors
There are a number of situations where Oni will "Blam" that have little to do with buffers. Most often, the engine will attempt to address a region in memory but fail to find the expected data.
- Pathfinding
- Oni can generate too many pathfinding nodes if a pathfinding grid is inconsistent with the environment (rare)
- Switching between characters
- Oni will crash if you chr_focus to a character that's not drawn
- Conflicts
- Oni will crash if you fire a gun while in control of an active AI
- Oni will crash if you "talk" to a neutral AI while in control of it
- (it's a bit more complicated, but who cares?)
- Inexistent stuff
- Oni will crash if you call an inexistent function with the strong syntax.
You shouldn't encounter these situations if you play Oni "normally".
About the Solutions
Ian's patch
Ian Patterson (a professional coder, and the creator of OniTools, among other stuff) located the routine that writes to fixed-size text buffers (in startup.txt and elsewhere). Rather than making the problematic buffers larger or dynamic (adjusted at runtime), he completely disabled them. Thus he made the English version of Oni run without a "Blam" on startup on Windows XP with the most common GFX hardware/drivers.
Then he proceeded with creating a universal patch that makes the appropriate changes not only to the English Oni.exe, but also to the executables of a number of other releases (German, Spanish...). For all those versions, the patch completely disables the problematic fixed-size buffers, making it possible to run Oni on XP with "those recent GFX cards that have too many OpenGL extensions".
Ian's patch also makes the executable able to run no matter what its name is (the original Oni.exe will not work if you rename it).
There are, however, a few issues.
- Problems
- One problem is that people who want to have a look at files like debugger.txt can't do so
- (well, that's only a problem for fanatic reverse engineers who want to figure out "how Oni works"...)
- A bigger problem is that Ian's patch prevents Oni from dumping output to the console in Developer Mode
- (well, that has only become a problem after we got aware of the Developer Mode functionality)
- Solutions
- reenable the needed buffers (except the GL extension buffer)
- make them larger, or dynamic, to avoid overflow
Recent driver fixes
The present status of Ian's patch is unofficial. Although Ian suggested to Take2 and Godgames to release an official patch, there was no response. However, action has been taken by GFX card manufacturers. Since Oni is not the only game for which the GL extension problem arises, the recent drivers provide a set of options that limits the list of GL extensions "seen" by the game. That's an alternative way to prevent Oni from crashing at startup, but it's highly manufacturer-dependent.
- Nvidia
- from your driver's interface, create an application profile for Oni.exe with "extension limit" set to ON.
- ATI
Solution Links
Ian's patch
- Ian's patch (ZIP) (patches several Oni versions, not only the English one)
- instructions and troubleshooting (ignore the line "send me a copy of your oni.exe in this forum thread, and I'll try and add support for that version")
- patched English version (RAR)
- a very useful thread on Oni Central Forum (about Ian's patch and the "Blam" issue in general)
- Ian's patch on Script10K's page
- Ian's patch on Ian's page
Beyond Ian's patch
See here for a beefed-up Oni.exe featuring :
- a slightly modified Ian's patch
- executable can be renamed (retained)
- no GL extensions dumped at startup (retained)
- dev console and other debug logs (reenabled)
- the Developer Mode