Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't read world because of access violation #2

Open
filips123 opened this issue Oct 26, 2019 · 4 comments
Open

Can't read world because of access violation #2

filips123 opened this issue Oct 26, 2019 · 4 comments

Comments

@filips123
Copy link

I can't read world's chinks and blocks. When I try to do this, the error occours:

Traceback (most recent call last):
  File "<pyshell#8>", line 1, in <module>
    world.getChunk(0, 0)
  File "D:\Users\filips\Downloads\MCPE\venv\lib\site-packages\bedrock-0.1-py3.7.egg\bedrock\bedrock.py", line 30, in getChunk
    chunk = Chunk(self.db, x, z)
  File "D:\Users\filips\Downloads\MCPE\venv\lib\site-packages\bedrock-0.1-py3.7.egg\bedrock\bedrock.py", line 65, in __init__
    self.version = self._loadVersion(db)
  File "D:\Users\filips\Downloads\MCPE\venv\lib\site-packages\bedrock-0.1-py3.7.egg\bedrock\bedrock.py", line 82, in _loadVersion
    version = ldb.get(db, self.keyBase + b"v")
  File "D:\Users\filips\Downloads\MCPE\venv\lib\site-packages\bedrock-0.1-py3.7.egg\bedrock\leveldb.py", line 164, in get
    valPtr = ldb.leveldb_get(db, ro, key, len(key), ctypes.byref(size), ctypes.byref(error))
OSError: exception: access violation reading 0x0000000000000000

I'm using Python 3.7 on Windows 10 (64-bit) and with DLLs that are provided in this repository.

@fangzhangmnm
Copy link

did you unzipped the .mcworld file?

@filips123
Copy link
Author

Which .mcworld file? I copied worlds from Android phone with Pocket Edition (which is Bedrock), and I just have level.dat, various .ldb and other files.

@ChameleonIVCR
Copy link

Can confirm this issue is still happening. I'm using Windows 10 64 bits with Python 3.8.3 and I've tried both the provided DLLs and some compiled by myself. Here's the output:

  File "F:\Escritorio\Saves Script\bedrock\leveldb.py", line 161, in get
    valPtr = ldb.leveldb_get(db, ro, key, len(key), ctypes.byref(size), ctypes.byref(error))
  File "F:\Escritorio\Saves Script\bedrock\bedrock.py", line 95, in _loadVersion
    version = ldb.get(db, self.keyBase + b"v")
  File "F:\Escritorio\Saves Script\bedrock\bedrock.py", line 78, in __init__
    self.version = self._loadVersion(db)
  File "F:\Escritorio\Saves Script\bedrock\bedrock.py", line 30, in getChunk
    chunk = Chunk(self.db, x, z)
  File "F:\Escritorio\Saves Script\main.py", line 4, in <module>
    spawnchunk = world.getChunk(0, 0)

@BluCodeGH
Copy link
Owner

I'm unfortunately not particularly familiar with the low level windows/ctypes issue this appears to be, and can't reproduce myself. I'm open to a PR fixing it however.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants