Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSX IDE crashes on file open #264

Closed
bobcgausa opened this issue Jan 10, 2014 · 23 comments

Comments

Projects
None yet
2 participants
@bobcgausa
Copy link

commented Jan 10, 2014

just installed on macbook pro with latest os version and updates (10.9.1 --PK)
ran first example fine then die got an error an crashed to osx error dialog
restarted ide and it said restoring from save point
no matter what the ice crashes if i try to open any other project

is the save in a tmp directory, if so, where?
do you thing deleting the temp file will fix the problem?

@bobcgausa bobcgausa closed this Jan 10, 2014

@bobcgausa bobcgausa reopened this Jan 10, 2014

@ghost ghost assigned pkulchenko Jan 10, 2014

@pkulchenko

This comment has been minimized.

Copy link
Owner

commented Jan 10, 2014

@bobcgausa, what version ZBS are you using? You can delete the file that stores auto-recovery data; see this FAQ entry.

@pkulchenko

This comment has been minimized.

Copy link
Owner

commented Jan 10, 2014

Can you send me the file on which the IDE crashes? Does it have any UTF-8 characters? I opened a wxwidgets ticket two months ago, which could be related to this case.

It would be great if you could also include the stack trace from the OSX crash dialog as it will help to check if it's the same issue or not. Thank you!

@bobcgausa

This comment has been minimized.

Copy link
Author

commented Jan 10, 2014

zerobrane studio(0.40; mobdebug 0.55)
i click on the app.it prints Found auto-recovery record and restored saved session.File/new or file/open then crash the ide
i was running corona demo when it got into this stateProcess: lua [1356]Path: /Users/USER/Desktop/ZeroBraneStudio 2.24.12 PM.app/Contents/ZeroBraneStudio/bin/luaIdentifier: com.ZeroBrane.ZeroBraneStudioVersion: ??? (???)Code Type: X86 (Native)Parent Process: bash [1355]Responsible: bash [1353]User ID: 501
Date/Time: 2014-01-10 15:49:48.033 -0500OS Version: Mac OS X 10.9.1 (13B42)Report Version: 11Anonymous UUID: 0B929301-3349-6288-ADBC-E206E3646CF3

Crashed Thread: 7 CVDisplayLink
Exception Type: EXC_BAD_ACCESS (SIGBUS)Exception Codes: KERN_PROTECTION_FAILURE at 0x0000000000000148
VM Regions Near 0x148:--> _PAGEZERO 0000000000000000-0000000000001000 [ 4K] ---/--- SM=NUL /Users/USER/Desktop/ZeroBraneStudio 2.24.12 PM.app/Contents/ZeroBraneStudio/bin/lua.app/Contents/MacOS/lua TEXT 0000000000001000-0000000000003000 [ 8K] r-x/rwx SM=COW /Users/USER/Desktop/ZeroBraneStudio 2.24.12 PM.app/Contents/ZeroBraneStudio/bin/lua.app/Contents/MacOS/lua
Application Specific Information:Performing @selector(clickedAction:) from sender wxNSMenuItem 0x18ab60
Thread 0:: Dispatch queue: com.apple.main-thread0 libobjc.A.dylib 0x927f8f72 fixupSelectorsInMethodList(objc_class
, old_method_list
) + 2261 libobjc.A.dylib 0x927f7004 class_getMethodNoSuper_nolock(objc_class, objc_selector
) + 952 libobjc.A.dylib 0x927f6e7f lookUpImpOrForward + 2673 libobjc.A.dylib 0x927f0ca3 _class_lookupMethodAndLoadCache3 + 554 libobjc.A.dylib 0x927f04e1 objc_msgSend + 815 com.apple.AppKit 0x93e222d0 -[NSControl _commonControlInit] + 356 com.apple.AppKit 0x93e4e07f -[NSControl initWithCoder:] + 8837 com.apple.AppKit 0x93e71d73 -[NSTextField initWithCoder:] + 588 com.apple.Foundation 0x90101440 _decodeObjectBinary + 32729 com.apple.Foundation 0x90102880 -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 197310 com.apple.Foundation 0x90102af9 -[NSArray(NSArray) initWithCoder:] + 28511 com.apple.Foundation 0x90101440 _decodeObjectBinary + 327212 com.apple.Foundation 0x9010060f _decodeObject + 27913 com.apple.Foundation 0x901004f0 -[NSKeyedUnarchiver decodeObjectForKey:] + 17514 com.apple.AppKit 0x93e05647 -[NSView initWithCoder:] + 192615 com.apple.AppKit 0x93e07398 -[NSClassSwapper initWithCoder:] + 58616 com.apple.Foundation 0x90101440

