Much-hated ‘4096 bug’ fixed

It’s been more than four years since the hypergrid was invented, and the “4096 bug” has plagued hypergrid travelers for all that time, preventing users from jumping more than 4,096 regions in any direction.

The problem involves both viewer and server code, and is a legacy of the Second Life environment, where the grid map is much more compact. OpenSim grids, however, are significantly more spread out. Many of the largest and oldest grids are centered at coordinates 10,000, 10,000, including OSgrid. Other grids are located around 1,000, 1,000. To travel from the lower to the upper grids, users would have to find intermediary way-points to jump to first.

The Hyperica hyperport used linked gates on multiple regions to deal with the 4096 bug problem.

The Hyperica hyperport used linked gates on multiple regions to deal with the 4096 bug problem.

Viewer developers and server developers typically didn’t talk to one another for most of OpenSim’s history. Partly this was because the viewer developers were primarily focused on serving Second Life users, since they were the far larger group. But another issue was that the licenses for the two sets of code are not compatible, and developers were paranoid about accidental intermingling.

Both of these issues have recently been addressed. As a result of Linden Lab policies, some viewer developers, including the Firestorm team, spun off OpenSim-only versions of their viewers. And a new foundation was set up for OpenSim to address the licensing issues, and allow the two sets of developers to work more closely together.

This closeness was most recently felt at the first annual OpenSimulator Community Conference, where viewer developers not only attended the event and made presentations, but also created a custom viewer specifically for the conference.

“I was pleased to represent Kokua at the Open Simulator Community Conference’s panel discussion on viewers, also on the panel were representatives from Singularity and Firestorm,” said Kokua developer Nicky Perian in an announcement last week. “We were questioned about what was known as the 4096 jump bug.”

Grid owner and hypergrid traveler Shaun Emerald got the ball rolling with Firestorm jira FIRE-11593, Tonya Souther submitted the first attempt at a fix, which generated discussion and testing activity both from other viewer developers and OpenSim server developers as well.

Nicky Dasmijn, a Firestorm viewer developer, spent a lot of time trying different fixes before zeroing in on the problem area, Souther told Hypergrid Business. “I also spent a fair amount of time on finding just where things were going wrong to begin with,” she added.

Then, last week, Singularity developer Latif Khalifa fixed the problem, shared his patch, and announced a new version of the Singularity viewer that included the simple statement: “Fixed a problem with long teleports in OpenSim.”

The code has also been donated to the Firestorm viewer and is expected to be included in the next release, due out in a couple of months. It is already part of the Kokua Viewer.

“OpenSim developers provided invaluable testing using Singularity and Kokua that provided the symptom verification, proposed fix, and a verified solution to this bug,” said Perian.

The Eld region on Sanctuary is a popular spot for hypergrid explorers.

The Eld region on Sanctuary is a popular spot for hypergrid explorers.

In the past, developers considered the 4,096 bug to be very difficult to fix, but while it may have been tricky to find, fixing it was much easier, and does not require any major rewriting of viewer code.

“The fix is a one-line change that any viewer team could easily implement,” said Emerald in a Google Plus discussion about the topic. Emerald runs the Sanctuary grid, which has a popular hyperport on the Eld region, located at

To test out the new long-distance teleports, you can log into OSgrid’s LBSA Plaza and jump to, say, Hyperica Lower, at lower.

But it’s not enough to have an updated version of the Singularity viewer. The grids and regions themselves must also be running updated OpenSim code.

A hosting provider will do this on request. If you are running your own region, you will need to find the EntityTransfer section of the configuration file and set max_distance to 65535. Grid operators using Robust central grid servers should also set Check4096 to False in their configuration file.

The fix has also been added to the latest bleeding-edge release of the OpenSimulator server software, and is expected to be included in the next official, stable release.

Justin Clark-Casey

Justin Clark-Casey

“The default maximum allowed distance for avatar teleports was increased to 16383 map tiles in development code,” said OpenSim core developer Justin Clark-Casey in an announcement last week. ” This is in response to fixes in third party viewers to allow teleports further than 4096 tiles.”

Eventually, all grids will upgrade, but there will be a transition period at first where some grids have upgraded and are no longer affected by the “4096 bug” and others haven’t.

“It’ll take a while before the 4096 bug totally fades away, but it will – it’s dead and just doesn’t know it yet,” said Shaun Emerald.

According to Emerald, when jumping between two regions more than 4,096 regions apart, only the first region has to be running the updated code for the jump to work. However, making the return teleport back again requires the second region to be updated, as well.

As a result, the Hyperica Lower, Hyperica Central and Hyperica Upper regions will continue to stay up, to serve as intermediary jumping points for long-distance travelers from regions that are still running the old code. The addresses for the Central and Upper waypoints are central and upper.

