{"action":"opened","issue":{"url":"https://api.github.com/repos/openMSX/openMSX/issues/986","labels_url":"https://api.github.com/repos/openMSX/openMSX/issues/986/labels{/name}","comments_url":"https://api.github.com/repos/openMSX/openMSX/issues/986/comments","events_url":"https://api.github.com/repos/openMSX/openMSX/issues/986/events","html_url":"https://github.com/openMSX/openMSX/issues/986","id":120547497,"number":986,"title":"Saving to tape causes assertion failure","user":{"login":"MBilderbeek","id":12675978,"avatar_url":"https://avatars.githubusercontent.com/u/12675978?v=3","gravatar_id":"","url":"https://api.github.com/users/MBilderbeek","html_url":"https://github.com/MBilderbeek","followers_url":"https://api.github.com/users/MBilderbeek/followers","following_url":"https://api.github.com/users/MBilderbeek/following{/other_user}","gists_url":"https://api.github.com/users/MBilderbeek/gists{/gist_id}","starred_url":"https://api.github.com/users/MBilderbeek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MBilderbeek/subscriptions","organizations_url":"https://api.github.com/users/MBilderbeek/orgs","repos_url":"https://api.github.com/users/MBilderbeek/repos","events_url":"https://api.github.com/users/MBilderbeek/events{/privacy}","received_events_url":"https://api.github.com/users/MBilderbeek/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-05T11:09:22Z","updated_at":"2015-12-05T11:09:22Z","closed_at":null,"body":"Scenario: save a file to tape.\r\n\r\nConsole: cassetteplayer new /tmp/test.wav\r\n\r\nIn my case, I used bsave to save some RAM to the wav file.\r\n\r\n```\r\nProgram terminated with signal SIGSEGV, Segmentation fault.\r\n#0  openmsx::CassettePlayer::updateTapePosition (this=this@entry=0x18fc480, \r\n    duration=duration@entry=..., time=...)\r\n    at src/cassette/CassettePlayer.cc:449\r\n449\t\tassert(tapePos <= playImage->getEndTime());\r\n[Current thread is 1 (Thread 0x7fa347cdb940 (LWP 6237))]\r\n(gdb) bt full\r\n#0  openmsx::CassettePlayer::updateTapePosition (this=this@entry=0x18fc480, duration=duration@entry=..., time=...)\r\n    at src/cassette/CassettePlayer.cc:449\r\n        __PRETTY_FUNCTION__ = \"void openmsx::CassettePlayer::updateTapePosition(param, param)\"\r\n#1  0x0000000000464efd in openmsx::CassettePlayer::sync (this=0x18fc480, time=...) at src/cassette/CassettePlayer.cc:439\r\nNo locals.\r\n#2  0x00000000004650f3 in openmsx::CassettePlayer::setSignal (this=0x18fc480, output=<optimized out>, time=...)\r\n    at src/cassette/CassettePlayer.cc:430\r\nNo locals.\r\n#3  0x0000000000435dd8 in openmsx::MSXPPI::writeC1 (this=0x18d0870, value=<optimized out>, time=...) at src/MSXPPI.cc:171\r\nNo locals.\r\n#4  0x0000000000422e68 in openmsx::I8255::outputPortC (this=this@entry=0x18d0950, value=<optimized out>, time=..., time@entry=...)\r\n    at src/I8255.cc:253\r\nNo locals.\r\n#5  0x0000000000422ebf in openmsx::I8255::writeControlPort (this=0x18d0950, value=<optimized out>, time=...) at src/I8255.cc:285\r\n        bitmask = <optimized out>\r\n#6  0x00000000004abb20 in openmsx::MSXCPUInterface::writeIO (time=..., value=<optimized out>, port=<optimized out>, this=<optimized out>)\r\n    at src/cpu/MSXCPUInterface.hh:121\r\nNo locals.\r\n#7  openmsx::CPUCore<openmsx::Z80TYPE>::WRITE_PORT (cc=<optimized out>, value=<optimized out>, port=<optimized out>, \r\n    this=<optimized out>) at src/cpu/CPUCore.cc:584\r\nNo locals.\r\n#8  openmsx::CPUCore<openmsx::Z80TYPE>::out_byte_a (this=<optimized out>) at src/cpu/CPUCore.cc:4020\r\nNo locals.\r\n#9  openmsx::CPUCore<openmsx::Z80TYPE>::executeInstructions (this=0x15a2470) at src/cpu/CPUCore.cc:1167\r\n        __PRETTY_FUNCTION__ = \"void openmsx::CPUCore<CPU_POLICY>::executeInstructions() [with CPU_POLICY = openmsx::Z80TYPE]\"\r\n        opcodeTable = {0x4ae2af <openmsx::CPUCore<openmsx::Z80TYPE>::executeInstructions()+21647>, \r\n```"}}