@pkulchenko

This comment has been minimized.

Copy link
Owner

commented Jan 10, 2014

@bobcgausa, can you email me the content of $HOME/Library/Preferences/ZeroBraneStudio Preferences file?

@bobcgausa

This comment has been minimized.

Copy link
Author

commented Jan 10, 2014

[MainFrame]
s=0
x=371
y=123
w=1000
h=732
[projectsession]
1=/Users/bobcook/Desktop/ZeroBraneStudio.app/Contents/ZeroBraneStudio/myprograms
[view]
uimgrlayout=layout2|name=notebook;caption=;state=256;dir=5;layer=0;row=0;pos=0;prop=100000;bestw=20;besth=20;minw=-1;minh=-1;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=-1;floath=-1|name=projpanel;caption=Project;state=18876412;dir=4;layer=1;row=0;pos=0;prop=100000;bestw=200;besth=200;minw=200;minh=200;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=200;floath=400|name=bottomnotebook;caption=;state=18876412;dir=3;layer=1;row=0;pos=0;prop=100000;bestw=200;besth=200;minw=100;minh=100;maxw=-1;maxh=-1;floatx=-1;floaty=-1;floatw=400;floath=200|name=stackpanel;caption=;state=18876415;dir=4;layer=0;row=0;pos=0;prop=100000;bestw=360;besth=200;minw=180;minh=100;maxw=-1;maxh=-1;floatx=193;floaty=199;floatw=511;floath=480|name=watchpanel;caption=;state=18876415;dir=4;layer=0;row=0;pos=0;prop=100000;bestw=360;besth=200;minw=180;minh=100;maxw=-1;maxh=-1;floatx=331;floaty=218;floatw=360;floath=200|dock_size(5,0,0)=20|dock_size(4,1,0)=202|dock_size(3,1,0)=198|
nblayout=nblayout|welcome.lua|untitled.lua|untitled.lua||
nbbtmlayout=nblayout|Output|Local console||
[filehistory]
1=/Users/bobcook/Desktop/ZeroBraneStudio.app/Contents/ZeroBraneStudio/myprograms/welcome.lua
2=/Users/bobcook/Desktop/ZeroBraneStudio 2.24.12 PM.app/Contents/ZeroBraneStudio/myprograms/welcome.lua
3=/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/myprograms/love2d-samples/trajectory/main.lua
4=/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/myprograms/love2d-samples/trajectory/conf.lua
5=/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/myprograms/love2d-samples/demo.lua
6=/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/myprograms/welcome.lua
7=/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/myprograms/corona-samples/live-coding-simple/mobdebug.lua
8=/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/myprograms/corona-samples/live-coding-simple/main.lua
9=/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/cfg/user.lua
10=/Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/myprograms/corona-samples/demo.lua
[editor]
interpreter=corona
[session]
recovery={{cursorpos = 0, filename = "/Users/bobcook/Desktop/ZeroBraneStudio.app/Contents/ZeroBraneStudio/myprograms/welcome.lua", id = 0, modified = 1387150808, tabname = "welcome.lua"}, {cursorpos = 0, id = 2, tabname = "untitled.lua"}}
index=0

@bobcgausa

This comment has been minimized.

Copy link
Author

commented Jan 10, 2014

i tried deleting the preferences filestart app, crash on file/openbut allows me to run through programming examples

@pkulchenko

This comment has been minimized.

Copy link
Owner

commented Jan 11, 2014

@bobcgausa, I'm a bit puzzled by this. I took your ini file and put it in my installation (with slightly modified paths), but I can't create any crash (although I'm running 10.7.4). I can open existing and new files without any issues.

Does the crash happen when you select a particular file? Or does it happen when you select File | New or File | Open, even before you see the Open dialog? By looking at the stack trace, it doesn't seem to be the issue I referenced earlier, so it's something else.

Can you also try to clone github version to a local folder (git clone https://github.com/pkulchenko/ZeroBraneStudio.git; cd ZeroBraneStudio; ./zbstudio.sh) and see if you get the same crash with it?

@bobcgausa

This comment has been minimized.

Copy link
Author

commented Jan 11, 2014

not even a particular file, just file/open then crashentered your shell script1st action was file/open, then crashare you sure there are no other temp files read on startup beside preferences?i don't think problem has anything to do with pref file

@pkulchenko

This comment has been minimized.

Copy link
Owner

commented Jan 11, 2014

@bobcgausa, still not sure what may be causing this and can't reproduce it. I built a new version of libwx.dylib with two changes: it uses wxwidgets 3.x and it has debugging on, which should produce a more usable stacktrace.

Just copy the file in the archive to /Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/bin folder (or wherever you have ZBS installed); when you launch ZBS, the About screen (Help | About) will show wxwidgets 3.1.

I'd like to now if you still get the crash and if so, how the stack tract looks like. Please make sure you copy it to the ticket directly (not through the email as it removes newlines, which makes it very difficult to read). Thanks!

@bobcgausa

This comment has been minimized.

Copy link
Author

commented Jan 11, 2014

replaced dylib in bin directorystarted app, did Aboutbuilt with wxlibs 3.1.0tried file/op, crashed

@pkulchenko

This comment has been minimized.

Copy link
Owner

commented Jan 12, 2014

@bobcgausa, very useful; thank you. Can you also include a crash report when you do File | New? Just to confirm, when you use File | Open the app crashes before you see the OSX file dialog, right?

Also, how did you manage to open at least some of the files? Did it work in some cases?

@pkulchenko

This comment has been minimized.

Copy link
Owner

commented Jan 12, 2014

@bobcgausa, can you also try opening a file from the FileTree (by doubleclicking on the filename) to see if it crashes?

@bobcgausa

This comment has been minimized.

Copy link
Author

commented Jan 12, 2014

file/new works and creates untitled.luathe crash occurs before seeing the file/open dialog
the default file tree works finei can dbl-clk on a file, i can view/execute all programming exampleshowever file/open or file/save crashesattached is the file/save crash log

@pkulchenko

This comment has been minimized.

Copy link
Owner

commented Jan 19, 2014

@bobcgausa, can you try removing/commenting out export DYLD_FORCE_FLAT_NAMESPACE=1 line from ZeroBraneStudio.app/Contents/MacOS/ZeroBraneStudio to see if the crashes go away?

@bobcgausa

This comment has been minimized.

Copy link
Author

commented Jan 20, 2014

thanks for keeping at itdid i comment it out correctly?now it doesn't execute at alltried clicking on .app in Applications too
Robert-Cooks-MacBook-Pro:MacOS bobcook$ cat Zero*
#!/bin/bash

ZBS_PATH=${0%//}
if [ ! -d $ZBS_PATH ]; then ZBS_PATH=${PWD%/*}; fi
export DYLD_LIBRARY_PATH="$ZBS_PATH/ZeroBraneStudio/bin"
#export DYLD_FORCE_FLAT_NAMESPACE=1
if [[ ! -e $DYLD_LIBRARY_PATH/libedit.3.dylib && ! -e /usr/lib/libedit.3.dylib ]]
then ln -s /usr/lib/libedit.2.dylib $DYLD_LIBRARY_PATH/libedit.3.dylib; fi
(cd "$ZBS_PATH/ZeroBraneStudio"; bin/lua src/main.lua zbstudio "$@")
Robert-Cooks-MacBook-Pro:MacOS bobcook$ ls -l
total 8
-rwxr-xr-x@ 1 bobcook admin 402 Jan 19 20:59 ZeroBraneStudio
Robert-Cooks-MacBook-Pro:MacOS bobcook$ ./ZeroBraneStudio
bin/lua: error loading module 'wx' from file 'bin/libwx.dylib':
dlopen(bin/libwx.dylib, 6): Symbol not found: _luaL_argerror
Referenced from: /Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/bin/libwx.dylib
Expected in: /Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/bin/liblua.dylib
in /Applications/ZeroBraneStudio.app/Contents/ZeroBraneStudio/bin/libwx.dylib
stack traceback:
[C]: at 0x00093340
[C]: in function 'require'
src/main.lua:27: in main chunk
[C]: at 0x00001c80

@pkulchenko

This comment has been minimized.

Copy link
Owner

commented Jan 20, 2014

Good point; there are few more changes required in terms of dependencies between binaries.

If you have few minutes, can you test it with this command:

git clone https://github.com/pkulchenko/ZeroBraneStudio.git
cd ZeroBraneStudio
git checkout df6ac05478
./zbstudio.sh

This will check out the version before that change was made; I want to confirm that this would indeed fixed your issue.

@bobcgausa

This comment has been minimized.

Copy link
Author

commented Jan 20, 2014

Paul
works greati am writing a book on Lua/Corona for beginners and would like to use zero for the IDE chapter if that's ok.my other books are at amazon.com under robert cook
so far1. selecting a file, then copy, then paste into a different project doesn't work2. how to delete a file in a project3. table display show a single-line window that runs off right side of display how to get a vertical window with per-line list or how to scroll in single linebob

@pkulchenko

This comment has been minimized.

Copy link
Owner

commented Jan 20, 2014

works great

ok; this is good. Thank you for confirming the fix.

i am writing a book on Lua/Corona for beginners and would like to use zero for the IDE chapter if that's ok.

Sure; please do.

so far1. selecting a file, then copy, then paste into a different project doesn't work

Not sure what you mean by pasting a file into a different project. You can copy the file content into a different file (or simply copy a file to a different directory, and then set that directory as the project directory).

  1. how to delete a file in a project

You can right click on a file in the file tree and select "Delete" from the menu. Note that this will delete the file from disk, so make sure that's really what you want to do.

  1. table display show a single-line window that runs off right side of display
    how to get a vertical window with per-line list or how to scroll in single

Do you mean the tables printed in local console are shown as one line? Yes, you can output a table in a block format if you prepend the expression with =:

> {1,2,3}
{1, 2, 3} --[[table: 0x040b0210]]
> ={1,2,3}
{
  1,
  2,
  3
} --[[table: 0x03fbf8d0]]
@bobcgausa

This comment has been minimized.

Copy link
Author

commented Jan 20, 2014

table display show a single-line window that runs off right side of display
how to get a vertical window with per-line list or how to scroll in single

Do you mean the tables printed in local console are shown as one line? Yes, you can output a table in a block format if you prepend the expression with =:

no, i meant when you hover over a table variablethe popup window is a single long line

@bobcgausa

This comment has been minimized.

Copy link
Author

commented Jan 26, 2014

step over etc on mac all display fn F10
typing =table for a linked list shows the whole nested thing which makes it hard to see fields in the 1st elementcan the recursive following be turned off?

@pkulchenko

This comment has been minimized.

Copy link
Owner

commented Jan 27, 2014

typing =table for a linked list shows the whole nested thing which makes it hard to see fields in the 1st elementcan the recursive following be turned off?

Try return require('mobdebug').line(a, {indent = ' ', maxlevel = 1}). Replace a with the value you want to see (it can be an expression as well). You can change maxlevel to whatever works for you.

@bobcgausa

This comment has been minimized.

Copy link
Author

commented Feb 9, 2014

Paul
Would you be willing to review my book chapter on ZB?The book is for beginning programmers so I did not cover live changes.thanks.
bob cook


Reply to this email directly or view it on GitHub.

@pkulchenko

This comment has been minimized.

Copy link
Owner

commented Feb 9, 2014

@bobcgausa, sure, send me an email to the address in my github profile.

@pkulchenko pkulchenko added this to the 0.41 milestone Mar 1, 2014

@pkulchenko pkulchenko added this to the 0.50 milestone Mar 10, 2014

@pkulchenko pkulchenko removed this from the 0.41 milestone Mar 10, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.