openage icon indicating copy to clipboard operation
openage copied to clipboard

"cannot play" opus files

Open Birch-san opened this issue 7 years ago • 3 comments

I encounter Data didn't contain opus stream: /assets/converted/sounds/6042.opus. I checked and confirmed that the absolute path to the file was correct, and pointed to a real file on my computer. I played the file in mpv, and it played correctly. I checked the bytes of the file [0]; they don't look weird.

Here's the stack trace I encounter [1].

[0] bytes

➜  ~ xxd /Users/birch/git/openage/assets/converted/sounds/6042.opus | head -n 60
00000000: 4f67 6753 0002 0000 0000 0000 0000 df9a  OggS............
00000010: 5060 0000 0000 8040 1b70 0113 4f70 7573  P`[email protected]
00000020: 4865 6164 0101 9001 2256 0000 0000 004f  Head...."V.....O
00000030: 6767 5300 0000 0000 0000 0000 00df 9a50  ggS............P
00000040: 6001 0000 0005 b276 7403 ffff fe4f 7075  `......vt....Opu
00000050: 7354 6167 730d 0000 006c 6962 6f70 7573  sTags....libopus
00000060: 2031 2e31 2e34 0200 0000 2500 0000 454e   1.1.4....%...EN
00000070: 434f 4445 523d 6f70 7573 656e 6320 6672  CODER=opusenc fr
00000080: 6f6d 206f 7075 732d 746f 6f6c 7320 302e  om opus-tools 0.
00000090: 312e 3917 0000 0045 4e43 4f44 4552 5f4f  1.9....ENCODER_O
000000a0: 5054 494f 4e53 3d2d 2d71 7569 6574 0000  PTIONS=--quiet..
000000b0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
000000c0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
000000d0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
000000e0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
000000f0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000100: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000110: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000120: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000130: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000140: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000150: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000160: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000170: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000180: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000190: 0000 0000 0000 0000 0000 0000 0000 0000  ................
000001a0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
000001b0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
000001c0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
000001d0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
000001e0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
000001f0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000200: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000210: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000220: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000230: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000240: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000250: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000260: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000270: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000280: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000290: 0000 0000 0000 0000 0000 0000 0000 0000  ................
000002a0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
000002b0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
000002c0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
000002d0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
000002e0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
000002f0: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000300: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000310: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000320: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000330: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000340: 0000 0000 0000 0000 004f 6767 5300 0080  .........OggS...
00000350: bb00 0000 0000 00df 9a50 6002 0000 004b  .........P`....K
00000360: 3444 2f32 7353 5251 5454 5d65 666b 6b69  4D/2sSRQTT]efkki
00000370: 6d6e 6a6a 6b69 6b6d 676a 696b 7168 6969  mnjjkikmgjikqhii
00000380: 6a69 6b6b 6f69 6c6c 6f69 686d 6c66 6769  jikkoilloihmlfgi
00000390: 6461 635a 5757 d87f 6593 8c7f fd24 8d58  dacZWW..e....$.X
000003a0: 1ab0 3cff ccf6 a45b 42bf d810 de74 f02b  ..<....[B....t.+
000003b0: 394e fba0 5144 7815 01e1 90e5 da0c 4ed5  9N..QDx.......N.

[1] stack trace

WARN cannot play: Traceback (most recent call last):
  File ?, in start+0x1 [0x7fffe80a7235]
  File ?, in main+0x18b [0x108de9a6b]
  File ?, in __Pyx_main(int, wchar_t**)+0x6d [0x108de9b3d]
  File ?, in PyInit_run+0x9e5 [0x108de82d5]
  File ?, in __Pyx_PyObject_CallNoArg(_object*)+0x33 [0x108de9683]
  File ?, in __Pyx_PyFunction_FastCallDict(_object*, _object**, int, _object*)+0x20f [0x108dea50f]
  File ?, in __Pyx_PyFunction_FastCallNoKw(PyCodeObject*, _object**, long, _object*)+0x13c [0x108dead9c]
  File ?, in _PyEval_EvalFrameDefault+0x68eb [0x108e9ba44]
  File ?, in call_function+0x20c [0x108e9e683]
  File ?, in _PyFunction_FastCall+0x79 [0x108e9f7f8]
  File ?, in _PyEval_EvalFrameDefault+0x68eb [0x108e9ba44]
  File ?, in call_function+0x232 [0x108e9e6a9]
  File ?, in _PyCFunction_FastCallDict+0x1cd [0x108e371a3]
  File ?, in __pyx_pw_7openage_4game_8main_cpp_1run_game(_object*, _object*, _object*)+0x355 [0x10c956da5]
  File ?, in __pyx_pf_7openage_4game_8main_cpp_run_game(_object*, _object*, _object*)+0xa4a [0x10c95835a]
  File ?, in openage::run_game(openage::main_arguments const&)+0x587 [0x1090a0d37]
  File ?, in openage::Engine::run()+0x37 [0x10904fec7]
  File ?, in openage::Engine::loop()+0x664 [0x1090505b4]
  File ?, in openage::gui::GUI::on_input(SDL_Event*)+0x2f [0x1091bb11f]
  File ?, in qtsdl::GuiInput::process(SDL_Event*)+0x38 [0x1091c7b18]
  File ?, in qtsdl::GuiInputImpl::process(SDL_Event*)+0x566 [0x1091db896]
  File ?, in qtsdl::GuiInputImpl::relay_input_event(QEvent*, bool)+0x87 [0x1091dbe87]
  File ?, in qtsdl::GuiInputImpl::input_event(std::__1::atomic<bool>*, QEvent*, bool)+0x6d [0x1095e815d]
  File ?, in QMetaObject::activate(QObject*, int, int, void**)+0x9ea [0x10af392fa]
  File ?, in QtPrivate::QSlotObject<void (qtsdl::EventHandlingQuickWindow::*)(std::__1::atomic<bool>*, QEvent*, bool), QtPrivate::List<std::__1::atomic<bool>*, QEvent*, bool>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*)+0xa6 [0x1091dc566]
  File ?, in void QtPrivate::FunctionPointer<void (qtsdl::EventHandlingQuickWindow::*)(std::__1::atomic<bool>*, QEvent*, bool)>::call<QtPrivate::List<std::__1::atomic<bool>*, QEvent*, bool>, void>(void (qtsdl::EventHandlingQuickWindow::*)(std::__1::atomic<bool>*, QEvent*, bool), qtsdl::EventHandlingQuickWindow*, void**)+0x50 [0x1091dc640]
  File ?, in QtPrivate::FunctorCall<QtPrivate::IndexesList<0, 1, 2>, QtPrivate::List<std::__1::atomic<bool>*, QEvent*, bool>, void, void (qtsdl::EventHandlingQuickWindow::*)(std::__1::atomic<bool>*, QEvent*, bool)>::call(void (qtsdl::EventHandlingQuickWindow::*)(std::__1::atomic<bool>*, QEvent*, bool), qtsdl::EventHandlingQuickWindow*, void**)+0xae [0x1091dc71e]
  File ?, in qtsdl::EventHandlingQuickWindow::on_input_event(std::__1::atomic<bool>*, QEvent*, bool)+0xbd [0x1091dc9ad]
  File ?, in QCoreApplication::sendEvent(QObject*, QEvent*)+0x38 [0x1091dcc78]
  File ?, in QCoreApplication::notifyInternal2(QObject*, QEvent*)+0xa4 [0x10af07a34]
  File ?, in QCoreApplication::notify(QObject*, QEvent*)+0x2d [0x10af07aad]
  File ?, in QCoreApplicationPrivate::notify_helper(QObject*, QEvent*)+0x12f [0x10af07e4f]
  File ?, in QQuickWindow::event(QEvent*)+0x34c [0x10a0f334c]
  File ?, in QWindow::event(QEvent*)+0xf4 [0x10a3bcad4]
  File ?, in QQuickWindowPrivate::handleMouseEvent(QMouseEvent*)+0x858 [0x10a0f61a8]
  File ?, in QQuickWindowPrivate::deliverPointerEvent(QQuickPointerEvent*)+0x36 [0x10a0f52f6]
  File ?, in QQuickWindowPrivate::deliverMouseEvent(QQuickPointerMouseEvent*)+0xb3 [0x10a0f4813]
  File ?, in QQuickWindow::sendEvent(QQuickItem*, QEvent*)+0x7c [0x10a0f45bc]
  File ?, in QCoreApplication::notifyInternal2(QObject*, QEvent*)+0xa4 [0x10af07a34]
  File ?, in QCoreApplication::notify(QObject*, QEvent*)+0x2d [0x10af07aad]
  File ?, in QCoreApplicationPrivate::notify_helper(QObject*, QEvent*)+0x12f [0x10af07e4f]
  File ?, in QQuickItem::event(QEvent*)+0x101 [0x10a0e3c41]
  File ?, in QQuickMouseArea::mouseReleaseEvent(QMouseEvent*)+0xa7 [0x10a1692e7]
  File ?, in QQuickMouseArea::setPressed(Qt::MouseButton, bool, Qt::MouseEventSource)+0x1ab [0x10a168abb]
  File ?, in QQuickMouseArea::released(QQuickMouseEvent*)+0x40 [0x10a23c2d0]
  File ?, in QMetaObject::activate(QObject*, int, int, void**)+0x79 [0x10af38989]
  File ?, in QQmlNotifier::emitNotify(QQmlNotifierEndpoint*, void**)+0x2e5 [0x10aa67885]
  File ?, in QQmlBoundSignal::setEnabled(bool)+0x1dd [0x10aa26b3d]
  File ?, in QQmlBoundSignalExpression::evaluate(void**)+0x475 [0x10aa26345]
  File ?, in QQmlJavaScriptExpression::evaluate(QV4::CallData*, bool*, QV4::Scope&)+0x293 [0x10aa862c3]
  File ?, in QV4::FunctionObject::sourceLocation() const+0x1fe9 [0x10a981319]
  File ?, in ? [0x116f22166]
  File ?, in QV4::Runtime::method_callProperty(QV4::ExecutionEngine*, int, QV4::CallData*)+0x334 [0x10a9f61e4]
  File ?, in QV4::QObjectMethod::callInternal(QV4::CallData*, QV4::Scope&) const+0x7b6 [0x10a9e0586]
  File ?, in QV4::QObjectMethod::callInternal(QV4::CallData*, QV4::Scope&) const+0xcef [0x10a9e0abf]
  File ?, in QV4::QMetaObjectWrapper::isEqualTo(QV4::Managed*, QV4::Managed*)+0x209c [0x10a9e41fc]
  File ?, in qt_plugin_instance+0xd9d [0x116e6766d]
  File ?, in qt_plugin_instance+0xadd [0x116e673ad]
  File ?, in QMetaObject::activate(QObject*, int, int, void**)+0x79 [0x10af38989]
  File ?, in QQmlNotifier::emitNotify(QQmlNotifierEndpoint*, void**)+0x2e5 [0x10aa67885]
  File ?, in QQmlBoundSignal::setEnabled(bool)+0x1dd [0x10aa26b3d]
  File ?, in QQmlBoundSignalExpression::evaluate(void**)+0x475 [0x10aa26345]
  File ?, in QQmlJavaScriptExpression::evaluate(QV4::CallData*, bool*, QV4::Scope&)+0x293 [0x10aa862c3]
  File ?, in QV4::FunctionObject::sourceLocation() const+0x1593 [0x10a9808c3]
  File ?, in ? [0x116f218f6]
  File ?, in QV4::Runtime::method_callProperty(QV4::ExecutionEngine*, int, QV4::CallData*)+0x334 [0x10a9f61e4]
  File ?, in QV4::QObjectMethod::callInternal(QV4::CallData*, QV4::Scope&) const+0x488 [0x10a9e0258]
  File ?, in QV4::QObjectMethod::callInternal(QV4::CallData*, QV4::Scope&) const+0xaf6 [0x10a9e08c6]
  File ?, in QV4::QMetaObjectWrapper::isEqualTo(QV4::Managed*, QV4::Managed*)+0x1098 [0x10a9e31f8]
  File ?, in QQmlVMEMetaObject::metaCall(QObject*, QMetaObject::Call, int, void**)+0x321 [0x10a9fea01]
  File ?, in QMetaObject::activate(QObject*, int, int, void**)+0x79 [0x10af38989]
  File ?, in QQmlNotifier::emitNotify(QQmlNotifierEndpoint*, void**)+0x2e5 [0x10aa67885]
  File ?, in QQmlBoundSignal::setEnabled(bool)+0x1dd [0x10aa26b3d]
  File ?, in QQmlBoundSignalExpression::evaluate(void**)+0x475 [0x10aa26345]
  File ?, in QQmlJavaScriptExpression::evaluate(QV4::CallData*, bool*, QV4::Scope&)+0x293 [0x10aa862c3]
  File ?, in QV4::FunctionObject::sourceLocation() const+0x1fe9 [0x10a981319]
  File ?, in ? [0x116f8c74d]
  File ?, in QV4::Runtime::method_callProperty(QV4::ExecutionEngine*, int, QV4::CallData*)+0x334 [0x10a9f61e4]
  File ?, in QV4::QObjectMethod::callInternal(QV4::CallData*, QV4::Scope&) const+0x488 [0x10a9e0258]
  File ?, in QV4::QObjectMethod::callInternal(QV4::CallData*, QV4::Scope&) const+0xaf6 [0x10a9e08c6]
  File ?, in QV4::QMetaObjectWrapper::isEqualTo(QV4::Managed*, QV4::Managed*)+0x1098 [0x10a9e31f8]
  File ?, in openage::gui::GameCreator::qt_metacall(QMetaObject::Call, int, void**)+0x75 [0x1095e4aa5]
  File ?, in openage::gui::GameCreator::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)+0xb3 [0x1095e44d3]
  File ?, in openage::gui::GameCreator::activate()+0x12b [0x109185eab]
  File ?, in void qtsdl::GuiItemMethods<openage::gui::GameMainLink>::i<openage::gui::GameCreator::activate()::$_0, openage::gui::GameSpecLink*&, openage::gui::GeneratorLink*&, std::__1::shared_ptr<openage::gui::GameCreatorSignals>&>(openage::gui::GameCreator::activate()::$_0, openage::gui::GameSpecLink*&&&, openage::gui::GeneratorLink*&&&, std::__1::shared_ptr<openage::gui::GameCreatorSignals>&&&)+0x119 [0x109186249]
  File ?, in qtsdl::GameLogicCaller::in_game_logic_thread(std::__1::function<void ()> const&) const+0x4a [0x1095e756a]
  File ?, in QMetaObject::activate(QObject*, int, int, void**)+0x9ea [0x10af392fa]
  File ?, in QtPrivate::QSlotObject<void (qtsdl::GuiCallback::*)(std::__1::function<void ()> const&), QtPrivate::List<std::__1::function<void ()> const&>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*)+0xa6 [0x1091d1906]
  File ?, in void QtPrivate::FunctionPointer<void (qtsdl::GuiCallback::*)(std::__1::function<void ()> const&)>::call<QtPrivate::List<std::__1::function<void ()> const&>, void>(void (qtsdl::GuiCallback::*)(std::__1::function<void ()> const&), qtsdl::GuiCallback*, void**)+0x50 [0x1091d19e0]
  File ?, in QtPrivate::FunctorCall<QtPrivate::IndexesList<0>, QtPrivate::List<std::__1::function<void ()> const&>, void, void (qtsdl::GuiCallback::*)(std::__1::function<void ()> const&)>::call(void (qtsdl::GuiCallback::*)(std::__1::function<void ()> const&), qtsdl::GuiCallback*, void**)+0x85 [0x1091d1a95]
  File ?, in qtsdl::GuiCallback::process(std::__1::function<void ()> const&)+0x19 [0x1091d30e9]
  File ?, in std::__1::function<void ()>::operator()() const+0x7e [0x1091d316e]
  File ?, in std::__1::__function::__func<void qtsdl::GuiItemMethods<openage::gui::GameMainLink>::i<openage::gui::GameCreator::activate()::$_0, openage::gui::GameSpecLink*&, openage::gui::GeneratorLink*&, std::__1::shared_ptr<openage::gui::GameCreatorSignals>&>(openage::gui::GameCreator::activate()::$_0, openage::gui::GameSpecLink*&&&, openage::gui::GeneratorLink*&&&, std::__1::shared_ptr<openage::gui::GameCreatorSignals>&&&)::'lambda'(), std::__1::allocator<void qtsdl::GuiItemMethods<openage::gui::GameMainLink>::i<openage::gui::GameCreator::activate()::$_0, openage::gui::GameSpecLink*&, openage::gui::GeneratorLink*&, std::__1::shared_ptr<openage::gui::GameCreatorSignals>&>(openage::gui::GameCreator::activate()::$_0, openage::gui::GameSpecLink*&&&, openage::gui::GeneratorLink*&&&, std::__1::shared_ptr<openage::gui::GameCreatorSignals>&&&)::'lambda'()>, void ()>::operator()()+0x29 [0x1091894c9]
  File ?, in void std::__1::__invoke_void_return_wrapper<void>::__call<void qtsdl::GuiItemMethods<openage::gui::GameMainLink>::i<openage::gui::GameCreator::activate()::$_0, openage::gui::GameSpecLink*&, openage::gui::GeneratorLink*&, std::__1::shared_ptr<openage::gui::GameCreatorSignals>&>(openage::gui::GameCreator::activate()::$_0, openage::gui::GameSpecLink*&&&, openage::gui::GeneratorLink*&&&, std::__1::shared_ptr<openage::gui::GameCreatorSignals>&&&)::'lambda'()&>(void qtsdl::GuiItemMethods<openage::gui::GameMainLink>::i<openage::gui::GameCreator::activate()::$_0, openage::gui::GameSpecLink*&, openage::gui::GeneratorLink*&, std::__1::shared_ptr<openage::gui::GameCreatorSignals>&>(openage::gui::GameCreator::activate()::$_0, openage::gui::GameSpecLink*&&&, openage::gui::GeneratorLink*&&&, std::__1::shared_ptr<openage::gui::GameCreatorSignals>&&&)::'lambda'()&&&)+0x2d [0x1091897bd]
  File ?, in void qtsdl::GuiItemMethods<openage::gui::GameMainLink>::i<openage::gui::GameCreator::activate()::$_0, openage::gui::GameSpecLink*&, openage::gui::GeneratorLink*&, std::__1::shared_ptr<openage::gui::GameCreatorSignals>&>(openage::gui::GameCreator::activate()::$_0, openage::gui::GameSpecLink*&&&, openage::gui::GeneratorLink*&&&, std::__1::shared_ptr<openage::gui::GameCreatorSignals>&&&)::'lambda'()::operator()() const+0x98 [0x109189868]
  File ?, in openage::gui::GameCreator::activate()::$_0::operator()(openage::GameMainHandle*, openage::GameSpecHandle*, openage::Generator*, std::__1::shared_ptr<openage::gui::GameCreatorSignals>) const+0x12d [0x1091899dd]
  File ?, in openage::Generator::create(std::__1::shared_ptr<openage::GameSpec>)+0x91c [0x10928f4ec]
  File ?, in openage::GameMain::GameMain(openage::Generator const&)+0x1d [0x10921dfdd]
  File ?, in openage::GameMain::GameMain(openage::Generator const&)+0xc21 [0x10921dbe1]
  File ?, in openage::Generator::add_units(openage::GameMain&) const+0x5d3 [0x10928e533]
  File ?, in openage::UnitContainer::new_unit(openage::UnitType&, openage::Player&, openage::coord::phys3)+0x320 [0x10948e4d0]
  File ?, in openage::LivingProducer::place(openage::Unit*, std::__1::shared_ptr<openage::Terrain>, openage::coord::phys3) const+0xc9 [0x1094238f9]
  File ?, in openage::MovableProducer::place(openage::Unit*, std::__1::shared_ptr<openage::Terrain>, openage::coord::phys3) const+0xc9 [0x109420e09]
  File ?, in openage::ObjectProducer::place(openage::Unit*, std::__1::shared_ptr<openage::Terrain>, openage::coord::phys3) const+0x5b8 [0x10941e3d8]
  File ?, in openage::Sound::play() const+0x132 [0x10923ff72]
  File ?, in openage::audio::Sound::play()+0x60 [0x1090f2d70]
  File ?, in openage::audio::DynamicResource::use()+0x32a [0x1090d62ba]
  File ?, in openage::audio::DynamicLoader::create(openage::util::Path const&, openage::audio::format_t)+0x116 [0x1090d4e26]
  File ?, in openage::audio::OpusDynamicLoader::OpusDynamicLoader(openage::util::Path const&)+0x1d [0x1090ebc9d]
  File ?, in openage::audio::OpusDynamicLoader::OpusDynamicLoader(openage::util::Path const&)+0x48 [0x1090eb978]
  File ?, in openage::audio::open_opus_file(openage::util::Path const&)+0xef0 [0x1090ee380]
  File ?, in openage::audio::Error::Error(openage::log::message const&)+0x1d [0x1090ea1ed]
  File ?, in openage::audio::Error::Error(openage::log::message const&)+0x30 [0x1090ea1b0]
  File "libopenage/audio/opus_loading.cpp", line 121, in openage::audio::opus_file_t openage::audio::open_opus_file(const util::Path &)
openage::audio::Error: Could not open opus file: Path(Union(Directory(/Users/birch/git/openage/cfg).root @ (b'cfg',), Directory(/Users/birch/git/openage/assets).root @ (b'assets',)):/assets/converted/sounds/6042.opus) = '/Users/birch/git/openage/assets/converted/sounds/6042.opus': Data didn't contain opus stream

Birch-san avatar May 07 '17 16:05 Birch-san