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

ZeroBrane studio crashes when using win7 x64 #164

Closed
thebothead opened this issue Jun 2, 2013 · 59 comments
Closed

ZeroBrane studio crashes when using win7 x64 #164

thebothead opened this issue Jun 2, 2013 · 59 comments
Assignees
Labels

Comments

@thebothead
Copy link

In my win7 x64 laptop ZeroBrane intermittently crashes when I am working on LUA code in the IDE. I have captured a core dump file from the most recent crash and shared it here (https://docs.google.com/file/d/0B7KLcn-Vx-2VRmpUR2lOdlFFNnc/edit?usp=sharing). The crashes are occurring pretty frequently making it very difficult to make consistent progress when using the IDE...

@ghost ghost assigned pkulchenko Jun 3, 2013
@pkulchenko
Copy link
Owner

@thebothead, sorry to hear this is happening and thank you for reporting. I don't have access to win7 64bit machine and unfortunately can't do the analysis on a 32bit machine (I found some instructions here).

Maybe we can try to solve the issue in a different way. First of all, what version of ZBS are you running? What are you trying to do when the app crashes? Some of the earlier versions could crash when auto-complete suggestions were generated or when the IDE was closed while the debugging was still in progress. Both of those issues have been fixed and I haven't seen (or got any reports) about crashes with v0.37 or the current master branch.

It may also help if you could generate the stack trace I can read based on the dump file. I'm working on getting access to a win7 64bit machine, but it may take few days. Thanks.

@thebothead
Copy link
Author

@pkulchenko I am running ZeroBrane Studio (0.37; MobDebug 0.526). The app has been crashing intermittently when I've been typing in the editor (I think it might have actually been an auto-complete or intelli-sense scenario in some of the cases, but I can't remember exactly:/), I will take better note of the repro steps if it happens again, I was hoping the dump file would have been enough information.

I am not sure how else I can generate the stack trace for an application that has crashed other than creating a dump file for the process that has encountered a fatal error such as this. I think so long as you have the matching sources, PDB's, and binaries you should be able to step right into the source at that line of code that encountered the error (giving you the stack trace) right? You could probably even pull open the dump file in WinDBG to get the exception information.

If it happens again I'll let you know if I have more information. If there is any logging or any other data that the app generates itself that you would like me to share let me know and I will.

@thebothead thebothead reopened this Jun 3, 2013
@thebothead
Copy link
Author

Accidently closed it, re-opened it.

@pkulchenko
Copy link
Owner

Thank you for the details; I was thinking maybe you can generate the stack trace based on the dump file using WinDBG (as I need to have 64bit WinDBG and can't run it on 32bit system I have), but even that may not be possible as the executable is compiled using mingw, which doesn't generate PDB file WinDBG can use.

I guess I'll probably need to try to reproduce it myself when I get access to 64 bit win7 instance. Do you have anything in user.lua that changes default configuration?

Another option would be to try to reproduce the same issue and use run-time debugger like DrMingw. You may not get a complete list of symbols (as I do have debug information stripped from the executable/dlls), but if we can't identify the issue using the debugger and I can't reproduce it, I can prepare a version with debug information to see what may be going on. There is some interesting information in this SO question, but using DrMingw may be the easiest option.

I'll also try to extend the code to do its own crash analysis, but this may take even longer... Thanks for all your help.

@thebothead
Copy link
Author

Ok, thanks! I have to step away from my dev station for the day but will try some of the things you mentioned as well as try and see if I can pull anything useful out of the dump file. Will keep you posted.

@pkulchenko
Copy link
Owner

Sounds good; this will be very helpful.

@thebothead
Copy link
Author

So I loaded up the crash dump in WinDBG and ran the exception analysis command and here's what I got so far...

Microsoft (R) Windows Debugger Version 6.12.0002.633 AMD64
Copyright (c) Microsoft Corporation. All rights reserved.

Loading Dump File [...\zbstudio.DMP]
User Mini Dump File with Full Memory: Only application data is available

Symbol search path is: SRV_C:\sym_http://msdl.microsoft.com/download/symbols
Executable search path is:
Windows 7 Version 7601 (Service Pack 1) MP (8 procs) Free x64
Product: WinNt, suite: SingleUserTS
Machine Name:
Debug session time: Sun Jun 2 14:29:49.000 2013 (UTC - 4:00)
System Uptime: 0 days 4:17:59.721
Process Uptime: 0 days 0:16:27.000
.................................WARNING: winspool overlaps winmm
...............WARNING: rsaenh overlaps cryptsp
.WARNING: RpcRtRemote overlaps rsaenh
...............
..........WARNING: msvcp100 overlaps msvcr100
.....WARNING: propsys overlaps swi_ifslsp
........WARNING: NapiNSP overlaps nlaapi
........WARNING: rasadhlp overlaps FWPUCLNT
.
wow64cpu!CpupSyscallStub+0x9:
00000000`745c2e09 c3 ret
0:000> !analyze -v


  •                                                                         *
    
  •                    Exception Analysis                                   *
    
  •                                                                         *
    

*** ERROR: Module load completed but symbols could not be loaded for zbstudio.exe
GetPageUrlData failed, server returned HTTP status 404
URL requested: http://watson.microsoft.com/StageOne/zbstudio_exe/0_0_0_0/513f5afd/unknown/0_0_0_0/bbbbbbb4/80000003/00000000.htm?Retriage=1

FAULTING_IP:
+7880220
00000000`00000000 ?? ???

EXCEPTION_RECORD: ffffffffffffffff -- (.exr 0xffffffffffffffff)
ExceptionAddress: 0000000000000000
ExceptionCode: 80000003 (Break instruction exception)
ExceptionFlags: 00000000
NumberParameters: 0

FAULTING_THREAD: 0000000000001d1c

DEFAULT_BUCKET_ID: STATUS_BREAKPOINT

PROCESS_NAME: zbstudio.exe

OVERLAPPED_MODULE: Address regions for 'propsys' and 'swi_ifslsp' overlap

ERROR_CODE: (NTSTATUS) 0x80000003 - {EXCEPTION} Breakpoint A breakpoint has been reached.

EXCEPTION_CODE: (HRESULT) 0x80000003 (2147483651) - One or more arguments are invalid

MOD_LIST:

NTGLOBALFLAG: 0

APPLICATION_VERIFIER_FLAGS: 0

PRIMARY_PROBLEM_CLASS: STATUS_BREAKPOINT

BUGCHECK_STR: APPLICATION_FAULT_STATUS_BREAKPOINT

LAST_CONTROL_TRANSFER: from 00000000745c283e to 00000000745c2e09

STACK_TEXT:
000000000008ec08 00000000745c283e : 00000000769881c8 0000000074630023 0000000000200246 000000000028ef38 : wow64cpu!CpupSyscallStub+0x9
000000000008ec10 000000007463d07e : 0000000000000000 00000000745c1920 0000000076ed5410 0000000076deecd1 : wow64cpu!WaitForMultipleObjects32+0x3b
000000000008ecd0 000000007463c549 : 0000000000000000 0000000000000000 0000000074634ac8 000000007ffe0030 : wow64!RunCpuSimulation+0xa
000000000008ed20 0000000076e04956 : 0000000000573f80 0000000000000000 0000000076ef2670 0000000076ec5978 : wow64!Wow64LdrpInitialize+0x429
000000000008f270 0000000076e01a17 : 0000000000000000 0000000076e04061 000000000008f820 0000000000000000 : ntdll!LdrpInitializeProcess+0x17e4
000000000008f760 0000000076dec32e : 000000000008f820 0000000000000000 000000007efdf000 0000000000000000 : ntdll! ?? ::FNODOBFM::string'+0x29220 000000000008f7d0 0000000000000000 : 0000000000000000 0000000000000000 0000000000000000 00000000`00000000 : ntdll!LdrInitializeThunk+0xe

STACK_COMMAND: ~0s; .ecxr ; kb

FOLLOWUP_IP:
wow64cpu!CpupSyscallStub+9
00000000`745c2e09 c3 ret

SYMBOL_STACK_INDEX: 0

SYMBOL_NAME: wow64cpu!CpupSyscallStub+9

FOLLOWUP_NAME: MachineOwner

MODULE_NAME: wow64cpu

IMAGE_NAME: wow64cpu.dll

DEBUG_FLR_IMAGE_TIMESTAMP: 50b8488e

FAILURE_BUCKET_ID: STATUS_BREAKPOINT_80000003_wow64cpu.dll!CpupSyscallStub

BUCKET_ID: X64_APPLICATION_FAULT_STATUS_BREAKPOINT_wow64cpu!CpupSyscallStub+9

WATSON_STAGEONE_URL: http://watson.microsoft.com/StageOne/zbstudio_exe/0_0_0_0/513f5afd/unknown/0_0_0_0/bbbbbbb4/80000003/00000000.htm?Retriage=1

Followup: MachineOwner

@pkulchenko
Copy link
Owner

@thebothead, thank you for the crash report. It looks a bit strange as it appears that the fault is in wow64cpu module/dll and the error code (0x80000003) indicates that "a hard coded breakpoint or assertion was hit, but this system was booted /NODEBUG."

I found several (possibly relevant) references for this error; one of them (back from 2008) suggested running the app with a different set of credentials (unfortunately, there is no information on why exactly this would help). Could you try running ZBS with admin or non-admin credentials?

@pkulchenko
Copy link
Owner

It appears that the dump could be wrong as it's captured as a 64bit dump when it should be 32bit dump; this article provides some details and several solutions. One recommendation is to use ProcDump, which can capture 32bit dump for unhandled exception on 64bit system.

@thebothead
Copy link
Author

That's very interesting, nice find! I will make sure to capture a new dump file using ProcDump the next time it happens and post the new dump file. I am currently running the app as an administrator (I set a short-cut to always do that) and installed to the "C:\Program Files (x86)\ZeroBraneStudio". Later tonight when I have a chance to do some work that involves zbstudio I'll keep an eye out for this and be ready to re-capture the dump if I hit the crash again, sorry I didn't get that right the first time:(

@pkulchenko
Copy link
Owner

@thebothead, please do. I checked with other users who are also running win7/64bit and so far nobody has reported anything similar. Is there something unique to your setup? For example, do you have any settings in cfg/user.lua? I'm trying to gather as much information as possible to reproduce the issue. Thank you.

@thebothead
Copy link
Author

I have not changed anything myself in those files. I should have mentioned that I am using Marmalade 6.2 with Quick, if that helps at all.

@pkulchenko
Copy link
Owner

It does help; just to confirm, the crash happens when you edit something or when you debug your Quick application (or start debugging)?

@thebothead
Copy link
Author

The crash only occurred when I was writing code in the editor, never in a debug session, and I am pretty sure that the crash was when auto-complete/intellisense would kick in (I.e. after typing a semi-colon on the director object).

@pkulchenko
Copy link
Owner

@thebothead, one last question: ZBS doesn't crash right away, it appears to be "busy" for a second or two and crashes or you need to "kill" it? There was an issue in auto-complete logic that was weeks about 3 weeks ago (#153), but it was after 0.37 was released.

You may want to get the most recent version from the master branch and try it to see if it resolves the issue.

@thebothead
Copy link
Author

Busy for a second or two and them crashes, haven't had to kill it. That issue 153 looks like it is probably the same thing that is going on here. I will grab the latest and use that. I'll re-open this issue if it doesn't resolve the issue, at which point will have an x32 dump to look at too. Thanks for all your help!

@pkulchenko
Copy link
Owner

Sounds good; closing for now, but please let me know if the issue is (not) resolved in the current master. Thank you!

@thebothead
Copy link
Author

@pkulchenko I happened to hit this again (note that I haven't pulled the latest verison yet, still the version I mentioned above). This time I used procdump to grab a 32-bit dump file, and ran analyze exception again and got some better looking information (shown below). I also shared the new dump file here (https://docs.google.com/file/d/0B7KLcn-Vx-2VWW16aTBMMlZieG8/edit?usp=sharing) for you, and I think that even without symbols/sources attached you can probably dig deeper into the exception address shown here to get some more information out of it. This time when the crash occurred I was typing in a text file (.txt extension) in ZeroBrane, not even a lua source file. Let me know if there is anything else I can provide here.

*** procdump.exe -ma 12488
*** Manual dump'
Symbol search path is: SRV_C:\sym_http://msdl.microsoft.com/download/symbols
Executable search path is:
Windows 7 Version 7601 (Service Pack 1) MP (8 procs) Free x86 compatible
Product: WinNt, suite: SingleUserTS
Machine Name:
Debug session time: Wed Jun 5 14:54:50.000 2013 (UTC - 4:00)
System Uptime: 0 days 3:15:17.791
Process Uptime: 0 days 0:09:48.000
................................................................
..........................
Loading unloaded module list
.
eax=00000000 ebx=0028e36c ecx=00032880 edx=025800ca esi=00000002 edi=00000000
eip=7759013d esp=0028e31c ebp=0028e3b8 iopl=0 nv up ei pl zr na pe nc
cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00200246
ntdll!ZwWaitForMultipleObjects+0x15:
7759013d 83c404 add esp,4
0:000> !analyze -v


  •                                                                         *
    
  •                    Exception Analysis                                   *
    
  •                                                                         *
    

*** ERROR: Module load completed but symbols could not be loaded for zbstudio.exe
*** ERROR: Symbol file could not be found. Defaulted to export symbols for lua51.dll -
GetPageUrlData failed, server returned HTTP status 404
URL requested: http://watson.microsoft.com/StageOne/zbstudio_exe/0_0_0_0/513f5afd/unknown/0_0_0_0/bbbbbbb4/80000003/00000000.htm?Retriage=1

FAULTING_IP:
+1b
0c7c0233 ?? ???

EXCEPTION_RECORD: 0028e668 -- (.exr 0x28e668)
ExceptionAddress: 0c7c0233
ExceptionCode: c0000005 (Access violation)
ExceptionFlags: 00000000
NumberParameters: 2
Parameter[0]: 00000000
Parameter[1]: 0c7c0233
Attempt to read from address 0c7c0233

FAULTING_THREAD: 00002680

DEFAULT_BUCKET_ID: STATUS_BREAKPOINT

PROCESS_NAME: zbstudio.exe

ERROR_CODE: (NTSTATUS) 0x80000003 - {EXCEPTION} Breakpoint A breakpoint has been reached.

EXCEPTION_CODE: (HRESULT) 0x80000003 (2147483651) - One or more arguments are invalid

MOD_LIST:

NTGLOBALFLAG: 0

APPLICATION_VERIFIER_FLAGS: 0

CONTEXT: 0028e6b8 -- (.cxr 0x28e6b8)
eax=06905ca8 ebx=02f936d0 ecx=00032880 edx=025800ca esi=02258fb4 edi=00032880
eip=0c7c0233 esp=0028eb1c ebp=0028eb38 iopl=0 nv up ei pl nz na po nc
cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00210202
0c7c0233 ?? ???
Resetting default scope

READ_ADDRESS: 0c7c0233

FOLLOWUP_IP:
wx!ZN12wxEvtHandler15AddPendingEventERK7wxEvent+0
02330b24 55 push ebp

FAILED_INSTRUCTION_ADDRESS:
+0
0c7c0233 ?? ???

ADDITIONAL_DEBUG_TEXT: Followup set based on attribute [Is_ChosenCrashFollowupThread] from Frame:[0] on thread:[PSEUDO_THREAD]

LAST_CONTROL_TRANSFER: from 02330b3f to 0c7c0233

PRIMARY_PROBLEM_CLASS: STATUS_BREAKPOINT

BUGCHECK_STR: APPLICATION_FAULT_STATUS_BREAKPOINT

IP_ON_HEAP: 0c7c0233
The fault address in not in any loaded module, please check your build's rebase
log at \bin\build_logs\timebuild\ntrebase.log for module which may
contain the address if it were loaded.

IP_IN_FREE_BLOCK: c7c0233

STACK_TEXT:
0028eb1c 0c7c0233 unknown!unknown+0x0
0028eb20 02330b3f wx!ZN12wxEvtHandler15AddPendingEventERK7wxEvent+0x1b
0028eb40 01f93fe7 wx!Z38wxLua_wxProgressDialog_delete_functionPPv+0x88a
0028eb60 66d85a49 lua51!lua_getinfo+0x1015
0028eb70 66d8ddd1 lua51!lua_close+0x1eb9
0028ebb0 66d8ea14 lua51!lua_close+0x2afc
0028ec50 66d85e34 lua51!lua_getinfo+0x1400
0028ed00 66d85f89 lua51!lua_yield+0x81
0028ed10 66d86431 lua51!lua_yield+0x529
0028ed80 02025c4e wx!ZN10wxLuaState8LuaPCallEii+0x7c
0028edc0 0201b2da wx!ZN18wxLuaEventCallback7OnEventEP7wxEvent+0x1f4
0028ee20 0201b09b wx!ZN18wxLuaEventCallback11OnAllEventsER7wxEvent+0x59
0028ee70 02257e3a wx!ZNK16wxAppConsoleBase16CallEventHandlerEP12wxEvtHandlerR14wxEventFunctorR7wxEvent+0x42
0028eec0 02259839 wx!ZN12wxEvtHandler23ProcessEventIfMatchesIdERK21wxEventTableEntryBasePS_R7wxEvent+0x65
0028eef0 02259aa3 wx!ZN12wxEvtHandler23SearchDynamicEventTableER7wxEvent+0x4f
0028ef20 02259ae2 wx!ZN12wxEvtHandler11TryHereOnlyER7wxEvent+0x28
0028ef40 02259b48 wx!ZN12wxEvtHandler19ProcessEventLocallyER7wxEvent+0x1a
0028ef60 02259bc9 wx!ZN12wxEvtHandler12ProcessEventER7wxEvent+0x63
0028ef90 02032fb0 wx!ZN16wxStyledTextCtrl12NotifyParentEP14SCNotification+0x252
0028f070 02035022 wx!ZN11ScintillaWX12NotifyParentE14SCNotification+0x1e
0028f090 02042de0 wx!ZN6Editor10NotifyCharEi+0x3a
0028f160 02052f85 wx!ZN6Editor10AddCharUTFEPcjb+0x3e1
0028f1c0 0203c151 wx!ZN13ScintillaBase10AddCharUTFEPcjb+0x9f
0028f200 020366a9 wx!ZN11ScintillaWX9DoAddCharEi+0x6f
0028f250 02257e3a wx!ZNK16wxAppConsoleBase16CallEventHandlerEP12wxEvtHandlerR14wxEventFunctorR7wxEvent+0x42
0028f2a0 02259839 wx!ZN12wxEvtHandler23ProcessEventIfMatchesIdERK21wxEventTableEntryBasePS_R7wxEvent+0x65
0028f2d0 0225990e wx!ZN16wxEventHashTable11HandleEventER7wxEventP12wxEvtHandler+0x62
0028f300 02259b26 wx!ZN12wxEvtHandler11TryHereOnlyER7wxEvent+0x6c
0028f320 02259b48 wx!ZN12wxEvtHandler19ProcessEventLocallyER7wxEvent+0x1a
0028f340 02259bc9 wx!ZN12wxEvtHandler12ProcessEventER7wxEvent+0x63
0028f370 022599d5 wx!ZN12wxEvtHandler18SafelyProcessEventER7wxEvent+0x19
0028f390 0214405e wx!ZN8wxWindow10HandleCharEjl+0x3e
0028f420 02146998 wx!ZN8wxWindow16MSWHandleMessageEPljjl+0x9ac
0028f5f0 0213efd8 wx!ZN8wxWindow13MSWWindowProcEjjl+0x36
0028f650 021416fe wx!Z9wxWndProcP6HWND__jjl+0x86
0028f690 752062fa user32!InternalCallWinProc+0x23
0028f6bc 75206d3a user32!UserCallWinProcCheckWow+0x109
0028f734 752077c4 user32!DispatchMessageWorker+0x3bc
0028f794 7520788a user32!DispatchMessageW+0xf
0028f7a4 7522c81f user32!IsDialogMessageW+0x5f6
0028f7d0 0214151a wx!ZN8wxWindow17MSWProcessMessageEP6tagMSG+0x30a
0028f840 02221573 wx!ZN14wxGUIEventLoop17PreProcessMessageEP6tagMSG+0xf3
0028f870 02221435 wx!ZN14wxGUIEventLoop14ProcessMessageEP6tagMSG+0x19
0028f890 022213f8 wx!ZN14wxGUIEventLoop8DispatchEv+0x11e
0028f8d0 022a77fd wx!ZN17wxEventLoopManual3RunEv+0x5d
0028f900 0225851b wx!ZN16wxAppConsoleBase8MainLoopEv+0x39
0028f940 01f71357 wx!ZN18wxLuaGridTableBaseC2ERK10wxLuaState+0x1413
0028f970 66d85a49 lua51!lua_getinfo+0x1015
0028f980 66d8dda4 lua51!lua_close+0x1e8c
0028f990 66d8d96c lua51!lua_close+0x1a54
0028f9c0 66d8ea14 lua51!lua_close+0x2afc
0028fa38 7759e38c ntdll!RtlpLowFragHeapAllocFromContext+0xaec
0028faf4 7759e0f2 ntdll!RtlAllocateHeap+0x206
7759e394 ff8b9090 unknown!unknown+0x0
7759e3a4 05077f80 unknown!unknown+0x0
7759e3a8 4b5b840f unknown!unknown+0x0
7759e3ac 078b0006 unknown!unknown+0x0
7759e3b0 eec1f78b unknown!unknown+0x0
7759e3b4 33f03303 unknown!unknown+0x0
7759e3b8 6700a435 unknown!unknown+0x0
7759e3bc fc7d8977 unknown!unknown+0x0
7759e3c0 468bf133 unknown!unknown+0x0
7759e3c4 f4458904 unknown!unknown+0x0
7759e3c8 800747c6 unknown!unknown+0x0
7759e3cc 000647c6 unknown!unknown+0x0
7759e3d0 8b085e8b unknown!unknown+0x0
7759e3d4 5d890c4e unknown!unknown+0x0
7759e3d8 01c383e0 unknown!unknown+0x0
7759e3dc 83e44d89 unknown!unknown+0x0
7759e3e0 e38101d1 unknown!unknown+0x0

SYMBOL_NAME: wx!ZN12wxEvtHandler15AddPendingEventERK7wxEvent+0

FOLLOWUP_NAME: MachineOwner

MODULE_NAME: wx

IMAGE_NAME: wx.dll

DEBUG_FLR_IMAGE_TIMESTAMP: 5130fe8c

STACK_COMMAND: .cxr 000000000028E6B8 ; kb ; dds 28eb1c ; kb

FAILURE_BUCKET_ID: STATUS_BREAKPOINT_80000003_wx.dll!ZN12wxEvtHandler15AddPendingEventERK7wxEvent

BUCKET_ID: APPLICATION_FAULT_STATUS_BREAKPOINT_BAD_IP_wx!ZN12wxEvtHandler15AddPendingEventERK7wxEvent+0

WATSON_STAGEONE_URL: http://watson.microsoft.com/StageOne/zbstudio_exe/0_0_0_0/513f5afd/unknown/0_0_0_0/bbbbbbb4/80000003/00000000.htm?Retriage=1

Followup: MachineOwner

@pkulchenko
Copy link
Owner

@thebothead, thank you for the update; this looks very useful! I'm puzzled a bit by the crash report though as it shows calls that I wouldn't expect to see there. For example, it references wxProgressDialog in one of the last frames, but I don't use wxProgressDialog anywhere in the application and don't expect to see any references to it.

I'd love for you to use the latest version (just to make sure that it's not the same issue as the one that was fixed already); although auto-complete should not be in effect for .txt files.

@thebothead
Copy link
Author

@pkulchenko, that's definitely weird, especially since its a UI component, it would be one thing if it was some utility component that had nothing to do with the UI that something you were using was making a call into:/ I'll grab the latest version and start using that. I noticed there is a zbstudio.exe file in the master branch, can I just grab that or do I need to pull all the sources and build them?

@pkulchenko
Copy link
Owner

zbstudio.exe is one of those things that don't need to be updated; the easiest way to get the latest copy to run is to clone the repository in a folder and run zbstudio.exe from that folder. This gives you an easy way to update the code (as you can always do git pull origin master).

Another way is to download the zip file (from the github project page); this is smaller than the clone (as it doesn't have any history), but doesn't allow you for getting updates easily.

In both cases it will use the same .ini configuration, so all your project and window configuration should be preserved.

@pkulchenko
Copy link
Owner

@thebothead, have you had a chance to try with the most recent version? Still crashes?

@thebothead
Copy link
Author

@pkulchecko, sorry I haven't tried the latest version yet because my
marmalade trial expired and I didn't have any other lua work to do, and I
have been demoing cocos2d-html since before deciding to pick up marmalade.
I am happy to try any specific tests you have in mind with the latest.
On Jun 9, 2013 12:58 PM, "Paul Kulchenko" notifications@github.com wrote:

@thebothead https://github.com/thebothead, have you had a chance to try
with the most recent version? Still crashes?


Reply to this email directly or view it on GitHubhttps://github.com//issues/164#issuecomment-19169461
.

@pkulchenko
Copy link
Owner

@thebothead, you don't need Marmalade license if you don't run/debug the project. It would be great if you could try with the current version typing the fragments that were crashing ZBS for you. Thank you!

@thebothead
Copy link
Author

@pkulchenko, sure thing. Will try out the latest version later today and
see how it goes.
On Jun 9, 2013 8:52 PM, "Paul Kulchenko" notifications@github.com wrote:

@thebothead https://github.com/thebothead, you don't need Marmalade
license if you don't run/debug the project. It would be great if you could
try with the current version typing the fragments that were crashing ZBS
for you. Thank you!


Reply to this email directly or view it on GitHubhttps://github.com//issues/164#issuecomment-19177228
.

@thebothead
Copy link
Author

@pkulchenko, been using the latest for a couple days now (been back on the LUA train) and just got a crash again today. I posted the 32-bit dump here (https://docs.google.com/file/d/0B7KLcn-Vx-2VUzBxOW9oM0xqUWc/edit?usp=sharing). Here is the exception details again. Let me know if you need anything else, or want me to use a special build with some more debug settings turned on. Can probably open this issue since its still happening, rather than working on it in a closed state:)

Microsoft (R) Windows Debugger Version 6.12.0002.633 AMD64
Copyright (c) Microsoft Corporation. All rights reserved.

Loading Dump File [...\zbstudio_130612_174352.dmp]
User Mini Dump File with Full Memory: Only application data is available

Comment: '
*** procdump -ma 8616
*** Manual dump'
Symbol search path is: SRV_C:\sym_http://msdl.microsoft.com/download/symbols
Executable search path is:
Windows 7 Version 7601 (Service Pack 1) MP (8 procs) Free x86 compatible
Product: WinNt, suite: SingleUserTS
Machine Name:
Debug session time: Wed Jun 12 17:43:52.000 2013 (UTC - 4:00)
System Uptime: 0 days 0:12:46.015
Process Uptime: 0 days 0:07:43.000
................................................................
...........................
eax=00000000 ebx=0028e36c ecx=007427f8 edx=024c011a esi=00000002 edi=00000000
eip=77a6013d esp=0028e31c ebp=0028e3b8 iopl=0 nv up ei pl zr na pe nc
cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00200246
ntdll!ZwWaitForMultipleObjects+0x15:
77a6013d 83c404 add esp,4
0:000> !analyze -v


  •                                                                         *
    
  •                    Exception Analysis                                   *
    
  •                                                                         *
    

*** ERROR: Module load completed but symbols could not be loaded for zbstudio.exe
*** ERROR: Symbol file could not be found. Defaulted to export symbols for lua51.dll -
GetPageUrlData failed, server returned HTTP status 404
URL requested: http://watson.microsoft.com/StageOne/zbstudio_exe/0_0_0_0/513f5afd/unknown/0_0_0_0/bbbbbbb4/80000003/00000000.htm?Retriage=1

FAULTING_IP:
+1b
5dac0207 ?? ???

EXCEPTION_RECORD: 0028e668 -- (.exr 0x28e668)
ExceptionAddress: 5dac0207
ExceptionCode: c0000005 (Access violation)
ExceptionFlags: 00000000
NumberParameters: 2
Parameter[0]: 00000000
Parameter[1]: 5dac0207
Attempt to read from address 5dac0207

FAULTING_THREAD: 000021ac

DEFAULT_BUCKET_ID: STATUS_BREAKPOINT

PROCESS_NAME: zbstudio.exe

ERROR_CODE: (NTSTATUS) 0x80000003 - {EXCEPTION} Breakpoint A breakpoint has been reached.

EXCEPTION_CODE: (HRESULT) 0x80000003 (2147483651) - One or more arguments are invalid

MOD_LIST:

NTGLOBALFLAG: 0

APPLICATION_VERIFIER_FLAGS: 0

CONTEXT: 0028e6b8 -- (.cxr 0x28e6b8)
eax=058deb68 ebx=02b22c88 ecx=007427f8 edx=024c011a esi=02198fb4 edi=007427f8
eip=5dac0207 esp=0028eb1c ebp=0028eb38 iopl=0 nv up ei pl nz na po nc
cs=0023 ss=002b ds=002b es=002b fs=0053 gs=002b efl=00210202
5dac0207 ?? ???
Resetting default scope

READ_ADDRESS: 5dac0207

FOLLOWUP_IP:
wx!ZN12wxEvtHandler15AddPendingEventERK7wxEvent+0
02270b24 55 push ebp

FAILED_INSTRUCTION_ADDRESS:
+0
5dac0207 ?? ???

ADDITIONAL_DEBUG_TEXT: Followup set based on attribute [Is_ChosenCrashFollowupThread] from Frame:[0] on thread:[PSEUDO_THREAD]

LAST_CONTROL_TRANSFER: from 02270b3f to 5dac0207

PRIMARY_PROBLEM_CLASS: STATUS_BREAKPOINT

BUGCHECK_STR: APPLICATION_FAULT_STATUS_BREAKPOINT

IP_ON_HEAP: 5dac0207
The fault address in not in any loaded module, please check your build's rebase
log at \bin\build_logs\timebuild\ntrebase.log for module which may
contain the address if it were loaded.

IP_IN_FREE_BLOCK: 5dac0207

STACK_TEXT:
0028eb1c 5dac0207 unknown!unknown+0x0
0028eb20 02270b3f wx!ZN12wxEvtHandler15AddPendingEventERK7wxEvent+0x1b
0028eb40 01ed3fe7 wx!Z38wxLua_wxProgressDialog_delete_functionPPv+0x88a
0028eb60 66d85a49 lua51!lua_getinfo+0x1015
0028eb70 66d8ddd1 lua51!lua_close+0x1eb9
0028ebb0 66d8ea14 lua51!lua_close+0x2afc
0028ec50 66d85e34 lua51!lua_getinfo+0x1400
0028ed00 66d85f89 lua51!lua_yield+0x81
0028ed10 66d86431 lua51!lua_yield+0x529
0028ed80 01f65c4e wx!ZN10wxLuaState8LuaPCallEii+0x7c
0028edc0 01f5b2da wx!ZN18wxLuaEventCallback7OnEventEP7wxEvent+0x1f4
0028ee20 01f5b09b wx!ZN18wxLuaEventCallback11OnAllEventsER7wxEvent+0x59
0028ee70 02197e3a wx!ZNK16wxAppConsoleBase16CallEventHandlerEP12wxEvtHandlerR14wxEventFunctorR7wxEvent+0x42
0028eec0 02199839 wx!ZN12wxEvtHandler23ProcessEventIfMatchesIdERK21wxEventTableEntryBasePS_R7wxEvent+0x65
0028eef0 02199aa3 wx!ZN12wxEvtHandler23SearchDynamicEventTableER7wxEvent+0x4f
0028ef20 02199ae2 wx!ZN12wxEvtHandler11TryHereOnlyER7wxEvent+0x28
0028ef40 02199b48 wx!ZN12wxEvtHandler19ProcessEventLocallyER7wxEvent+0x1a
0028ef60 02199bc9 wx!ZN12wxEvtHandler12ProcessEventER7wxEvent+0x63
0028ef90 01f72fb0 wx!ZN16wxStyledTextCtrl12NotifyParentEP14SCNotification+0x252
0028f070 01f75022 wx!ZN11ScintillaWX12NotifyParentE14SCNotification+0x1e
0028f090 01f82de0 wx!ZN6Editor10NotifyCharEi+0x3a
0028f160 01f92f85 wx!ZN6Editor10AddCharUTFEPcjb+0x3e1
0028f1c0 01f7c151 wx!ZN13ScintillaBase10AddCharUTFEPcjb+0x9f
0028f200 01f766a9 wx!ZN11ScintillaWX9DoAddCharEi+0x6f
0028f250 02197e3a wx!ZNK16wxAppConsoleBase16CallEventHandlerEP12wxEvtHandlerR14wxEventFunctorR7wxEvent+0x42
0028f2a0 02199839 wx!ZN12wxEvtHandler23ProcessEventIfMatchesIdERK21wxEventTableEntryBasePS_R7wxEvent+0x65
0028f2d0 0219990e wx!ZN16wxEventHashTable11HandleEventER7wxEventP12wxEvtHandler+0x62
0028f300 02199b26 wx!ZN12wxEvtHandler11TryHereOnlyER7wxEvent+0x6c
0028f320 02199b48 wx!ZN12wxEvtHandler19ProcessEventLocallyER7wxEvent+0x1a
0028f340 02199bc9 wx!ZN12wxEvtHandler12ProcessEventER7wxEvent+0x63
0028f370 021999d5 wx!ZN12wxEvtHandler18SafelyProcessEventER7wxEvent+0x19
0028f390 0208405e wx!ZN8wxWindow10HandleCharEjl+0x3e
0028f420 02086998 wx!ZN8wxWindow16MSWHandleMessageEPljjl+0x9ac
0028f5f0 0207efd8 wx!ZN8wxWindow13MSWWindowProcEjjl+0x36
0028f650 020816fe wx!Z9wxWndProcP6HWND__jjl+0x86
0028f690 76ee62fa user32!InternalCallWinProc+0x23
0028f6bc 76ee6d3a user32!UserCallWinProcCheckWow+0x109
0028f734 76ee77c4 user32!DispatchMessageWorker+0x3bc
0028f794 76ee788a user32!DispatchMessageW+0xf
0028f7a4 76f0c81f user32!IsDialogMessageW+0x5f6
0028f7d0 0208151a wx!ZN8wxWindow17MSWProcessMessageEP6tagMSG+0x30a
0028f840 02161573 wx!ZN14wxGUIEventLoop17PreProcessMessageEP6tagMSG+0xf3
0028f870 02161435 wx!ZN14wxGUIEventLoop14ProcessMessageEP6tagMSG+0x19
0028f890 021613f8 wx!ZN14wxGUIEventLoop8DispatchEv+0x11e
0028f8d0 021e77fd wx!ZN17wxEventLoopManual3RunEv+0x5d
0028f900 0219851b wx!ZN16wxAppConsoleBase8MainLoopEv+0x39
0028f940 01eb1357 wx!ZN18wxLuaGridTableBaseC2ERK10wxLuaState+0x1413
0028f970 66d85a49 lua51!lua_getinfo+0x1015
0028f980 66d8dda4 lua51!lua_close+0x1e8c
0028f990 66d8d96c lua51!lua_close+0x1a54
0028f9c0 66d8ea14 lua51!lua_close+0x2afc
0028fa38 77a6e38c ntdll!RtlpLowFragHeapAllocFromContext+0xaec
00741960 09000205 unknown!unknown+0x0

SYMBOL_NAME: wx!ZN12wxEvtHandler15AddPendingEventERK7wxEvent+0

FOLLOWUP_NAME: MachineOwner

MODULE_NAME: wx

IMAGE_NAME: wx.dll

DEBUG_FLR_IMAGE_TIMESTAMP: 5130fe8c

STACK_COMMAND: .cxr 000000000028E6B8 ; kb ; dds 28eb1c ; kb

FAILURE_BUCKET_ID: STATUS_BREAKPOINT_80000003_wx.dll!ZN12wxEvtHandler15AddPendingEventERK7wxEvent

BUCKET_ID: APPLICATION_FAULT_STATUS_BREAKPOINT_BAD_IP_wx!ZN12wxEvtHandler15AddPendingEventERK7wxEvent+0

WATSON_STAGEONE_URL: http://watson.microsoft.com/StageOne/zbstudio_exe/0_0_0_0/513f5afd/unknown/0_0_0_0/bbbbbbb4/80000003/00000000.htm?Retriage=1

Followup: MachineOwner

@thebothead
Copy link
Author

Finally happened again... and once again when I was typing in a text file. This was the first time since I got the new build and added you debug DLL that I actually wrote in a ".txt" file, and sure enough it happened... I have been coding in the IDE non-stop for the past few weeks with new issues, and as soon as I started working in this text file it crashed. Grabbed a screen shot of the error message, which is practically useless it seems. Also here is the new dump file that I grabbed.

Dump file: https://docs.google.com/file/d/0B7KLcn-Vx-2VM01ZTzkycUcxazQ/edit?usp=sharing

zerobraincrash

@pkulchenko
Copy link
Owner

@thebothead, thank you for the update! Can you run the exception analysis like you did before?

BTW, I offered a bounty for this issue.

@pkulchenko
Copy link
Owner

@thebothead, I ran the analysis, but the stack trace looks strange; this is the top part:

0028f050 774bcf5c 000f0ee4 00bb049c 00000000 user32!WaitMessage+0x15
0028f07c 774ef73c 77480000 00877ef0 00bb049c user32!DialogBoxIndirectParamAorW+0x108
0028f130 774efa18 00012010 00000000 ffffffff user32!SoftModalMessageBox+0x757
0028f288 774efb1f 0028f294 00000028 00bb049c user32!SoftModalMessageBox+0xa33
...

Is it the same thing you see? Thanks!

@thebothead
Copy link
Author

@pkulchenko, here is the stack trace I get. The timing of the dump I took this time is different than the previous ones. This dump I took when the message box popped up in the screen shot I took, and the previous dumps were taken at the time when Windows pops up its "your app has died" popup where you can choose to debug or close it, which is when you typically want to take the dump. My head wasn't screwed on all the way last night and I forgot to capture the extra dump when windows jumps in and gives you the "your app has died" message... Sorry about that, I wanted to get both for comparison. I will see if I can repro this again and grab both, but hopefully the one I grabbed has some use.

STACK_TEXT:
0028f014 774bcd46 00bb049c 00000000 00000001 user32!NtUserWaitMessage+0x15
0028f050 774bcf5c 000f0ee4 00bb049c 00000000 user32!DialogBox2+0x222
0028f07c 774ef73c 77480000 00877ef0 00bb049c user32!InternalDialogBox+0xe5
0028f130 774efa18 00012010 00000000 ffffffff user32!SoftModalMessageBox+0x757
0028f288 774efb1f 0028f294 00000028 00bb049c user32!MessageBoxWorker+0x269
0028f2f4 774efb9e 00bb049c 0084bed0 00863d28 user32!MessageBoxTimeoutW+0x52
0028f328 774efcf1 00bb049c 75e964a8 75e403e0 user32!MessageBoxTimeoutA+0x76
0028f348 774efd36 00bb049c 75e964a8 75e403e0 user32!MessageBoxExA+0x1b
0028f364 75e59c56 00bb049c 75e964a8 75e403e0 user32!MessageBoxA+0x18
0028f3a8 75e5b7f0 75e964a8 75e403e0 00012010 msvcrt!__crtMessageBoxA+0x19d
0028f3d0 75e58e91 0000000a 0225792a 0dd22b68 msvcrt!_NMSG_WRITE+0x145
0028f708 0238bc2c 025bc5fc 00000001 0000002d msvcrt!abort+0x26
WARNING: Stack unwind information not available. Following frames may be wrong.
0028f848 02254ff3 0dc477a8 00000000 00000000 wx!ZN9WindowHDCD1Ev+0x1168
0028f898 022b8b7c 00a16048 05f64ff2 000001b3 wx!ZN16wxAppConsoleBase20ProcessPendingEventsEv+0x5d
0028f8b8 022b8c4d 10732d58 024a295c 0028f938 wx!ZN17wxEventLoopManual13ProcessEventsEv+0x1e
0028f8f8 02254809 10732d58 00000000 01000000 wx!ZN17wxEventLoopManual3RunEv+0xb3
0028f938 01f21519 00a16048 00000001 00000060 wx!ZN16wxAppConsoleBase8MainLoopEv+0x39
0028f968 66d85a49 00ad1130 0dd22ca8 00000001 wx!ZN18wxLuaGridTableBaseC1ERK10wxLuaState+0x1465
0028f978 66d8dda4 00ad1130 00000160 00000160 lua51!lua_getinfo+0x1015
0028f988 66d8d96c 00ad1130 0dd22ca8 00000001 lua51!lua_close+0x1e8c
0028f9b8 66d8ea14 00ad1130 0dd22b38 00000000 lua51!lua_close+0x1a54
0028fa30 77aae38c 00000005 00000000 00ad01ac lua51!lua_close+0x2afc
0028faec 77aae0f2 00000000 0000001a 00000000 ntdll!RtlpLowFragHeapAllocFromContext+0xaec
0028fc2c 77aae0f2 00000000 00ad13b8 009f8fdc ntdll!RtlAllocateHeap+0x206
0028fca8 66d8fae0 00ad1130 00000000 00ad12b0 ntdll!RtlAllocateHeap+0x206
00000000 00000000 00000000 00000000 00000000 lua51!lua_close+0x3bc8

@pixeljetstream
Copy link
Contributor

will try to look into this as well, as I've been running into the same problem.

@thebothead, do you have a "cfg/user.lua" file for custom settings? if yes
then insert a line that says "acandtip.nodynwords=true"
if not create this file with that line.

That could improve the situation, at least that's what I suspect as it's autocomplete logic which is also active in txt files

@ghost
Copy link

ghost commented Aug 7, 2013

@CrazyButcher, I do not have that file at the moment. I will create that file and add that line tonight when I have time to do some LUA work. Can you explain to me what that line is? Thanks.

@pixeljetstream
Copy link
Contributor

It disables one part of the autocomplete logic that more or less allows suggestions within any file type, simply based on words already written in the file. Another option would be turning autocomplete off with "autocomplete = false"

@pkulchenko
Copy link
Owner

@bothead, @CrazyButcher suspected that some of the crashes could be related to handling of dynamic words when they should be turned off by default, but after further investigation it turned out that dynamic words are indeed turned of by default, so it's unlikely that the change will make a difference for you. @CrazyButcher, or do we still suspect that?

It would be interesting though to see if setting autocomplete = false makes the crashes go away...

@robzed
Copy link

robzed commented Aug 26, 2013

I had a crash on my Win7-64 bit machine at work ... could this be the same problem - or a different one? (ZBSv0.38)
Problem Event Name: APPCRASH
Application Name: zbstudio.exe
Application Version: 0.0.0.0
Application Timestamp: 513f5afd
Fault Module Name: wx.dll
Fault Module Version: 2.8.12.2
Fault Module Timestamp: 5130fe8c
Exception Code: c0000005
Exception Offset: 0049da92
OS Version: 6.1.7601.2.1.0.256.4
Locale ID: 2057

@pkulchenko
Copy link
Owner

@robzed, most likely. Did it happen when you were typing text (probably with auto-complete)? It does look like it's auto-complete related, but it doesn't happen on the same text and as the result is very difficult to reproduce. You probably noticed, but I even put a bounty on it as I haven't been able (so far) to come up with a fix for it.

@robzed
Copy link

robzed commented Aug 26, 2013

Yes, I was in the middle of typing a line. More info to follow.

@ccverg
Copy link

ccverg commented Aug 30, 2013

@pkulchenko @thebothead have you considered placing the bounty on Bountysource? That way, the developer is able to claim it seamlessly once the issue has been closed/addressed: https://www.bountysource.com/issues/869743-zerobrane-studio-crashes-when-using-win7-x64

@pkulchenko
Copy link
Owner

@ccvergara, good point, although they want 10% on top of fees that paypal or Google Wallet may charge. Other options (like an Amazon giftcard) won't have any fees associated with them...

@ccverg
Copy link

ccverg commented Aug 30, 2013

@pkulchenko the 10% fee includes payment processing fees :)

@pkulchenko
Copy link
Owner

@thebothead, @bothead, @robzed, I wonder if with the recent move to LuaJIT made the situation with this crash worse, better, or if it stayed the same. Could you give it a try on win7 64bit when you get a chance to see if anything has changed? Thank you!

@robzed
Copy link

robzed commented Sep 12, 2013

One note. I've had no opportunity to work on W7-64 this week, but ZBS has been running in the background - without incident - since last week.

@pkulchenko
Copy link
Owner

@thebothead, @robzed, any new information about recent crashes on win7 64bit? Did the switch to LuaJIT make it better? Thanks!

@thebothead
Copy link
Author

@pkulchenko, nothing new yet. Haven't done any development lately or
updated my version. Will this weekend.

@robzed
Copy link

robzed commented Sep 19, 2013

Crashed yesterday (W7-64) when I was developing a relatively short text processing script. Again, it was when I was typing. It idles for days and days on end without problems. I've spent maybe 4 hours (or so) activity using it on Win7-64 this week, so not much. Difficult to say if it's worst or better.

What's the best way of getting more information on what's causing this problem? I assume stack traces aren't doing it?

@pkulchenko
Copy link
Owner

@robzed, @thebothead, when you get a chance, please grab the latest master as I expect 762baba to fix the crash (if it's indeed related to auto-complete). I'd love to hear you are not able to reproduce it anymore ;). Thank you!

@thebothead
Copy link
Author

@pkulchenko, doesn't look like the executable in master has been updated
since a month ago? I forget if I am supposed to grab that from somewhere
else in master?

@pkulchenko
Copy link
Owner

@thebothead, there were no (recent) changes to the executables. All the changes were in Lua files, so you don't need to recompile or update executables. Just clone the repo or use the latest zip. Thank you!

@thebothead
Copy link
Author

@pkulchenko, ok thanks. I am moving to a new dev station with win8 x64 this
weekend (versus win7 that I filed the bug under), will let you know if I
run into this again.
On Sep 22, 2013 12:08 AM, "Paul Kulchenko" notifications@github.com wrote:

@thebothead https://github.com/thebothead, there were no (recent)
changes to the executables. All the changes were in Lua files, so you don't
need to recompile or update executables. Just clone the repo or use the
latest ziphttps://github.com/pkulchenko/ZeroBraneStudio/archive/master.zip.
Thank you!


Reply to this email directly or view it on GitHubhttps://github.com//issues/164#issuecomment-24875761
.

@pkulchenko
Copy link
Owner

@thebothead, any new issues on win8 64bit? Any new reports during the last 4 days (if you installed the new version)? Thanks!

What's the best way of getting more information on what's causing this problem? I assume stack traces aren't doing it?

@robzed, unfortunately not. Some of them do point to handling of pending events (wxAppConsoleBase20ProcessPendingEventsEv) and this is exactly the part that I modified in the commit 4 days ago. That's why I'd like to hear if that helped. I still can't repro it on my win7 64bit, but it's probably because I don't use that machine regularly (I mostly run on Windows Vista and OSX 10.7.4).

@ghost
Copy link

ghost commented Sep 26, 2013

@pkulchenko, nothing yet. I actually returned the surface pro I had due to
some issues and decided to wait on the surface pro 2 that was just
announced so it might be a few weeks before you hear back from me on this
when I've got a personal dev station again.
On Sep 25, 2013 11:12 PM, "Paul Kulchenko" notifications@github.com wrote:

@thebothead https://github.com/thebothead, any new issues on win8
64bit? Any new reports during the last 4 days (if you installed the new
version)? Thanks!

What's the best way of getting more information on what's causing this
problem? I assume stack traces aren't doing it?

@robzed https://github.com/robzed, unfortunately not. Some of them do
point to handling of pending events (
wxAppConsoleBase20ProcessPendingEventsEv) and this is exactly the part
that I modified in the commit 4 days ago. That's why I'd like to hear if
that helped. I still can't repro it on my win7 64bit, but it's probably
because I don't use that machine regularly (I mostly run on Windows Vista
and OSX 10.7.4).


Reply to this email directly or view it on GitHubhttps://github.com//issues/164#issuecomment-25141102
.

@robzed
Copy link

robzed commented Sep 30, 2013

No crashes recently on Win7-64. I'd pretty much say it's better than before - had a few days coding on it at least. Will post more only if I get another crash.

@pkulchenko
Copy link
Owner

This is great! Rob, thank you for the update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants