SpartanJ / ecode

Lightweight multi-platform code editor designed for modern hardware with a focus on responsiveness and performance.
MIT License
938 stars 13 forks source link

Crashed #334

Closed Curculigo closed 2 months ago

Curculigo commented 2 months ago

I build from the latest code. It seems the newly merged esfw is not OK.

ecode-debug.exe caused a Breakpoint at location 00007FF8570BDD30 in module eepp-debug.dll.

AddrPC           Params
00007FF89158273A 00007FF8915233A0 0000000000000002 0000005A9B36EA70  ntdll.dll!NtWaitForWorkViaWorkerFactory+0xa
00007FF891523AE6 0000000000000000 00007FF8915233A0 0000005A9B36EA70  ntdll.dll!TppWorkerThread+0x746
00007FF88EB813D2 00007FF88EB813B0 0000000000000000 0000000000000000  KERNEL32.DLL!BaseThreadInitThunk+0x22
00007FF8915603C4 0000000000000000 0000000000000000 0000000000000000  ntdll.dll!RtlUserThreadStart+0x34

AddrPC           Params
00007FF8570BDD30 FFFFFFFFFFFFFFFF 000000003F800000 0000005A9695A290  eepp-debug.dll!EE::eeREPORT_ASSERT+0xc0
00007FF85754E3DF 0000000000000000 0000005A9695C904 0000005A9695C908  eepp-debug.dll!EE::UI::Doc::TextDocument::line+0xcf
00007FF8576AAB00 0000005A9695A2A0 00007FF85738FEF9 00007FF857E4B5B0  eepp-debug.dll!EE::UI::UICodeEditor::checkMouseOverLink+0x180
00007FF8576AB75D 0000005A9695A4B0 00007FF85701C0E7 0000005A9D43DF28  eepp-debug.dll!EE::UI::UICodeEditor::onMouseMove+0x3fd
00007FF8571192F7 0000005A9B3A7508 00007FF8578EF8D8 0000005A9B3A7578  eepp-debug.dll!EE::Scene::EventDispatcher::update+0x2a7
00007FF85738E77C 0000005A9695A700 00007FF85738B6D7 0000005A9695C908  eepp-debug.dll!EE::Scene::SceneNode::update+0x8c
00007FF8578EF525 0000000000000001 0000005A96A31D20 0000005A96A31D20  eepp-debug.dll!EE::UI::UISceneNode::update+0x105
00007FF85738B0DB 0000000000000000 00007FF85738AC99 0000000000000000  eepp-debug.dll!EE::Scene::SceneManager::update+0x7b
00007FF85738B11C 0000005A9695A7B0 0000005A9695AE98 0000005A9D65405A  eepp-debug.dll!EE::Scene::SceneManager::update+0x2c
00007FF6B02764A5 0000005A9695AE98 0000005A9695A8A0 0000005A9695AE98  ecode-debug.exe!ecode::App::mainLoop+0x35
00007FF6B0276460 0000005A9695A988 000000000000000F 0000005A9695A8EE  ecode-debug.exe!ecode::appLoop+0x10
00007FF6B046A0B0 0000005A9D654110 0000005A9E8BDE38 0000005A9695AE98  ecode-debug.exe!std::__1::__invoke[abi:ne180100]<void (*&)()>+0x10
00007FF6B046A073 FFFFFFFFFFFFFFFF 0000000000000000 0000005A9695A8EE  ecode-debug.exe!std::__1::__invoke_void_return_wrapper<void, true>::__call[abi:ne180100]<void (*&)()>+0x13
00007FF6B046A04B 0000005A9695AE98 0000005A96A1AC00 0000005A9695AE90  ecode-debug.exe!std::__1::__function::__alloc_func<void (*)(), std::__1::allocator<void (*)()>, void ()>::operator()[abi:ne180100]+0x1b
00007FF6B0469337 0000005A9695AE90 0000005A9D654110 0000005A96A1AC00  ecode-debug.exe!std::__1::__function::__func<void (*)(), std::__1::allocator<void (*)()>, void ()>::operator()+0x17
00007FF8571530E2 0000005A9D653DF0 0000005A9D654070 0000005A96A1AC00  eepp-debug.dll!std::__1::__function::__value_func<void ()>::operator()[abi:ne180100]+0x32
00007FF857153083 0000005A9695AE90 00007FF6B033B94D 0000005A969ECC28  eepp-debug.dll!std::__1::function<void ()>::operator()+0x13
00007FF857A99458 0000005A9695AC80 0000005A9695A9C8 0000000000000000  eepp-debug.dll!EE::Window::Window::runMainLoop+0x78
00007FF6B02978E2 0000000000000000 0000000000000000 0000000000000000  ecode-debug.exe!ecode::App::init+0x4d82
00007FF6B029CC20 00007FF6B0171101 00007FF6B0F47640 00007FF6B0F47638  ecode-debug.exe!main+0x50b0
00007FF6B0171311 0000000000000000 0000000000000000 0000000000000000  ecode-debug.exe!__tmainCRTStartup+0x1b1
00007FF6B0171156 0000000000000000 0000000000000000 0000000000000000  ecode-debug.exe!WinMainCRTStartup+0x16
00007FF88EB813D2 00007FF88EB813B0 0000000000000000 0000000000000000  KERNEL32.DLL!BaseThreadInitThunk+0x22
00007FF8915603C4 0000000000000000 0000000000000000 0000000000000000  ntdll.dll!RtlUserThreadStart+0x34

