Comments (5)
oh wait, i also get the error on http://copy.sh/v86/debug.html?profile=archlinux
how can it be that the error doesn't occur in production mode? is it because the length is actually unused and the closure compiler optimizes it out?
from v86.
This is a weakness in the saving/restoring mechanism. It's essentially an extended version of JSON.parse
and JSON.stringify
, with extra handling for array buffers, typed arrays and skipping certain properties. Since properties names are changed during compilation, the snapshots cannot be shared between minified and unminified versions.
As an alternative, all properties would need to be written out explicitly, for example like this:
RTC.prototype.save_state = function()
{
return [
this.cmos_index,
this.boot_order,
// ...
];
};
RTC.prototype.restore_state = function(state)
{
this.cmos_index = state[0];
this.boot_order = state[1];
// ...
};
That's probably a better strategy to implement this (but more complex), and I'll leave the issue open for this purpose. It's not high on my priority list at the moment, though.
Fixing this would also allow using state buffers between different versions of the emulator, assuming no changes to the state format are made. Closure Compiler renames properties differently even if minor changes are made to the code.
An alternative would be to switch to a less aggressive minifier. In my opinion, dead code elimination and linting are too useful to switch away from Closure Compiler.
from v86.
This problem has been annoying me, because I had to rebuild the Archlinux image after every code change and couldn't even build it with a script.
It's fixed now: State images should work between different builds of the emulator and after rebuilds.
from v86.
im encountering the error on the latest build with ubuntu 10.04. my save works on the online version but not my local build.
error is:
Uncaught TypeError: a[1] is undefined
G file:///home/actionguy/Projects/wasm-linux-vm/v86_all.js:65
G file:///home/actionguy/Projects/wasm-linux-vm/v86_all.js:101
G file:///home/actionguy/Projects/wasm-linux-vm/v86_all.js:81
G file:///home/actionguy/Projects/wasm-linux-vm/v86_all.js:262
Od file:///home/actionguy/Projects/wasm-linux-vm/v86_all.js:202
Od file:///home/actionguy/Projects/wasm-linux-vm/v86_all.js:62
n file:///home/actionguy/Projects/wasm-linux-vm/v86_all.js:364
g file:///home/actionguy/Projects/wasm-linux-vm/v86_all.js:365
setTimeout handler*bf/t< file:///home/actionguy/Projects/wasm-linux-vm/v86_all.js:368
done file:///home/actionguy/Projects/wasm-linux-vm/v86_all.js:368
onload file:///home/actionguy/Projects/wasm-linux-vm/v86_all.js:346
a file:///home/actionguy/Projects/wasm-linux-vm/v86_all.js:345
t file:///home/actionguy/Projects/wasm-linux-vm/v86_all.js:368
done file:///home/actionguy/Projects/wasm-linux-vm/v86_all.js:368
onload file:///home/actionguy/Projects/wasm-linux-vm/v86_all.js:346
a file:///home/actionguy/Projects/wasm-linux-vm/v86_all.js:345
t file:///home/actionguy/Projects/wasm-linux-vm/v86_all.js:368
done file:///home/actionguy/Projects/wasm-linux-vm/v86_all.js:368
onload file:///home/actionguy/Projects/wasm-linux-vm/v86_all.js:346
a file:///home/actionguy/Projects/wasm-linux-vm/v86_all.js:345
t file:///home/actionguy/Projects/wasm-linux-vm/v86_all.js:368
done file:///home/actionguy/Projects/wasm-linux-vm/v86_all.js:368
onload file:///home/actionguy/Projects/wasm-linux-vm/v86_all.js:346
a file:///home/actionguy/Projects/wasm-linux-vm/v86_all.js:345
t file:///home/actionguy/Projects/wasm-linux-vm/v86_all.js:368
bf file:///home/actionguy/Projects/wasm-linux-vm/v86_all.js:369
done file:///home/actionguy/Projects/wasm-linux-vm/v86_all.js:360
promise callback*done file:///home/actionguy/Projects/wasm-linux-vm/v86_all.js:360
onload file:///home/actionguy/Projects/wasm-linux-vm/v86_all.js:346
a file:///home/actionguy/Projects/wasm-linux-vm/v86_all.js:345
Pa file:///home/actionguy/Projects/wasm-linux-vm/v86_all.js:360
onload file:///home/actionguy/Projects/wasm-linux-vm/index.html:31
EventHandlerNonNull* file:///home/actionguy/Projects/wasm-linux-vm/index.html:29
v86_all.js:65:240
from v86.
@iAmInActions Can you open the file in debug.html and post the error again?
from v86.
Related Issues (20)
- I can't see the : and . characters in the QtWeb web address (ReactOS) HOT 1
- Windows 2000 floppy disk support HOT 2
- Creating GUI with cosmos gives error HOT 1
- Age of empires 2 crashes when you try to start a game HOT 7
- Compiling Microsoft's MS-DOS 4.00 sources under V86 HOT 6
- Alpine Linux Issue HOT 8
- BUG: Ctrl+S KeyStroke Freezes the Shell - At Official Web Too HOT 3
- Linux - Synchronize NumLock, CapsLock & ScrollLock HOT 2
- Feature Request - Linux - 9PFS over WebSockets HOT 9
- Linux - Rebooting - Causes error in JavaScript HOT 3
- Feature Request- ACPI Wakeup Call upon initializing VM from saved image state HOT 1
- DSL start screen wont close HOT 3
- KolibriOS failed to load HOT 2
- DSL broken HOT 8
- IP via vpn? HOT 1
- Boot Blue Jay? HOT 1
- Mounting CDROM ISO after loading emulator??? HOT 2
- Screen appears to "loop around" when resolution goes above 1024x768 on Alpine Linux
- Endless black screen loading from large .img file when selfhosting, no issues manually loading on website HOT 4
- resizing dom terminal HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from v86.