Plethora777 / mcpe_viz

Minecraft Pocket Edition (MCPE) World Visualization & Reporting Tool with Web App
GNU General Public License v2.0
167 stars 39 forks source link

Seg fault on world created in latest beta (1.9.0) #67

Closed phunni closed 5 years ago

phunni commented 5 years ago

Created a brand new world in the latest beta and running mcpe causes a seg fault:

mcpe_viz v0.0.38 by Plethora777 Reading XML from /home/paul/.mcpe_viz/mcpe_viz.xml Reading config from /home/paul/.mcpe_viz/mcpe_viz.cfg parseLevelFile: name=/opt/shared/wvkAAOrAAgA=//level.dat version=8 len=1887 Found World Spawn: x=672 y=32767 z=4 Level name is [Mesa Plateau] DB Open: dir=/opt/shared/wvkAAOrAAgA=/ DB Open Status: OK (block_size=4096 bloom_filter_bits=10) Scan keys to get world boundaries Bounds (chunk): DimId=0 X=(-59 128) Z=(-118 78) Bounds (pixel): DimId=0 X=(-944 2048) Z=(-1888 1248) Image=(3008 3152) Bounds (chunk): DimId=1 X=(0 88) Z=(-64 9) Bounds (pixel): DimId=1 X=(0 1408) Z=(-1024 144) Image=(1424 1184) Bounds (chunk): DimId=2 X=(0 0) Z=(0 0) Bounds (pixel): DimId=2 X=(0 0) Z=(0 0) Image=(16 16) 60224 records Active 'hide-top', 'force-top', and 'geojson-block': 'force-top' block: overworld - Mob Spawner (dimId=0 blockId=52 (0x34)) 'force-top' block: overworld - Diamond Ore (dimId=0 blockId=56 (0x38)) 'force-top' block: overworld - Rail (dimId=0 blockId=66 (0x42)) 'force-top' block: overworld - End Portal Frame (dimId=0 blockId=120 (0x78)) 'force-top' block: overworld - Emerald Ore (dimId=0 blockId=129 (0x81)) 'force-top' block: overworld - Sea Lantern (dimId=0 blockId=169 (0xa9)) 'force-top' block: overworld - Prismarine (dimId=0 blockId=168 (0xa8)) 'geojson' block: overworld - End Portal Frame (dimId=0 blockId=120 (0x78)) 'hide-top' block: nether - Bedrock (dimId=1 blockId=7 (0x07)) 'hide-top' block: nether - Netherrack (dimId=1 blockId=87 (0x57)) 'hide-top' block: nether - Lava (dimId=1 blockId=10 (0x0a)) 'hide-top' block: nether - Stationary Lava (dimId=1 blockId=11 (0x0b)) 'force-top' block: nether - Mob Spawner (dimId=1 blockId=52 (0x34)) Parse all leveldb records WARNING: getBlockByUname failed to find uname=minecraft:hardened_clay WARNING: getBlockByUname failed to find uname=minecraft:hardened_clay WARNING: getBlockByUname failed to find uname=minecraft:hardened_clay WARNING: getBlockByUname failed to find uname=minecraft:hardened_clay Segmentation fault (core dumped)

I appreciate this is probably due to changes in the game that aren't supported yet, but it means (unless it's something I'm doing wrong) that mcpe_viz won't work at all when this beta goes live...

Nodman commented 5 years ago

Same for 1.8 version :(

lordicarus3 commented 5 years ago

Is @Plethora777 still active with this project? It looks like it has been quite a while since any code has been committed or even comments added to issues. Such a great project, would hate to hear if it is dead.

phunni commented 5 years ago

I asked a few months ago on Twitter and was told he was still doing stuff on it, but I must admit, I'm beginning to wonder. I'd be gutted if this project is dead - I've come to really rely on it!

Plethora777 commented 5 years ago

I'm still on it -- just focused on other things :)

I did some updates to play well with the new water layer and then Mojang changed something and I figured it would be wise to wait for the dust to settle with all the (cool!) changes they were making. As it stands now, I believe some significant work needs to happen to play well with the new world scheme. They moved away from block-id based and that has some significant impacts on the way MCPE Viz is coded.

I will return! :) (Likely over the coming holidays)

phunni commented 5 years ago

Huzzah! Excellent news! To be honest, I'd be happy if it just worked as well as it did with the last version (1.17?) even with all the stuff it couldn't recognise. At least then I got the data I needed and a map - even if an incomplete one!

lordicarus3 commented 5 years ago

Very happy to hear this! If you need any dumps/logs of the crashes I've had, please let me know.

juliankay commented 5 years ago

I love this tool! I'm so pleased you're still on it @Plethora777 if you need any testing or other help, you can also let me know.

There aren't enough decent tools for the Bedrock version of Minecraft, and mcpe_viz is a treasure we need to maintain! 👍

flagmaggot commented 5 years ago

I forked your code and made it work with the newer version. Thanks for forcing me to pushing myself to get it working. The changing over from block-id over to name id was a real hoot but I overcame it. :) It's not pretty (at least to me) in some cases as I worked on this during my sleepy moments. lol

hulmgulm commented 5 years ago

@flagmaggot these are great news. If you create a pull request for your changes then @Plethora777 might be able to merge it and release a new version of mcpe_viz!

flagmaggot commented 5 years ago

Well there's a caveat with my work, for the cat and panda for example, since they don't have IDs I just gave them some faux ones so the rest of the code would work (as well as using the geojson-block tags in the config so you can spot them on the map)

Plethora777 commented 5 years ago

@flagmaggot nice job! I figured it would happen before too long :)

Re the ID stuff -- yep that was one of the things that was concerning me -- the need to invent id's for stuff. I'd like to have a look at what you did and see about merging it in along with some other stuff I have in mind...

flagmaggot commented 5 years ago

Ok sounds good. I'll send my changes, I also included some image tiles as I find them in chests that show up as "?"

flagmaggot commented 5 years ago

Pull request has been sent, don't judge too harshly but it does work :)

hulmgulm commented 5 years ago

I got it to compile under Ubuntu for WSL and the map looks great! Thank you very much !

flagmaggot commented 5 years ago

I'm using Debian for WSL myself so I'm happy it worked for you!

phunni commented 5 years ago

Also compiles and runs on Arch Linux. Feels like we're basically back to where we were before - which is fine by me! Things like scaffolding still confuse it, but that's really not a problem at this stage...

Also - I get a lot of "WARNING: File doesn't exist: ./images/mcpe_viz.item..." errors. thing is - those images do exist so not sure about that, but, again, it doesn't prevent me from using it.

flagmaggot commented 5 years ago

Check your images folder, for me they certainly didn't exist in my case. I had to go and find a tile map, chop them up into 32x32 icons and piece meal each one until those errors were gone. If you have a world I can download I can load it here and do a PR for those images.

OR that could be a directory structure issue. I think I recall having a path issue because I'm using WSL on a windows machine.

lordicarus3 commented 5 years ago

@flagmaggot @Plethora777 I noticed in the new pull request for mcpe_viz.xml that there appears to be a typo for the impulse command blocks, they are listed as "impluse".

https://github.com/Plethora777/mcpe_viz/pull/69/files#diff-f3b999c20f5d6f410eba0f7450a77443R932

flagmaggot commented 5 years ago

Good catch! I'm not well versed with git to fix that for the PR.

flagmaggot commented 5 years ago

I just edited it in the PR, hopefully that works?

phunni commented 5 years ago

@flagmaggot the images definately exist:

WARNING: File doesn't exist: ./images/mcpe_viz.item.261.0.png name=minecraft:bow

ls -larth ./images/mcpe_viz.item.261.0.png
-rw-r--r-- 1 paul paul 193 Dec 20 15:22 ./images/mcpe_viz.item.261.0.png

Have also confirmed that the mentioned file is, in fact, what is claims to be - i.e. a bow.

Plethora777 commented 5 years ago

Just pushed an update - give it a try

phunni commented 5 years ago

Working beautifully with 0.8 - only one error (which is much better than it's been for a long time! :-) ) which is

WARNING: getBlockByUname failed to find uname=minecraft:sealantern

and I can quite happily live with that :-)

phunni commented 5 years ago

Wait - trying to load mob positions and it gets stuck on "Loading Layers remaining: 1"

I'll try generating the maps with different options and see if it fixes it...

phunni commented 5 years ago

Also - was wrong about only one warning - I also get lots of "Did not find valid id and name for item:", but they moved past so quickly I missed them!.

Adding --no-force-geojson to the command means that it now loads those extra layers (for mob/player locations) almost instantly, but doesn't actually show anything differently - in other words the players/mobs etc don't show up...

phunni commented 5 years ago

Whatever I do now I can't get the player or mobs or some items (chests work other stuff doesn't seem to) to show up, although there's no error that I can see.

Currently using command:

~/mcpe_viz/build/mcpe_viz --db /opt/shared/mb8FAK7JBAA\=/ --out /opt/shared/mcpe/output --html-most --biome

Plethora777 commented 5 years ago

@phunni Sounds like the mcpe_viz produced .geojson file is not valid -- I'd be curious to see the exact version of that world that caused the error

phunni commented 5 years ago

The version of minecraft is 1.8.0. I can zip up the world file if that would help?

I did have a quick look at the javascript console and the only error I can see is that it's getting a 404 for the favicon, which is not surprising at all since I haven't bothered putting one in.

It does get the following warning:

browser-polyfill.min.js:1 Returning a Promise is the preferred way to send a reply from an onMessage/onMessageExternal listener, as the sendResponse will be removed from the specs (See https://developer.mozilla.org/docs/Mozilla/Add-ons/WebExtensions/API/runtime/onMessage) Error
    at B (chrome-extension://oboonakemofpalcgghocfoadofidjkkk/browser-polyfill.min.js:1:8152)
    at chrome-extension://oboonakemofpalcgghocfoadofidjkkk/keepassxc-browser.js:66:13
    at chrome-extension://oboonakemofpalcgghocfoadofidjkkk/browser-polyfill.min.js:1:8196
    at EventImpl.dispatchToListener (extensions::event_bindings:403:22)
    at Event.publicClassPrototype.(anonymous function) [as dispatchToListener] (extensions::utils:138:26)
    at EventImpl.dispatch_ (extensions::event_bindings:387:35)
    at EventImpl.dispatch (extensions::event_bindings:409:17)
    at Event.publicClassPrototype.(anonymous function) [as dispatch] (extensions::utils:138:26)
    at messageListener (extensions::messaging:240:29)
    at EventImpl.dispatchToListener (extensions::event_bindings:403:22)

I'm not seeing a .geoson file listed in the sources though, but, I must admit, I'm not an expert at this sort of thing...

Plethora777 commented 5 years ago

@phunni yes please zip up the file and send me a link - that would be the easiest way to figure out why it's weird

phunni commented 5 years ago

ok - tar file do?

Plethora777 commented 5 years ago

sure

phunni commented 5 years ago

https://www.dropbox.com/s/2bpyyqhtp8mcaz5/mb8FAK7JBAA.tar?dl=0

Edit - for some reason that's packaged the world directory inside /opt/shared - but it is there!

Plethora777 commented 5 years ago

Whatever I do now I can't get the player or mobs or some items (chests work other stuff doesn't seem to) to show up, although there's no error that I can see.

Currently using command:

~/mcpe_viz/build/mcpe_viz --db /opt/shared/mb8FAK7JBAA\=/ --out /opt/shared/mcpe/output --html-most --biome

Thanks for the world file. I tried it and it worked fine on Firefox and Chrome on win7... I just pushed another update. Give it a try and see if things are working for you now. If not, you might try making sure that you haven't done any custom .cfg or .xml file?

phunni commented 5 years ago

Ok - making sure I had the latest .cfg seems to have fixed it - sorry, I should've tried that and saved a lot of hassle. I did try the latest .xml, but I should've done the config as well.

Incidentally, it seems to be identifying something in the sea as emerald ore and scaffolding as chorus plant. Obviously this is probably due to recent changes and doesn't bother me in the least, but I thought it might be helpful to know.

Anyway - as far as I'm, concerned this issue can now be closed. :-)

Plethora777 commented 5 years ago

That's great news -- do you have a theory on what was in your cfg file that was causing an issue? Could you send me your .cfg file so I can see?

phunni commented 5 years ago

:-/ really sorry - in only backed up the xml and not the cfg so I don't think I have a copy of the dodgy one. I'll double check in my backups, but I don't think that file is included in the backup process...

Plethora777 commented 5 years ago

No problem. Closing this one - which feels great :)