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

WIP: Linux support #4

Merged
merged 10 commits into from
Sep 27, 2022
Merged

WIP: Linux support #4

merged 10 commits into from
Sep 27, 2022

Conversation

viviicat
Copy link
Contributor

@viviicat viviicat commented Jun 29, 2022

Issues:

  • The file chooser appears below the main window after the first time.
  • Racket support links on my machine, but does not work:
standard-module-name-resolver: collection not found
  for module path: racket/base
  collection: "racket"
  in collection directories:
   /home/vv/.local/share/racket/8.5/collects
  • Just a few warnings about deprecated things with GLib, maybe there's a way to silence them.
  • The new "Open Source Licenses" menu option causes a crash (unsure if only Linux):
tangerine: tangerine/third_party/imgui/imgui.cpp:7425: void ImGuiStackSizes::CompareWithCurrentState(): Assertion `SizeOfIDStack == window->IDStack.Size && "PushID/PopID or TreeNode/TreePop Mismatch!"' failed.
  • The *.boot files appear to be windows-specific, so when we work more on Racket support, we will need specific logic to change which one is loaded. I really don't know anything about Racket at the moment, so shrug. I was able to copy .boot files from my installation to resolve that issue (though above issue still happens).
  • Switch build_miniscule.sh to CMake, for consistency. I believe it works as-is but I think this makes it easier since flags will be consistent.

Not tested much yet. I have only tried basic_thing.lua so far.

project(tangerine)

if (MSVC)
message(FATAL_ERROR
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably need to change something in the vcxproj so that Visual Studio doesn't automatically try to load this if CMake is installed. I have not tested that yet.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alternately, I could try to get CMake working on Windows too. It ought to be pretty simple. But this way, the build system you're used to doesn't change.

@1bardesign 1bardesign mentioned this pull request Sep 25, 2022
@Aeva Aeva merged commit a6ba760 into Aeva:excelsior Sep 27, 2022
Aeva added a commit that referenced this pull request May 12, 2023
Remarkably this change seems to prevent this use-after-free error:

==4284==ERROR: AddressSanitizer: heap-use-after-free on address 0x60700003cf50 at pc 0x7f22b904814b bp 0x7ffda5338480 sp 0x7ffda5337c30
READ of size 79 at 0x60700003cf50 thread T0
    #0 0x7f22b904814a in __interceptor_memcpy ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:827
    #1 0x560430138ab6 in void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>(char*, char*, std::forward_iterator_tag) [clone .constprop.0] (/home/aeva/Projects/tangerine/linux/build/Release/bin/tangerine+0x2f0ab6)
    #2 0x5604301421c6 in ifd::FileDialog::m_setDirectory(std::filesystem::__cxx11::path const&, bool) (/home/aeva/Projects/tangerine/linux/build/Release/bin/tangerine+0x2fa1c6)
    #3 0x5604301456aa in ifd::FileDialog::m_renderContent() (/home/aeva/Projects/tangerine/linux/build/Release/bin/tangerine+0x2fd6aa)
    #4 0x560430145e6b in ifd::FileDialog::m_renderFileDialog() (/home/aeva/Projects/tangerine/linux/build/Release/bin/tangerine+0x2fde6b)
    #5 0x5604301464f7 in ifd::FileDialog::IsDone(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) (/home/aeva/Projects/tangerine/linux/build/Release/bin/tangerine+0x2fe4f7)
    #6 0x5604300678b4 in RenderUI(SDL_Window*, bool&) (/home/aeva/Projects/tangerine/linux/build/Release/bin/tangerine+0x21f8b4)
    #7 0x56043006fa0e in MainLoop() (/home/aeva/Projects/tangerine/linux/build/Release/bin/tangerine+0x227a0e)
    #8 0x56042fe898fa in main (/home/aeva/Projects/tangerine/linux/build/Release/bin/tangerine+0x418fa)
    #9 0x7f22b8967189 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58
    #10 0x7f22b8967244 in __libc_start_main_impl ../csu/libc-start.c:381
    #11 0x56042fe8b8c0 in _start (/home/aeva/Projects/tangerine/linux/build/Release/bin/tangerine+0x438c0)

0x60700003cf50 is located 0 bytes inside of 80-byte region [0x60700003cf50,0x60700003cfa0)
freed by thread T0 here:
    #0 0x7f22b90ba3c8 in operator delete(void*, unsigned long) ../../../../src/libsanitizer/asan/asan_new_delete.cpp:164
    #1 0x56043014210a in ifd::FileDialog::m_setDirectory(std::filesystem::__cxx11::path const&, bool) (/home/aeva/Projects/tangerine/linux/build/Release/bin/tangerine+0x2fa10a)

previously allocated by thread T0 here:
    #0 0x7f22b90b94c8 in operator new(unsigned long) ../../../../src/libsanitizer/asan/asan_new_delete.cpp:95
    #1 0x560430138a9b in void std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::_M_construct<char*>(char*, char*, std::forward_iterator_tag) [clone .constprop.0] (/home/aeva/Projects/tangerine/linux/build/Release/bin/tangerine+0x2f0a9b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants