pkulchenko/ZeroBranePackage

todoall path

stuta opened this issue · 10 comments

stuta commented

I have packages in ~/.zbstudio/packages.

screen shot 2018-05-22 at 12 20 23

I'll have to check, but you may be better off by using https://github.com/pkulchenko/ZeroBranePackage/blob/master/tasks.lua plugin instead, as it's more comprehensive and likely has better UI.

stuta commented

I tried, but tasks.lua crashes on zbs startup. I removed all other plugins and then I get an error.

Lua: Error while running chunk
/Users/pasi/.zbstudio/packages/tasks.lua:303: attempt to call global 'scrollTo' (a nil value)
stack traceback:
	/Users/pasi/.zbstudio/packages/tasks.lua:303: in function 'ensureFileNodeVisible'
	/Users/pasi/.zbstudio/packages/tasks.lua:510: in function 'scanAllOpenEditorsAndMap'
	/Users/pasi/.zbstudio/packages/tasks.lua:754: in function </Users/pasi/.zbstudio/packages/tasks.lua:751>
	src/editor/commands.lua:993: in function <src/editor/commands.lua:981>
	[C]: at 0x01076d67
	src/main.lua:869: in main chunk
	[C]: at 0x00001c80

@stuta, I noticed the same thing, so I fixed that issue along with several others and pushed the changes. Give it another try.

stuta commented

It still crashes on startup with other plugins. I was able to get it to start once, but not any more even when this is the only plugin.

stuta commented
--------------------------------------------------------------------------------
Language                      files          blank        comment           code
--------------------------------------------------------------------------------
JSON                           1674            161              0         220514
Lua                             872          22344          31396         145513
...
--------------------------------------------------------------------------------
SUM:                           2637          23893          42133         428278
--------------------------------------------------------------------------------

What's the error message? It can't be the same, as that line was updated...

Or does it run out of memory?

stuta commented

I can't get error message, zbs crashes on start. Segmentation fault 11.

stuta commented

I updated to last zbs and it did not crash on first launch. Subsequent launches crashed.

Process:               lua [85969]
Path:                  /Users/USER/*/ZeroBraneStudio.app/Contents/ZeroBraneStudio/bin/lua
Identifier:            com.ZeroBrane.ZeroBraneStudio
Version:               devel (???)
Code Type:             X86 (Native)
Parent Process:        ??? [1]
Responsible:           lua [85969]
User ID:               501

Date/Time:             2018-05-23 22:54:22.578 +0300
OS Version:            Mac OS X 10.13.4 (17E202)
Report Version:        12
Anonymous UUID:        8A41161B-44BE-0C69-9958-D87A1A6201BD

Sleep/Wake UUID:       8A9EFCCC-126A-402C-AA1A-3A3D0EA9643A

Time Awake Since Boot: 74000 seconds
Time Since Wake:       31000 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGSEGV)
Exception Codes:       KERN_INVALID_ADDRESS at 0x00000000000000b1
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Segmentation fault: 11
Termination Reason:    Namespace SIGNAL, Code 0xb
Terminating Process:   exc handler [0]

VM Regions Near 0xb1:
--> 
    __TEXT                 0000000000001000-0000000000003000 [    8K] r-x/rwx SM=COW  i?� [/Users/pasi/installed/Lua/ZeroBraneStudio/bin/lua.app/Contents/MacOS/lua]

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libwx.dylib                   	0x01ce2c48 0x1800000 + 5123144
1   libwx.dylib                   	0x01892012 0x1800000 + 598034
2   liblua.dylib                  	0x000da3a0 0xd8000 + 9120

I'll have to check on OSX; I tried on several large projects on Windows and didn't see any crashes.

Is your project publicly available?

stuta commented

No, it's not public. Just copy many same folders inside each other, you get big project very fast. Also install all plugins when testing this.

But I think this is some kind of a preference problem. Zbs must save some info somewhere (where?) what was the screen layout and opened files. First start works but next one's don't. I suspect the problem occurs when parsing the saved preference file and doing something that was not in preference file in the first launch.