Troubleshooting/Blam: Difference between revisions

From OniGalore
m (wording)
 
(27 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{|align=right
{{UpdatedForOniX|1.0.0}}
|http://geyser.oni2.net/blam/Blam.png
{{fmbox
|}
  | text = The [[Daodan DLL]] and [[OniX]] solve the most common causes of crashes in Windows, and the [[FERAL|Intel build]] of the Mac app implements many fixes as well. But if you are still encountering crashes while using the most stable Oni available for your system, or you're playing the Chinese version of Oni, read on: chances are that your crash is documented below.
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.
  }}
==Buffer overflow==
[[Image:Blam!.png|right]]
An overflowing buffer is one that holds more than it can hold :)
"Blam!" is a [[Blam (meme)|recurring phrase in Bungie lore]] with violent or otherwise impactful connotations. The Oni community mainly uses "blam" to refer to a crash of the Oni app because of the dialog that pops up on such occasions. The actual "damn!"/"Blam, Oni crashed" dialog only appears for Windows builds, but the Mac Oni app can crash too, for more or less the same reasons, hence the general use of "blam" for whenever Oni runs into trouble and suddenly quits.
===Blam at startup===
That one is due to the overflow of a very particular text buffer ; the one that lists the OpenGL extensions in the '''startup.txt''' file.
If your version of Oni just crashed, 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 entitled GL extensions. That list is broken, meaning that startup collapsed during its writing...


Problem is : that list is ''too long''; that's what makes Oni crash. Bungie folks made Oni dump that list to '''startup.txt''' with a small list size in mind, but recent GFX cards (more specifically their WinXP drivers) tell Oni to write more than what Bungie expected.
==Blam at startup==
This crash, the most notorious of Oni problems, has been traced to the overflow of a particular text buffer which is responsible for storing a list of available OpenGL extensions. When Oni was made, the OpenGL extension list dump was much shorter, and the developers did not allow for a larger dump. Modern graphics cards almost always overflow this buffer.
 
If your version of Oni just crashed on startup, take a look at '''startup.txt''' (it's in your [[Oni (folder)|Oni folder]]). After a successful run of Oni, there should be a rather big list of OpenGL extensions towards the end of this file. If the list cuts off abruptly or the last line in the file starts with "OpenGL version =", it means that startup failed due to this buffer overflow.
 
This bug is fixed with the Daodan DLL in Windows, and fixed in macOS by the Intel build and the patched PPC builds. If for some reason you need to fix it manually yourself, you could apply [[IanPatt|Ian's patch]].
 
Below are other causes of crashes, though none of them should affect someone who is playing Oni in a normal way.
 
==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. If the full IanPatt patch is applied, all these potential crashes are averted by disabling log and console output.


;Solution
:One has to either make the GL extension buffer larger, or to disable the dumping of GL extensions to '''startup.txt''' altogether.
===Other text buffers===
There are other occasions when Oni dumps large amounts of text, and in the case 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''' - appears 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]]
===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".
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'''). 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.


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).
==Non-text buffer overflows==
There are other fixed-size buffers that can also overflow and crash Oni.


There are, however, a few issues.
;Movie buffer
;Problems
:As explained [[Customizing/Binding#start_record, stop_record, play_record|here]], recording a film that approaches half an hour in length can crash Oni.
: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 drivers===
==Out of range errors==
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.
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.
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.
;Pathfinding overload
;Nvidia
:Oni can generate too many pathfinding nodes if a pathfinding grid is inconsistent with the environment (rare).
:from your driver's interface, create an application profile for Oni.exe with "extension limit" set to ON.
;ATI
:well, my ATI FireGL T2 works fine without a patch...


===Debug logs===
;AI control conflicts
What you should remember about them :
:Oni will crash if you '''chr_focus''' to a character that's not drawn.
*It's up to you to enable extra debug log buffers (with the '''-debugfiles''' [[Customizing#Command-line arguments |command line argument]]) : that dumps extra debug files which may or may not cause an overflow
:Oni will crash if you fire a gun while in control of an active AI.
*You can't disable the default debug logs ('''debugger.txt''' and '''startup.txt''') : '''startup.txt''' is the one causing the standard "Blam!" at startup
:Oni will crash if you "talk" to a neutral AI while in control of it (it's a bit more complicated, but who cares?).
So if you "blam" at startup, then Oni's GL extension buffer, used when writing '''startup.txt''', is too short, and you ''have'' to disable (or extend) it in order to play Oni. The simplest way to do that is to apply Ian's patch, or to use one of the patched/derived executables (the one that suits you best).
 
As for other logs (debug files and console output), either they're disabled in the executable you're using, or they're (re)enabled and in that case you ''may'' experience a crash.
;Non-existent BSL function
===Non-text buffers===
:Oni will crash if you call a non-existent BSL function using the [[BSL:Manual#Old vs. new syntax|strict syntax]].
There are fixed-size buffers that are not handled by Ian's patch, but can cause overflow just fine.
 
;Movie buffer
==Chinese version issues==
:See [[Customizing/Binding#What you should be careful about | here]] for details.
Several additional potential crash points were added when Oni was localized into Chinese. As explained [[OBD:Text encoding#Invalid EUC-CN input|HERE]], various untranslated strings will blam! Oni if it encounters them, and this is the cause of most crashes listed below.
;Other stuff
 
:filling in...
*If the graphics quality is too high, you will probably crash on level-load. The quality setting may need to be Superlow (the lowest setting) to work, but the issue does not occur consistently and sometimes a level will load with the graphics quality set a notch or two higher.
You shouldn't encounter these situations if you play Oni "normally"
*Entering any cheat code on the [[Data Comlink]] screen will crash Oni because none of the cheat strings were translated.
==Out of range==
*The Daodan DLL contains a feature for always showing the name and current ammo of a weapon on the ground. It's controlled by the flag "newweap" in daodan.ini. This feature is on by default but will cause a crash as soon as you maneuver over a dropped weapon or even drop your existing weapon.
There is a number of situations where Oni will "Blam" although that has little to do with buffers. Most often, the engine will attempt address to address a region in memory, although the expected data is not there.
*Turning on Developer Mode will result in text printing to the console which will probably crash the game.
;Pathfinding
*If you remove/rename intro.bik so that it doesn't play at startup, you may see garbled text in-game. This one is not a crashing bug, at least not right away, but it indicates memory corruption which could lead to a crash.
: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 '''chr_focus''' to an active AI and fire a weapon (it's a bit more complicated, but who cares?)
;Inexistent stuff
:Oni will crash if you call an inexistent function with the strong syntax.
;Other stuff
:filling in...
You shouldn't encounter these situations if you play Oni "normally"
==Downloads and links==
===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) (instructions and troubleshooting [here])
*[http://ianpatt.hp.infoseek.co.jp/oni/oni_fixed.rar patched English version] (RAR)
*a [http://mukade.bungie.org/cgi-bin/mukade/ikonboard.cgi?;act=ST;f=2;t=91 very useful thread] on Oni Central Forum (about Ian's patch and the "Blam" issue in general)
* Ian's patch [http://script10000.oni2.net/patches.html on Script10K's page]
* Ian's patch on [http://ianpatt.hp.infoseek.co.jp/ Ian's page]


===Beyond Ian's patch===
[[Category:Oni Support]]
See [[Developer_Mode#Enabling_the_cheat|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]]

Latest revision as of 16:41, 5 December 2025

Blam!.png

"Blam!" is a recurring phrase in Bungie lore with violent or otherwise impactful connotations. The Oni community mainly uses "blam" to refer to a crash of the Oni app because of the dialog that pops up on such occasions. The actual "damn!"/"Blam, Oni crashed" dialog only appears for Windows builds, but the Mac Oni app can crash too, for more or less the same reasons, hence the general use of "blam" for whenever Oni runs into trouble and suddenly quits.

Blam at startup

This crash, the most notorious of Oni problems, has been traced to the overflow of a particular text buffer which is responsible for storing a list of available OpenGL extensions. When Oni was made, the OpenGL extension list dump was much shorter, and the developers did not allow for a larger dump. Modern graphics cards almost always overflow this buffer.

If your version of Oni just crashed on startup, take a look at startup.txt (it's in your Oni folder). After a successful run of Oni, there should be a rather big list of OpenGL extensions towards the end of this file. If the list cuts off abruptly or the last line in the file starts with "OpenGL version =", it means that startup failed due to this buffer overflow.

This bug is fixed with the Daodan DLL in Windows, and fixed in macOS by the Intel build and the patched PPC builds. If for some reason you need to fix it manually yourself, you could apply Ian's patch.

Below are other causes of crashes, though none of them should affect someone who is playing Oni in a normal way.

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. If the full IanPatt patch is applied, all these potential crashes are averted by disabling log and console output.

Examples
debugger.txt - appears in the Oni folder
Other debug logs enabled with the -debugfiles command line argument
Console output in Developer Mode

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). 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 other fixed-size buffers that can also overflow and crash Oni.

Movie buffer
As explained here, recording a film that approaches half an hour in length can crash Oni.

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 overload
Oni can generate too many pathfinding nodes if a pathfinding grid is inconsistent with the environment (rare).
AI control conflicts
Oni will crash if you chr_focus to a character that's not drawn.
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?).
Non-existent BSL function
Oni will crash if you call a non-existent BSL function using the strict syntax.

Chinese version issues

Several additional potential crash points were added when Oni was localized into Chinese. As explained HERE, various untranslated strings will blam! Oni if it encounters them, and this is the cause of most crashes listed below.

  • If the graphics quality is too high, you will probably crash on level-load. The quality setting may need to be Superlow (the lowest setting) to work, but the issue does not occur consistently and sometimes a level will load with the graphics quality set a notch or two higher.
  • Entering any cheat code on the Data Comlink screen will crash Oni because none of the cheat strings were translated.
  • The Daodan DLL contains a feature for always showing the name and current ammo of a weapon on the ground. It's controlled by the flag "newweap" in daodan.ini. This feature is on by default but will cause a crash as soon as you maneuver over a dropped weapon or even drop your existing weapon.
  • Turning on Developer Mode will result in text printing to the console which will probably crash the game.
  • If you remove/rename intro.bik so that it doesn't play at startup, you may see garbled text in-game. This one is not a crashing bug, at least not right away, but it indicates memory corruption which could lead to a crash.