AddrPC           Params
00007FF891580E6A 0000000000000000 0000000000000002 0000000000000008  ntdll.dll!NtRequestWaitReplyPort+0xa
00007FF88C7815F0 00007FF88C792A10 0000000080263001 0000000080000011  dwmapi.dll!CPortClient::SendComplexSyncRequestNative+0xb0
00007FF88C781B5B 0000000000000000 0000000000000000 0000000000000000  dwmapi.dll!CApiPortClient::SendRequest+0x11b
00007FF88C78348B 00007FF800000000 0000000080000011 0000000000000000  dwmapi.dll!DwmFlush+0x47
00007FF86A6D29AA 0000000000000000 0000000000000000 0000000000000000  ig75icd64.dll!DrvValidateVersion+0x139a
00007FF88EB813D2 00007FF88EB813B0 0000000000000000 0000000000000000  KERNEL32.DLL!BaseThreadInitThunk+0x22
00007FF8915603C4 0000000000000000 0000000000000000 0000000000000000  ntdll.dll!RtlUserThreadStart+0x34

AddrPC           Params
00007FF89158270A 0000005A969DF238 0000005A989DF848 0000005A9EE558E8  ntdll.dll!NtWaitForAlertByThreadId+0xa
00007FF89156EA9C 0000005A969EA410 0000005A969DFE90 00007FF85762E010  ntdll.dll!RtlSleepConditionVariableSRW+0xec
00007FF88E7891B8 0000000000000000 00007FF857B2C709 0000005A969DF210  KERNELBASE.dll!SleepConditionVariableSRW+0x28
00007FF857B2C7A3 0000005A9EE558E0 00007FF857AE5F99 0000005A969DF1F0  eepp-debug.dll!std::__1::__libcpp_condvar_wait+0x13
00007FF857AE5E32 0000005A989DF9F8 00007FF8575144D7 0000005A989DF9F8  eepp-debug.dll!std::__1::condition_variable::wait+0x12
00007FF85762ECE5 00007FF800000000 00007FF891525BBB 0000005A969C9D90  eepp-debug.dll!std::__1::condition_variable::wait<EE::System::ThreadPool::threadFunc()::$_0>+0x45
00007FF85762E96E 00007FF88A613C10 00007FF88E7121FA 0000000000000000  eepp-debug.dll!EE::System::ThreadPool::threadFunc+0x5e
00007FF857631B1A 00007FF88A5EB438 00007FF88A5EB638 0000000000000000  eepp-debug.dll!EE::System::Private::ThreadMemberFunc<EE::System::ThreadPool>::run+0x6a
00007FF85762DF28 00007FF88D272920 00007FF88A58CE23 0000000000000000  eepp-debug.dll!EE::System::Thread::run+0x18
00007FF85762E02E 0000000000000000 00007FF88A598280 0000005A969DFE90  eepp-debug.dll!EE::System::Platform::ThreadImpl::entryPoint+0x1e
00007FF88A5982DD 00007FF88A598280 0000005A969DFE90 0000000000000000  ucrtbase.DLL!_crt_at_quick_exit+0x7d
00007FF88EB813D2 00007FF88EB813B0 0000000000000000 0000000000000000  KERNEL32.DLL!BaseThreadInitThunk+0x22
00007FF8915603C4 0000000000000000 0000000000000000 0000000000000000  ntdll.dll!RtlUserThreadStart+0x34

AddrPC           Params
00007FF89158273A 00007FF8915233A0 0000000000000002 0000005A9B36EA70  ntdll.dll!NtWaitForWorkViaWorkerFactory+0xa
00007FF891523AE6 0000000000000000 00007FF8915233A0 0000005A9B36EA70  ntdll.dll!TppWorkerThread+0x746
00007FF88EB813D2 00007FF88EB813B0 0000000000000000 0000000000000000  KERNEL32.DLL!BaseThreadInitThunk+0x22
00007FF8915603C4 0000000000000000 0000000000000000 0000000000000000  ntdll.dll!RtlUserThreadStart+0x34

AddrPC           Params
00007FF89158270A 0000005A969DF238 0000005A988DF5A8 0000005A9EE55588  ntdll.dll!NtWaitForAlertByThreadId+0xa
00007FF89156EA9C 0000005A969EA350 0000005A969EADF0 00007FF85762E010  ntdll.dll!RtlSleepConditionVariableSRW+0xec
00007FF88E7891B8 0000000000000000 00007FF857B2C709 0000005A969DF210  KERNELBASE.dll!SleepConditionVariableSRW+0x28
00007FF857B2C7A3 0000005A9EE55580 00007FF857AE5F99 0000005A969DF1F0  eepp-debug.dll!std::__1::__libcpp_condvar_wait+0x13
00007FF857AE5E32 0000005A988DF758 00007FF8575144D7 0000005A988DF758  eepp-debug.dll!std::__1::condition_variable::wait+0x12
00007FF85762ECE5 0000005A988DF6F0 0000005A988DF6F8 0000005A969CC7A0  eepp-debug.dll!std::__1::condition_variable::wait<EE::System::ThreadPool::threadFunc()::$_0>+0x45
00007FF85762E96E 0000000000000000 0000000000000000 0000000000000000  eepp-debug.dll!EE::System::ThreadPool::threadFunc+0x5e
00007FF857631B1A 00007FF88A5EB438 00007FF88A5EB638 0000000000000000  eepp-debug.dll!EE::System::Private::ThreadMemberFunc<EE::System::ThreadPool>::run+0x6a
00007FF85762DF28 00007FF88D272920 00007FF88A58CE23 0000000000000000  eepp-debug.dll!EE::System::Thread::run+0x18
00007FF85762E02E 0000000000000000 00007FF88A598280 0000005A969EADF0  eepp-debug.dll!EE::System::Platform::ThreadImpl::entryPoint+0x1e
00007FF88A5982DD 00007FF88A598280 0000005A969EADF0 0000000000000000  ucrtbase.DLL!_crt_at_quick_exit+0x7d
00007FF88EB813D2 00007FF88EB813B0 0000000000000000 0000000000000000  KERNEL32.DLL!BaseThreadInitThunk+0x22
00007FF8915603C4 0000000000000000 0000000000000000 0000000000000000  ntdll.dll!RtlUserThreadStart+0x34

AddrPC           Params
00007FF89158270A 0000005A969DF238 0000005A96C7FA38 0000005A9EE57358  ntdll.dll!NtWaitForAlertByThreadId+0xa
00007FF89156EA9C 0000005A969EA2D0 0000005A969EAAF0 00007FF85762E010  ntdll.dll!RtlSleepConditionVariableSRW+0xec
00007FF88E7891B8 0000000000000000 00007FF857B2C709 0000005A969DF210  KERNELBASE.dll!SleepConditionVariableSRW+0x28
00007FF857B2C7A3 0000005A9EE57350 00007FF857AE5F99 0000005A969DF1F0  eepp-debug.dll!std::__1::__libcpp_condvar_wait+0x13
00007FF857AE5E32 0000005A96C7FBE8 00007FF8575144D7 0000005A96C7FBE8  eepp-debug.dll!std::__1::condition_variable::wait+0x12
00007FF85762ECE5 00007FF800000000 00007FF891525BBB 0000005A969C9D90  eepp-debug.dll!std::__1::condition_variable::wait<EE::System::ThreadPool::threadFunc()::$_0>+0x45
00007FF85762E96E 00007FF88A613C10 00007FF88E7121FA 0000000000000000  eepp-debug.dll!EE::System::ThreadPool::threadFunc+0x5e
00007FF857631B1A 00007FF88A5EB438 00007FF88A5EB638 0000000000000000  eepp-debug.dll!EE::System::Private::ThreadMemberFunc<EE::System::ThreadPool>::run+0x6a
00007FF85762DF28 00007FF88D272920 00007FF88A58CE23 0000000000000000  eepp-debug.dll!EE::System::Thread::run+0x18
00007FF85762E02E 0000000000000000 00007FF88A598280 0000005A969EAAF0  eepp-debug.dll!EE::System::Platform::ThreadImpl::entryPoint+0x1e
00007FF88A5982DD 00007FF88A598280 0000005A969EAAF0 0000000000000000  ucrtbase.DLL!_crt_at_quick_exit+0x7d
00007FF88EB813D2 00007FF88EB813B0 0000000000000000 0000000000000000  KERNEL32.DLL!BaseThreadInitThunk+0x22
00007FF8915603C4 0000000000000000 0000000000000000 0000000000000000  ntdll.dll!RtlUserThreadStart+0x34

AddrPC           Params
00007FF89158273A 00007FF8915233A0 0000000000000002 0000005A9B36EA70  ntdll.dll!NtWaitForWorkViaWorkerFactory+0xa
00007FF891523AE6 0000000000000000 00007FF8915233A0 0000005A9B36EA70  ntdll.dll!TppWorkerThread+0x746
00007FF88EB813D2 00007FF88EB813B0 0000000000000000 0000000000000000  KERNEL32.DLL!BaseThreadInitThunk+0x22
00007FF8915603C4 0000000000000000 0000000000000000 0000000000000000  ntdll.dll!RtlUserThreadStart+0x34

AddrPC           Params
00007FF89158270A 0000005A969DF238 0000005A98ADF628 0000005A9EE56278  ntdll.dll!NtWaitForAlertByThreadId+0xa
00007FF89156EA9C 0000005A969DB9A0 0000005A969EFEB0 00007FF85762E010  ntdll.dll!RtlSleepConditionVariableSRW+0xec
00007FF88E7891B8 0000000000000000 00007FF857B2C709 0000005A969DF210  KERNELBASE.dll!SleepConditionVariableSRW+0x28
00007FF857B2C7A3 0000005A9EE56270 00007FF857AE5F99 0000005A969DF1F0  eepp-debug.dll!std::__1::__libcpp_condvar_wait+0x13
00007FF857AE5E32 0000005A98ADF7D8 00007FF8575144D7 0000005A98ADF7D8  eepp-debug.dll!std::__1::condition_variable::wait+0x12
00007FF85762ECE5 0000000000000000 0000000000000000 0000000000000000  eepp-debug.dll!std::__1::condition_variable::wait<EE::System::ThreadPool::threadFunc()::$_0>+0x45
00007FF85762E96E 0000000000000000 0000000000000000 0000000000000000  eepp-debug.dll!EE::System::ThreadPool::threadFunc+0x5e
00007FF857631B1A 0000000000000000 0000000000000000 0000000000000000  eepp-debug.dll!EE::System::Private::ThreadMemberFunc<EE::System::ThreadPool>::run+0x6a
00007FF85762DF28 0000000000000057 00007FF88A537318 0000000000000000  eepp-debug.dll!EE::System::Thread::run+0x18
00007FF85762E02E 0000000000000000 00007FF88A598280 0000005A969EFEB0  eepp-debug.dll!EE::System::Platform::ThreadImpl::entryPoint+0x1e
00007FF88A5982DD 00007FF88A598280 0000005A969EFEB0 0000000000000000  ucrtbase.DLL!_crt_at_quick_exit+0x7d
00007FF88EB813D2 00007FF88EB813B0 0000000000000000 0000000000000000  KERNEL32.DLL!BaseThreadInitThunk+0x22
00007FF8915603C4 0000000000000000 0000000000000000 0000000000000000  ntdll.dll!RtlUserThreadStart+0x34

AddrPC           Params
00007FF891580CDA 0000000000000000 0000000000000000 0000000000000000  ntdll.dll!NtRemoveIoCompletion+0xa
00007FF88E7123C3 0000005A9DFA0620 0000000000000000 0000000000000000  KERNELBASE.dll!GetQueuedCompletionStatus+0x3f
00007FF6B0C16A4A 0000000000000000 0000000000000000 0000000000000000  ecode-debug.exe!efsw::FileWatcherWin32::run+0xaa
00007FF6B0C1AA4A 0000000000000000 0000000000000000 0000000000000000  ecode-debug.exe!efsw::Private::ThreadMemberFunc<efsw::FileWatcherWin32>::run+0x6a
00007FF6B0C53D6D 0000000000000000 00007FF88A537318 0000000000000000  ecode-debug.exe!efsw::Thread::run+0x2d
00007FF6B0C5BE9E 0000000000000000 00007FF88A598280 0000005A9E19FE00  ecode-debug.exe!efsw::Platform::ThreadImpl::entryPoint+0x1e
00007FF88A5982DD 00007FF88A598280 0000005A9E19FE00 0000000000000000  ucrtbase.DLL!_crt_at_quick_exit+0x7d
00007FF88EB813D2 00007FF88EB813B0 0000000000000000 0000000000000000  KERNEL32.DLL!BaseThreadInitThunk+0x22
00007FF8915603C4 0000000000000000 0000000000000000 0000000000000000  ntdll.dll!RtlUserThreadStart+0x34

