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

Home Page:http://studio.zerobrane.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

ildar opened this issue · comments

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.

@ildar, thank you for the report! I saw the first issue you describe on macOS and Windows and expected the commit fb564b9 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?

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, I'm a bit confused, as wxBitmap::GetSubBitmap should not be called by the IDE right now, as it was removed in fb564b9.

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.

commented