Giter Site home page Giter Site logo

Comments (13)

illustris avatar illustris commented on August 22, 2024 3

PR opened for GLFW: glfw/glfw#2024

I've tested with my patch, it seems to work. @thelastguardian @Seegras can either of you confirm? If you're using multimc, you need to

  • enable Settings -> workarounds -> Native Libraries -> Use system installation of GLFW
  • create a wrapper script that looks something like
#!/usr/bin/env bash
export LD_LIBRARY_PATH=/<path to your build of glfw>/lib
exec "$@"
  • Make the script executable
  • add it in Settings -> Custom commands -> Wrapper command

from aqm2-old.

Seegras avatar Seegras commented on August 22, 2024

I can confirm. Last version that works for me is 1.4.1.
1.4.2-hotfix already has that behaviour.
Crash log for that version: https://paste.corebot.dev/raw/ilesoladav

from aqm2-old.

itsdinkd avatar itsdinkd commented on August 22, 2024

1.4.2 did have a Fabric API update, which could be your issue. They released another Fabric API update today, that isn't in 1.5.2. I would recommend updating your fabric API mod to their latest and see if that helps.

from aqm2-old.

illustris avatar illustris commented on August 22, 2024

1.5.2a is still broken. Tried to run 1.5.2a with fabric-api-0.44.0+1.18.jar, but that fails because Extra Origins doesn't support that version.

from aqm2-old.

thelastguardian avatar thelastguardian commented on August 22, 2024

also tried 1.5.2a with Fabric API 0.45.1+1.18 (today's update that red2blue is referring to), still the same crash as 1.5.2a's bundled fabric-api-0.45.0+1.18.jar. can't revert to fabric-api-0.44 since ExtraOrigins requires 0.45.0+ as mentioned.

from aqm2-old.

illustris avatar illustris commented on August 22, 2024
(gdb) bt full
#0  0x00007fc564204baa in raise () from /nix/store/wl60dr9p15rwf53gxz61ijgisc1zdjc7-glibc-2.33-59/lib/libc.so.6
No symbol table info available.
#1  0x00007fc5641ef523 in abort () from /nix/store/wl60dr9p15rwf53gxz61ijgisc1zdjc7-glibc-2.33-59/lib/libc.so.6
No symbol table info available.
#2  0x00007fc5642452e8 in __libc_message () from /nix/store/wl60dr9p15rwf53gxz61ijgisc1zdjc7-glibc-2.33-59/lib/libc.so.6
No symbol table info available.
#3  0x00007fc5642d2382 in __fortify_fail () from /nix/store/wl60dr9p15rwf53gxz61ijgisc1zdjc7-glibc-2.33-59/lib/libc.so.6
No symbol table info available.
#4  0x00007fc5642d0e40 in __chk_fail () from /nix/store/wl60dr9p15rwf53gxz61ijgisc1zdjc7-glibc-2.33-59/lib/libc.so.6
No symbol table info available.
#5  0x00007fc5642d22d7 in __fdelt_warn () from /nix/store/wl60dr9p15rwf53gxz61ijgisc1zdjc7-glibc-2.33-59/lib/libc.so.6
No symbol table info available.
#6  0x00007fc516bbb270 in waitForEvent (timeout=timeout@entry=0x7fc55e9ae888) at /build/source/src/x11_window.c:77
        __d = 1094
        fds = {__fds_bits = {0 <repeats 16 times>}}
        fd = 1094
        count = 1096
#7  0x00007fc516bbb9da in waitForVisibilityNotify (window=window@entry=0x7fc43435c8f0) at /build/source/src/x11_window.c:119
        dummy = {type = 872924384, xany = {type = 872924384, serial = 50331655, send_event = 1587210448, display = 0x7fc563bc294f <XGetWindowAttributes+63>, window = 480}, xkey = {type = 872924384, serial = 50331655, send_event = 1587210448, display = 0x7fc563bc294f <XGetWindowAttributes+63>, window = 480,
            root = 854, subwindow = 0, time = 140484466690998, x = 0, y = 0, x_root = 854, y_root = 480, state = 0, keycode = 24, same_screen = 875522800}, xbutton = {type = 872924384, serial = 50331655, send_event = 1587210448, display = 0x7fc563bc294f <XGetWindowAttributes+63>, window = 480, root = 854,
            subwindow = 0, time = 140484466690998, x = 0, y = 0, x_root = 854, y_root = 480, state = 0, button = 24, same_screen = 875522800}, xmotion = {type = 872924384, serial = 50331655, send_event = 1587210448, display = 0x7fc563bc294f <XGetWindowAttributes+63>, window = 480, root = 854, subwindow = 0,
            time = 140484466690998, x = 0, y = 0, x_root = 854, y_root = 480, state = 0, is_hint = 24 '\030', same_screen = 875522800}, xcrossing = {type = 872924384, serial = 50331655, send_event = 1587210448, display = 0x7fc563bc294f <XGetWindowAttributes+63>, window = 480, root = 854, subwindow = 0,
            time = 140484466690998, x = 0, y = 0, x_root = 854, y_root = 480, mode = 0, detail = 24, same_screen = 875522800, focus = 32708, state = 1977}, xfocus = {type = 872924384, serial = 50331655, send_event = 1587210448, display = 0x7fc563bc294f <XGetWindowAttributes+63>, window = 480, mode = 854,
            detail = 0}, xexpose = {type = 872924384, serial = 50331655, send_event = 1587210448, display = 0x7fc563bc294f <XGetWindowAttributes+63>, window = 480, x = 854, y = 0, width = 0, height = 0, count = 381406134}, xgraphicsexpose = {type = 872924384, serial = 50331655, send_event = 1587210448,
            display = 0x7fc563bc294f <XGetWindowAttributes+63>, drawable = 480, x = 854, y = 0, width = 0, height = 0, count = 381406134, major_code = 32709, minor_code = 0}, xnoexpose = {type = 872924384, serial = 50331655, send_event = 1587210448, display = 0x7fc563bc294f <XGetWindowAttributes+63>, drawable = 480,
            major_code = 854, minor_code = 0}, xvisibility = {type = 872924384, serial = 50331655, send_event = 1587210448, display = 0x7fc563bc294f <XGetWindowAttributes+63>, window = 480, state = 854}, xcreatewindow = {type = 872924384, serial = 50331655, send_event = 1587210448,
            display = 0x7fc563bc294f <XGetWindowAttributes+63>, parent = 480, window = 854, x = 0, y = 0, width = 381406134, height = 32709, border_width = 0, override_redirect = 0}, xdestroywindow = {type = 872924384, serial = 50331655, send_event = 1587210448, display = 0x7fc563bc294f <XGetWindowAttributes+63>,
            event = 480, window = 854}, xunmap = {type = 872924384, serial = 50331655, send_event = 1587210448, display = 0x7fc563bc294f <XGetWindowAttributes+63>, event = 480, window = 854, from_configure = 0}, xmap = {type = 872924384, serial = 50331655, send_event = 1587210448,
            display = 0x7fc563bc294f <XGetWindowAttributes+63>, event = 480, window = 854, override_redirect = 0}, xmaprequest = {type = 872924384, serial = 50331655, send_event = 1587210448, display = 0x7fc563bc294f <XGetWindowAttributes+63>, parent = 480, window = 854}, xreparent = {type = 872924384,
            serial = 50331655, send_event = 1587210448, display = 0x7fc563bc294f <XGetWindowAttributes+63>, event = 480, window = 854, parent = 0, x = 381406134, y = 32709, override_redirect = 0}, xconfigure = {type = 872924384, serial = 50331655, send_event = 1587210448,
            display = 0x7fc563bc294f <XGetWindowAttributes+63>, event = 480, window = 854, x = 0, y = 0, width = 381406134, height = 32709, border_width = 0, above = 2061584302934, override_redirect = 0}, xgravity = {type = 872924384, serial = 50331655, send_event = 1587210448,
            display = 0x7fc563bc294f <XGetWindowAttributes+63>, event = 480, window = 854, x = 0, y = 0}, xresizerequest = {type = 872924384, serial = 50331655, send_event = 1587210448, display = 0x7fc563bc294f <XGetWindowAttributes+63>, window = 480, width = 854, height = 0}, xconfigurerequest = {type = 872924384,
            serial = 50331655, send_event = 1587210448, display = 0x7fc563bc294f <XGetWindowAttributes+63>, parent = 480, window = 854, x = 0, y = 0, width = 381406134, height = 32709, border_width = 0, above = 2061584302934, detail = 0, value_mask = 140480665840368}, xcirculate = {type = 872924384,
            serial = 50331655, send_event = 1587210448, display = 0x7fc563bc294f <XGetWindowAttributes+63>, event = 480, window = 854, place = 0}, xcirculaterequest = {type = 872924384, serial = 50331655, send_event = 1587210448, display = 0x7fc563bc294f <XGetWindowAttributes+63>, parent = 480, window = 854,
            place = 0}, xproperty = {type = 872924384, serial = 50331655, send_event = 1587210448, display = 0x7fc563bc294f <XGetWindowAttributes+63>, window = 480, atom = 854, time = 0, state = 381406134}, xselectionclear = {type = 872924384, serial = 50331655, send_event = 1587210448,
            display = 0x7fc563bc294f <XGetWindowAttributes+63>, window = 480, selection = 854, time = 0}, xselectionrequest = {type = 872924384, serial = 50331655, send_event = 1587210448, display = 0x7fc563bc294f <XGetWindowAttributes+63>, owner = 480, requestor = 854, selection = 0, target = 140484466690998,
            property = 0, time = 2061584302934}, xselection = {type = 872924384, serial = 50331655, send_event = 1587210448, display = 0x7fc563bc294f <XGetWindowAttributes+63>, requestor = 480, selection = 854, target = 0, property = 140484466690998, time = 0}, xcolormap = {type = 872924384, serial = 50331655,
            send_event = 1587210448, display = 0x7fc563bc294f <XGetWindowAttributes+63>, window = 480, colormap = 854, new = 0, state = 0}, xclient = {type = 872924384, serial = 50331655, send_event = 1587210448, display = 0x7fc563bc294f <XGetWindowAttributes+63>, window = 480, message_type = 854, format = 0,
            data = {b = "\266˻\026\305\177\000\000\000\000\000\000\000\000\000\000V\003\000", s = {-13386, 5819, 32709, 0, 0, 0, 0, 0, 854, 0}, l = {140484466690998, 0, 2061584302934, 103079215104, 140480665840368}}}, xmapping = {type = 872924384, serial = 50331655, send_event = 1587210448,
            display = 0x7fc563bc294f <XGetWindowAttributes+63>, window = 480, request = 854, first_keycode = 0, count = 0}, xerror = {type = 872924384, display = 0x3000007, resourceid = 140485672495312, serial = 140485758560591, error_code = 224 '\340', request_code = 1 '\001', minor_code = 0 '\000'}, xkeymap = {
            type = 872924384, serial = 50331655, send_event = 1587210448, display = 0x7fc563bc294f <XGetWindowAttributes+63>, window = 480, key_vector = "V\003", '\000' <repeats 14 times>, "\266˻\026\305\177\000\000\000\000\000\000\000\000\000"}, xgeneric = {type = 872924384, serial = 50331655,
            send_event = 1587210448, display = 0x7fc563bc294f <XGetWindowAttributes+63>, extension = 480, evtype = 0}, xcookie = {type = 872924384, serial = 50331655, send_event = 1587210448, display = 0x7fc563bc294f <XGetWindowAttributes+63>, extension = 480, evtype = 0, cookie = 854, data = 0x0}, pad = {
            140480663241952, 50331655, 140485672495312, 140485758560591, 480, 854, 0, 140484466690998, 0, 2061584302934, 103079215104, 140480665840368, 1977, 1, 1, 4294967295, 0, 50331655, 140480663241952, 140485758589192, 50331655, 140480663241952, 854, 140485758592129}}
        timeout = 0.10000000000000001
#8  0x00007fc516bbd0fa in _glfwPlatformShowWindow (window=window@entry=0x7fc43435c8f0) at /build/source/src/x11_window.c:2447
No locals.
#9  0x00007fc516bb703e in glfwCreateWindow (width=854, height=480, title=<optimized out>, monitor=0x0, share=<optimized out>) at /build/source/src/window.c:242
        fbconfig = {redBits = 8, greenBits = 8, blueBits = 8, alphaBits = 8, depthBits = 24, stencilBits = 8, accumRedBits = 0, accumGreenBits = 0, accumBlueBits = 0, accumAlphaBits = 0, auxBuffers = 0, stereo = 0, samples = 0, sRGB = 0, doublebuffer = 1, transparent = 0, handle = 0}
        ctxconfig = {client = 196609, source = 221185, major = 3, minor = 2, forward = 1, debug = 0, noerror = 0, profile = 204801, robustness = 0, release = 0, share = 0x0, nsgl = {offline = 0}}
        wndconfig = {width = 854, height = 480, title = 0x7fc4a59ae81e "Minecraft* 1.18.1", resizable = 1, visible = 1, decorated = 1, focused = 1, autoIconify = 1, floating = 0, maximized = 0, centerCursor = 1, focusOnShow = 1, scaleToMonitor = 0, ns = {retina = 1, frameName = '\000' <repeats 255 times>}, x11 = {
            className = '\000' <repeats 255 times>, instanceName = '\000' <repeats 255 times>}}
        window = 0x7fc43435c8f0
#10 0x00007fc54044353a in ?? ()
No symbol table info available.
#11 0x0000000000000000 in ?? ()
No symbol table info available.
// Wait for data to arrive using select
// This avoids blocking other threads via the per-display Xlib lock that also
// covers GLX functions
//
static GLFWbool waitForEvent(double* timeout)
{
    fd_set fds;
    const int fd = ConnectionNumber(_glfw.x11.display);
    int count = fd + 1;

#if defined(__linux__)
    if (_glfw.linjs.inotify > fd)
        count = _glfw.linjs.inotify + 1;
#endif
    for (;;)
    {
        FD_ZERO(&fds);
        FD_SET(fd, &fds); // This is where it crashes
#if defined(__linux__)
        if (_glfw.linjs.inotify > 0)
            FD_SET(_glfw.linjs.inotify, &fds);
#endif

This seems to be an issue when you have more than 1024 FDs open
https://stackoverflow.com/questions/22827510/how-to-avoid-bad-fd-set-buffer-overflow-crash

Disabling a bunch of mods probably reduces the number of open FDs on startup. This issue is likely with GLFW and not the modpack. I'll try to replace select() with poll() in GLFW as many of these SO threads are suggesting and see if that works.

from aqm2-old.

djeis97 avatar djeis97 commented on August 22, 2024

I'm experiencing this issue and your glfw patch seems to have solved it, thanks!

from aqm2-old.

Seegras avatar Seegras commented on August 22, 2024

I compiled with "mkdir build; cd build; cmake ..; make", but it only gives me libglfw3.a and with the above config changes, AQM2 fails with:
Failed to locate library: libglfw.so

from aqm2-old.

djeis97 avatar djeis97 commented on August 22, 2024

In the libglfw compilation guide they mention you need to pass -D BUILD_SHARED_LIBS=ON to cmake to get a so.

from aqm2-old.

Seegras avatar Seegras commented on August 22, 2024

.. And with that it works. (Of course, I did not check docs/ and there's nothing in the README.md...).

from aqm2-old.

p-O-q avatar p-O-q commented on August 22, 2024

@illustris Works like a charm using your patched repo version. Thanks a lot for your time and investigation - also solves same error for other modpacks.

from aqm2-old.

unilock avatar unilock commented on August 22, 2024

On the latest develop build of MultiMC (v0.6.14-develop-3184), "Use system installation of GLFW" is under "Settings" > "Minecraft"( > "Native library workarounds").

Also, my GLFW libraries were under "< path to your build of glfw >/src" as opposed to "< * >/lib".

from aqm2-old.

AppropriateEmu avatar AppropriateEmu commented on August 22, 2024

I keep getting buffer overflow detected now with that script, any ideas?

from aqm2-old.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.