AddrPC           Params
00007FF89158273A 00007FF8915233A0 0000000000000002 0000005A9B36EA70  ntdll.dll!NtWaitForWorkViaWorkerFactory+0xa
00007FF891523AE6 0000000000000000 00007FF8915233A0 0000005A9B36EA70  ntdll.dll!TppWorkerThread+0x746
00007FF88EB813D2 00007FF88EB813B0 0000000000000000 0000000000000000  KERNEL32.DLL!BaseThreadInitThunk+0x22
00007FF8915603C4 0000000000000000 0000000000000000 0000000000000000  ntdll.dll!RtlUserThreadStart+0x34

Description: A CMakeLists.txt file again. I'm selecting the code to paste into other CMakeLists.txt file and crashed. The files were dragged into ecode from Windows Explorer. They are not even on the list of recent files the next time I start ecode this time.

SpartanJ commented 2 months ago

Hi, that's not a crash. You built the library and ecode in debug mode and triggered an special assert that triggers a breakpoint, it triggered here, app wouldn't have crashed, but some asserts are there to identify potential issues and unexpected behaviours like this one: it was trying to access a line that doesn't exists anymore in the document during a lookup for links over the cursor position, but knows how to handle the situation and avoids any crash gracefully. Problem is that if you're not debugging it process will be paused forever since you don't have any way to continue after the breakpoint. I guess this breakpoint can trigger if you paste you contents into a selection that contains less lines that the original selection and the mouse is positioned in a position that was occupied before but not used now (I'll try to trigger it later, but it's nothing problematic).

Please don't use ecode in debug mode (I guess you manually built ecode and didn't use the build script provided), it's much slower and you'll encounter several breakpoint calls all over the code base, it's not meant to be used by users, just developers. As a reminder, to build in release mode if you used premake5 during make call you need to add make config=release_x86_64, and if used premake4 just use make config=release. I'll add this information in the eepp README, since it's only mentioned on some OSes but not all.

Curculigo commented 2 months ago

I'm building in debug mode because I want to have more insightful reports when the application crashes. I don't know that I opened a can of worms. You see, #292 took months to be fixed. #330 is not yet incorporated in a release. ecode looks cool but I can't use it for anything serious. Really. I'm thinking about upgrading my hardware and simply use VSCode.

SpartanJ commented 2 months ago

I'm building in debug mode because I want to have more insightful reports when the application crashes.

I see, you don't need to though, release build is not stripping symbols anymore, you should have decent backtrace information from release build. If you still want to run in debug mode you can comment this line and it won't trigger a breakpoint if that's what annoys you. This is the beautiful thing about open-source, you can modify it and play with it.

I don't know that I opened a can of worms.

Mhhh, well, debug builds are exactly for that, you put everything in disposal to expose the worms right in front of your eyes.

You see, https://github.com/SpartanJ/ecode/issues/292 took months to be fixed.

It took me 2 months to reproduce it and the information provided was not enough to find the underlying issue. I'm very responsive with all bug reports, I don't even need to clarify that. It was fixed the same day I was able to trigger it, so yeah, sorry you have to wait, but that's how things work. For the moment I'm still the sole developer of a huge project (ecode is just a small part of eepp).

https://github.com/SpartanJ/ecode/issues/330 is not yet incorporated in a release.

It's not critical to justify a new release, each release takes me at least a couple of hours so it's not fun nor I have the time to do it so frequently, and nightly builds haven't been setup yet, another pending task in a long list (of course you're more than invited to try to set it up). Time is always the limiting factor (man, I've a full time job and a family, I'm not a kid). I would love to have everything ready and in perfect state but that's not realistic.

ecode looks cool but I can't use it for anything serious. Really.

Sorry to hear, but no offence taken, I'm really happy with its current state, I'm using it professionally at least 8 hours a day and enjoying it every single day (and not missing any browser or java based IDE or code editor), and also, I'm very proud of what I achieved so far, and still wanting for more.

I'm thinking about upgrading my hardware and simply use VSCode.

Hopefully you can get some nice hardware! I've been there in my youth, it sucks to work with a potato, but it can be also a really good learning experience, thanks to that you end up testing new operating systems, squeezing every CPU cycle and you need to be mindful about each megabyte of memory used. Good luck with VSCode, it's an impressive peace of software developed by over 2k developers. I can't or want to compete with that, he.