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

New build crashes with Segmentation Fault #72

Closed flagmaggot closed 5 years ago

flagmaggot commented 5 years ago

Using my fork it performs correctly but using your latest fixes (in a separate pull) crashes, I ran using "gdb" and this is what it came back with when it crashes:

Program received signal SIGSEGV, Segmentation fault. 0x00000000080f618e in std::vector<std::unique_ptr<mcpe_viz::BlockInfo, std::default_delete >, std::allocator<std::unique_ptr<mcpe_viz::BlockInfo, std::default_delete > > >::size (this=0x83d2750) at /usr/include/c++/6/bits/stl_vector.h:656 656 { return size_type(this->_M_impl._M_finish - this->_M_impl._M_start); }

flagmaggot commented 5 years ago

Forgot the backtrace:

0 0x00000000080f618e in std::vector<std::unique_ptr<mcpe_viz::BlockInfo, std::default_delete >, std::allocator<std::unique_ptr<mcpe_viz::BlockInfo, std::default_delete > > >::size (

this=0x83d2750) at /usr/include/c++/6/bits/stl_vector.h:656

1 0x00000000080e07e0 in mcpe_viz::BlockInfo::hasVariants (this=0x83d26f8) at /mnt/c/shawn/mcpe_viz/mcpe_viz.h:147

2 0x00000000080eb28c in mcpe_viz::DimensionData_LevelDB::generateSlices (this=0x8604c40, db=0x881e510,

fnBase="/mnt/c/sikut/map/images/map") at /mnt/c/shawn/mcpe_viz/mcpe_viz.cc:3373

3 0x00000000080ee30b in mcpe_viz::DimensionData_LevelDB::doOutput (this=0x8604c40, db=0x881e510)

at /mnt/c/shawn/mcpe_viz/mcpe_viz.cc:3888

4 0x00000000080f5631 in mcpe_viz::MinecraftWorld_LevelDB::doOutput (this=0x8602dc0)

at /mnt/c/shawn/mcpe_viz/mcpe_viz.cc:5252

5 0x00000000080dd62a in main (argc=8, argv=0x7ffffffee038) at /mnt/c/shawn/mcpe_viz/mcpe_viz.cc:6283

flagmaggot commented 5 years ago

After some investigation, I find that this line is causing the issue:

https://github.com/Plethora777/mcpe_viz/blob/5d11d70d21405f5ec6def1005117853591a0de27/mcpe_viz.cc#L3248

adding some debugging code, I'm finding that blockid is a negative number (-127, -43, -97 to list a few)

Plethora777 commented 5 years ago

Thanks - will have a look at this

Did you run --html-all or --html-most?

Plethora777 commented 5 years ago

Pushed an update - give it a try

hulmgulm commented 5 years ago

It works again for me. Thank you!

flagmaggot commented 5 years ago

Works fine here too. Btw I was using --html-all when the error was occuring.