The Hyperica grid itself is fully upgraded, and all the Hyperica gates will be revamped to take advantage of the new travel possibilities.

The reaction of the hypergrid community has been overwhelmingly positive.

John Lester

John Lester

“I encourage all explorers of the hypergrid to please take a moment and thank Latif on Twitter,” said John Lester, chief learning officer at ReactionGrid, in a recent post. He is also known as Pathfinder in-world.

“His hard work has resulted in a major improvement to the use of the hypergrid and the evolution of OpenSim as a constellation of easily accessible interconnected grids,” he added.

“This is really great news and nice work from Singularity people,” said Per Eriksson, founder of Australian virtual design firm Troppo Design. The company runs the Troppo Club OpenSim grid. Its latest project is The Lost Castle, a 29-region recreation of the historic 1613 Mori Tadamasa’s Castle from Tsuyama, Japan, which is a setting for machinima-style animated film production.

Related Posts'

Maria Korolov

Maria Korolov is editor and publisher of Hypergrid Business. She has been a journalist for more than twenty years and has worked for the Chicago Tribune, Reuters, and Computerworld and has reported from over a dozen countries, including Russia and China. Follow me on Twitter @MariaKorolov.

11 Responses

  1.' Sarge Misfit says:

    So, will this also work inworld? I’m thinking of AuroraSim’s variable regions in particular, but there are also some OpenSim grids that may have regions that are more than 4,096 apart.

    • Yes, I just tested it on Hyperica, jumping from Hyperica Lower to Hyperica Upper without stopping at Hyperica Central first!

      The key is that the region you start at has to have the code fix, and the grid as a whole has to have the code fix.

      • But I don’t know if the same fix will work on AuroraSim. Has anyone tried it out yet? Anybody?

        •' Sarge Misfit says:

          Singularity crashes on region handshake when I try to login to Excelsior Station, which is 8192×8192. Inworld teleport scripts and chat command teleports are borked with compatible viewers (Firestorm, Angstrom), though landmarks work fine.

          •' Cinder Biscuits says:

            Can you expand a little more on how they aren’t working on Firestorm? What do you expect will happen and what is actually happening? I’ll check back in the comments here, but if you file an issue on Firestorm’s jira I’m sure not to forget.

          •' Sarge Misfit says:

            Sorry, I haven’t been running my AuroraSim instance lately
            Decided to give things a run …
            Using firestorm, used LandMark to 2106, 1887, 23 just fine. Used chat command “gtp 5000 5000 100” arrived at 8191 8191 100, which is the extreme NE corner of the region. Ctrl-Shft-H to Home, no problem. Tried WarpGate, which is a blamgate using osTeleportAgent. Doesn’t function. Tried OKC Teleporter, got TP’d to 0,0,3, extreme SW corner of the region. With Ctrl-Shft-H not working. Requires a logout

        •' Cinder Biscuits says:

          This fix will work on AuroraSim, yes.

  2.' Nick Zwart says:

    This is great news, thanks to Latif who has done so much already. The meetins at OSCC did the trick. They never knew how important this problem was for us.

  3.' shawnkmaloney . says:

    great article, great news. Now Shaun has a few more gates to put up. I just saw an old nasty pic of Sanctuary that I took a few months back when Shaun returned after almost a year being gone, and now remember how impressed I was at the time at what is now seen in my mind as an actual mess of a few gates, to me. What is there is nothing like a few months ago. Now it is neat and tidy and easier to navigate and is about 5 or 6 times larger than That ugly pic I took. oh, and he rescripted the gates so that they tell you which are on/offline which for the most part is accurate and time saving. Thank you Shaun Emerald for all your hard work and for piping up about the “4096” bug. 🙂

  4.' Shaun Emerald says:

    Hi Maria – a couple of clarifications, if I may:

    1) The problem is entirely viewer-side. The only reason the server comes into play, is because it has long had a couple of checks in it that prevent you from running into the viewer-side issue.

    2) I’m not a viewer developer (a few of us got a chuckle out of that, LOL). As you correctly mention, later, I’m just the guy who runs the “Sanctuary” grid, which many people frequent, to use my gates (over 80 now). I was, indeed, however, the one who brought up the issue at the conference and, as a result, was asked to file that jira entry, which I gladly did. I also joined in the testing, as well.

    3) The original, tentative fix, was a one-liner. The ultimate fix is a bit longer, but still (surprisingly, to me) quite small.

    4) Grids don’t have to upgrade to newer OpenSim code to allow folks to jump further than 4096. The two settings, mentioned in your article, should already exist, as they’ve been around a long time. All they need to do is change them and restart. Then, anyone who has a fixed viewer will be able to make a long teleport from there. We just need to get the word out to grids to do this – once they do, this issue will, indeed, fade away.