Segmentation Fault using VFS + wezu's deferred renderer in loader.load_model

Bug #1687283 reported by ellie
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Panda3D
Fix Released
Undecided
rdb

Bug Description

I get a Segmentation Fault in my project where I add additional model loader paths and I also use wezu's deferred renderer ( https://github.com/wezu/p3d_auto_deferred_shader ) which wraps the loader built-in in some unusual way.

This line crashes in wezu's code (which I know from print debugging):

model = loader.load_model("models/cone")

This is what valgrind captures for the loader.load_model() crash:

==17285== Process terminating with default action of signal 11 (SIGSEGV)
==17285== Access not within mapped region at address 0x0
==17285== at 0x1350F35C: std::ostream::sentry::sentry(std::ostream&) (in /usr/lib64/libstdc++.so.6.0.22)
==17285== by 0x1350F75D: std::ostream::write(char const*, long) (in /usr/lib64/libstdc++.so.6.0.22)
==17285== by 0x12D1955A: VirtualFileSimple::copy_file(VirtualFile*) (in /usr/lib64/panda3d/libpandaexpress.so.1.10)
==17285== by 0x12D19B52: VirtualFileSimple::rename_file(VirtualFile*) (in /usr/lib64/panda3d/libpandaexpress.so.1.10)
==17285== by 0x12D25DDC: VirtualFileSystem::rename_file(Filename const&, Filename const&) (in /usr/lib64/panda3d/libpandaexpress.so.1.10)
==17285== by 0x1287681A: BamCache::store(BamCacheRecord*) (in /usr/lib64/panda3d/libpanda.so.1.10)
==17285== by 0x124A1540: Loader::try_load_file(Filename const&, LoaderOptions const&, LoaderFileType*) const (in /usr/lib64/panda3d/libpanda.so.1.10)
==17285== by 0x124A21A4: Loader::load_file(Filename const&, LoaderOptions const&) const (in /usr/lib64/panda3d/libpanda.so.1.10)
==17285== by 0x113B63DD: Dtool_Loader_load_sync_1555(_object*, _object*, _object*) (in /usr/lib64/python3.5/site-packages/panda3d/core.cpython-35m-x86_64-linux-gnu.so)
==17285== by 0x4EE7F08: PyCFunction_Call (in /usr/lib64/libpython3.5m.so.1.0)
==17285== by 0x4F5FE4F: PyEval_EvalFrameEx (in /usr/lib64/libpython3.5m.so.1.0)
==17285== by 0x4F619B2: ??? (in /usr/lib64/libpython3.5m.so.1.0)

Revision history for this message
rdb (rdb) wrote :

Please attach a test case.

Revision history for this message
ellie (et1234567) wrote :

I managed to make a test case!

WARNING: this test case creates a subfolder with a dummy file and an empty folder in /tmp which it doesn't clean up (that would be kinda hard after a crash, lol) - for more details see comment inside the code file at the top

Revision history for this message
rdb (rdb) wrote :

Now no longer gives a crash; just an error. Please refrain from setting up recursive mounts on / or you may risk tearing a hole in the spacetime continuum.

Changed in panda3d:
assignee: nobody → rdb (rdb)
status: New → Fix Committed
milestone: none → 1.10.0
rdb (rdb)
Changed in panda3d:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.