zedapp / zed

Rethinking code editing.
http://zedapp.org
MIT License
2.22k stars 162 forks source link

TypeError: Cannot call method 'setPreference' of null #414

Closed ladauze closed 10 years ago

ladauze commented 10 years ago

After the auto. upgrade to 0.12.0 I got this in the 'start' window (node): TypeError: Cannot call method 'setPreference' of null at setPreference (app://./js/firstrun.js:2:19) at HTMLDocument.eval (app://./js/firstrun.js:38:5) at fire (app://./dep/jquery.js:974:30) at Object.self.fireWith as resolveWith at Function.jQuery.extend.ready (app://./dep/jquery.js:406:13) at HTMLDocument.DOMContentLoaded (app://./dep/jquery.js:83:11)

After restarting a few times, it worked OK (but my user.json was reset, only showMenus: true, persistentTree: false, )

I got a similar error windows occasionally in the prior version(s) - they disappeared always after the first restart. Using 0.12.0 on Xubuntu 14.04 32 bits. Nodejs v0.10.25

P.S. Thank you for creating such a great editor!! I love it from A to ZED :-)

zefhemel commented 10 years ago

The only case where I can see this occurring is if the project picker window is still running old code (which wasn't reloaded during the upgrade). This could be it. But still it's a very strange problem. And it doesn't explain why your configuration would be reset.

So this only happens after an upgrade, or it happens randomly from time to time?

ladauze commented 10 years ago

At this moment I can not recall the problem.

chenxsan commented 10 years ago

I have this problem too on openSUSE 13.1. A whole new one downloaded from zedapp.org site. So I guess it had nothing to do with the old code?

Then I cloned the source code and built it myself, same problem. After I change toolbar value to true in app/package.json file and rebuilt, it works.

If I removed persistentTree and showMenus in ~/.config/zed/config/user.json, the problem will show again.

So, with the toolbar value set to true, no problem, when false, the problem comes.

zefhemel commented 10 years ago

Ok, I'll see if I can reproduce this tomorrow. Thanks for reporting.  — Zef

Sent from my iPhone

On Thu, Jul 17, 2014 at 5:39 PM, 陈三 notifications@github.com wrote:

I have this problem too on openSUSE 13.1. A whole new one downloaded from zedapp.org site. So I guess it had nothing to do with the old code? Then I cloned the source code and built it myself, same problem. After I change toolbar value to true in app/package.json file and rebuilt, it works. If I removed persistentTree and showMenus in ~/.config/zed/config/user.json, the problem will show again.

So, with the toolbar value set to true, no problem, when false, the problem comes.

Reply to this email directly or view it on GitHub: https://github.com/zedapp/zed/issues/414#issuecomment-49324107

zefhemel commented 10 years ago

I tried installing Zed 0.12 on Windows (7) and Linux (Ubuntu 64-bit 13.10) and can't reproduce the problem you're seeing. The popup asking for the UI mode appears and I can make a selection. Everything works fine, no errors...

chenxsan commented 10 years ago

Yeah, I tested it on windows xp, it's alright. So any suggest on how I can figure out the problem myself?

On Friday, July 18, 2014, Zef Hemel <notifications@github.com javascript:_e(%7B%7D,'cvml','notifications@github.com');> wrote:

I tried installing Zed 0.12 on Windows (7) and Linux (Ubuntu 64-bit 13.10) and can't reproduce the problem you're seeing. The popup asking for the UI mode appears and I can make a selection. Everything works fine, no errors...

— Reply to this email directly or view it on GitHub https://github.com/zedapp/zed/issues/414#issuecomment-49430631.

Sam Chen

Blog - http://www.zfanw.com/blog/

zefhemel commented 10 years ago

Sorry for the delay here. I think I found the issue (timing). Can you verify it works now?

chenxsan commented 10 years ago

Cool, it works on my openSUSE now.

zefhemel commented 10 years ago

Great!

-- Zef

On Mon, Aug 4, 2014 at 2:37 PM, 陈三 notifications@github.com wrote:

Cool, it works on my openSUSE now.

— Reply to this email directly or view it on GitHub https://github.com/zedapp/zed/issues/414#issuecomment-51054017.