pkulchenko / ZeroBraneStudio

Lightweight Lua-based IDE for Lua with code completion, syntax highlighting, live coding, remote debugger, and code analyzer; supports Lua 5.1, 5.2, 5.3, 5.4, LuaJIT and other Lua interpreters on Windows, macOS, and Linux
http://studio.zerobrane.com/
Other
2.62k stars 516 forks source link

Failed to add image 'zbstudio/res/32/FOLDER-PROJECT.png' to the image list. #1171

Open ildar opened 11 months ago

ildar commented 11 months ago

Greetings! I just started ZBS v2.01 in the Wayland session and was glad to see it works (1.90 fails). Two errors I see:

  1. the Project tree has wrong icons and the Output window immediately shows errors as in subject (10+ icons are missing)
  2. the Output window behaves quite strange. When I click in it, the cursor is placed ~5 chars to the left. E.g. I click on the e in the work image and the cursor appears before i.
pkulchenko commented 11 months ago

@ildar, thank you for the report! I saw the first issue you describe on macOS and Windows and expected the commit fb564b94 to fix this (and it does fix it on macOS and Windows). Do you know if it works for you in v2.00 (before that commit is applied)? If it does, what's the value returned by ide:GetContentScaleFactor() for you?

With respect to the second issue, not sure what to say. I've never seen anything like what you describe. Does the local console work correctly for you (when you click)? Does the issue only show when you click?

ildar commented 11 months ago

I am sorry I forgot to mention important infos: I'm using self-built wxlua (and other binaries). So the result:

About page: Built with wxWidgets 3.2.1, wxLua 3.2.0.2, Scintilla 3.7.2 I might probably upgrade wxLua. Soon

ildar commented 11 months ago

2.01 with bundled wx: Screenshot-2023-12-10-14:39:22

2.01 with self-built wx: Screenshot-2023-12-10-14:38:41

2.0 with self-built wx:

ASSERT INFO:
./src/gtk/bitmap.cpp(1073): assert ""rect.x >= 0 && rect.y >= 0 && rect.x + w <= bmpData->m_width && rect.y + h <= bmpData->m_height"" failed in GetSubBitmap(): invalid bitmap region

BACKTRACE:
[1] wxBitmap::GetSubBitmap(wxRect const&) const
[2] lua_pcall
[3] wxLuaState::LuaPCall(int, int)
[4] wxLuaEventCallback::OnEvent(wxEvent*)
[5] wxLuaEventCallback::OnAllEvents(wxEvent&)
[6] wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&)
[7] wxEvtHandler::SearchDynamicEventTable(wxEvent&)
[8] wxEvtHandler::TryHereOnly(wxEvent&)
[9] wxEvtHandler::ProcessEventLocally(wxEvent&)
[10] wxEvtHandler::ProcessEvent(wxEvent&)
[11] wxScrollHelperEvtHandler::ProcessEvent(wxEvent&)
[12] wxGenericTreeCtrl::Expand(wxTreeItemId const&)
[13] lua_pcall
[14] lua_cpcall
[15] __libc_start_main
ildar commented 11 months ago

and yes, ide:GetContentScaleFactor() surely == 2

ildar commented 8 months ago

Paul, have any idea how to fix that? maybe gather some logs?

ildar commented 8 months ago

oh! my fault. the problem is seen only in XWayland (I moved ~ at that time). I just checked: in the AwesomeWM (X11) icons look as usual. So problem description should be extended with:

Yet I'm pretty sure that 2.0 worked fine in Hyprland.

pkulchenko commented 7 months ago

@ildar, I'm a bit confused, as wxBitmap::GetSubBitmap should not be called by the IDE right now, as it was removed in fb564b94.

If this only happens in Wayland, I wonder if you could test with line package.lua:1130 to always be set to 1 (instead of GetContentScaleFactor()) and confirm if it fixes the issue for you.

ildar commented 7 months ago

Paul, I am very sorry I missed you message again. I'm still with 2.01 and after I changed the line like this: