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

Random Null Pointer Exception #80

Closed
1 task done
MenacingPerson opened this issue Oct 22, 2021 · 8 comments
Closed
1 task done

Random Null Pointer Exception #80

MenacingPerson opened this issue Oct 22, 2021 · 8 comments
Labels
bug Something isn't working

Comments

@MenacingPerson
Copy link

MenacingPerson commented Oct 22, 2021

Operating System

Windows, Linux

Description of bug

When using a prelaunch command, certain things can cause crashes.

  1. Creating a new instance, adding prelaunch command and running
  2. Starting an instance with a prelaunch command without running it with prelaunch command disabled once (per restart of multimc).

Backtrace:

#0  0x000000000055f660 in QList<QString>::append(QString const&) ()
#1  0x00000000006d2f08 in MinecraftInstance::javaArguments() const ()
#2  0x00000000006d52c0 in MinecraftInstance::getVariables() const ()
#3  0x00000000006d4aae in MinecraftInstance::createEnvironment() ()
#4  0x0000000000675f41 in PreLaunchCommand::PreLaunchCommand(LaunchTask*) ()
#5  0x00000000006d62da in MinecraftInstance::createLaunchTask(std::shared_ptr<AuthSession>, std::shared_ptr<MinecraftServerTarget>, unsigned short) ()
#6  0x000000000058e621 in LaunchController::launchInstance() ()
#7  0x000000000059175a in LaunchController::login() ()
#8  0x00000000005553a3 in Launcher::launch(std::shared_ptr<BaseInstance>, bool, BaseProfilerFactory*, std::shared_ptr<MinecraftServerTarget>, std::shared_ptr<MinecraftAccount>) ()
#9  0x0000000000581bbe in InstanceWindow::on_btnKillMinecraft_clicked() ()
#10 0x00007ffff6d113f0 in doActivate<false> (sender=0x192a490, signal_index=9, argv=0x7fffffffcb20) at kernel/qobject.cpp:3898
#11 0x00007ffff6d0c327 in QMetaObject::activate (sender=sender@entry=0x192a490, m=m@entry=0x7ffff7e9c6a0 <QAbstractButton::staticMetaObject>, local_signal_index=local_signal_index@entry=2, argv=argv@entry=0x7fffffffcb20)
    at kernel/qobject.cpp:3946
#12 0x00007ffff7a66516 in QAbstractButton::clicked (this=this@entry=0x192a490, _t1=<optimized out>) at .moc/moc_qabstractbutton.cpp:308
#13 0x00007ffff7a6679e in QAbstractButtonPrivate::emitClicked (this=0x192a9f0) at widgets/qabstractbutton.cpp:415
#14 0x00007ffff7a683c4 in QAbstractButtonPrivate::click (this=0x192a9f0) at widgets/qabstractbutton.cpp:408
#15 0x00007ffff7a685e7 in QAbstractButton::mouseReleaseEvent (this=0x192a490, e=0x7fffffffd0a0) at widgets/qabstractbutton.cpp:1044
#16 0x00007ffff79b3e7e in QWidget::event (this=0x192a490, event=0x7fffffffd0a0) at kernel/qwidget.cpp:9020
#17 0x00007ffff7971443 in QApplicationPrivate::notify_helper (this=this@entry=0xb0b650, receiver=receiver@entry=0x192a490, e=e@entry=0x7fffffffd0a0) at kernel/qapplication.cpp:3632
#18 0x00007ffff7979074 in QApplication::notify (this=0x7fffffffcde0, receiver=0x192a490, e=0x7fffffffd0a0) at kernel/qapplication.cpp:3076
#19 0x00007ffff6cdd798 in QCoreApplication::notifyInternal2 (receiver=0x192a490, event=0x7fffffffd0a0) at kernel/qcoreapplication.cpp:1064
#20 0x00007ffff7977b57 in QApplicationPrivate::sendMouseEvent (receiver=receiver@entry=0x192a490, event=event@entry=0x7fffffffd0a0, alienWidget=alienWidget@entry=0x192a490, nativeWidget=0x1450670, buttonDown=<optimized out>, 
    lastMouseReceiver=..., spontaneous=true, onlyDispatchEnterLeave=false) at kernel/qapplication.cpp:2614
#21 0x00007ffff79cd450 in QWidgetWindow::handleMouseEvent (this=0x1930920, event=0x7fffffffd350) at kernel/qwidgetwindow.cpp:683
#22 0x00007ffff79d06e5 in QWidgetWindow::event (this=0x1930920, event=0x7fffffffd350) at kernel/qwidgetwindow.cpp:300
#23 0x00007ffff7971443 in QApplicationPrivate::notify_helper (this=<optimized out>, receiver=0x1930920, e=0x7fffffffd350) at kernel/qapplication.cpp:3632
#24 0x00007ffff6cdd798 in QCoreApplication::notifyInternal2 (receiver=0x1930920, event=0x7fffffffd350) at kernel/qcoreapplication.cpp:1064
#25 0x00007ffff712eba8 in QGuiApplicationPrivate::processMouseEvent (e=0x18fe160) at kernel/qguiapplication.cpp:2275
#26 0x00007ffff710ec9c in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at kernel/qwindowsysteminterface.cpp:1169
#27 0x00007fffe5dd0644 in userEventSourceDispatch(_GSource*, int (*)(void*), void*) () from /lib64/libQt5WaylandClient.so.5
#28 0x00007ffff583a33f in g_main_dispatch (context=0xbb2230) at ../glib/gmain.c:3381
#29 g_main_context_dispatch (context=0xbb2230) at ../glib/gmain.c:4099
#30 0x00007ffff588f288 in g_main_context_iterate.constprop.0 (context=context@entry=0xbb2230, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/gmain.c:4175
#31 0x00007ffff58379e3 in g_main_context_iteration (context=0xbb2230, may_block=1) at ../glib/gmain.c:4240
#32 0x00007ffff6d2eb78 in QEventDispatcherGlib::processEvents (this=0xbb2340, flags=...) at kernel/qeventdispatcher_glib.cpp:423
#33 0x00007ffff6cdc1a2 in QEventLoop::exec (this=this@entry=0x7fffffffd6e0, flags=..., flags@entry=...) at ../../include/QtCore/../../src/corelib/global/qflags.h:69
#34 0x00007ffff6ce46e4 in QCoreApplication::exec () at ../../include/QtCore/../../src/corelib/global/qflags.h:121
#35 0x0000000000551371 in main ()

Steps to reproduce

  1. Create a new instance and DO NOT run it.
  2. Go to Edit Instance > Settings > Custom commands.
  3. Enable Custom commands.
  4. Set prelaunch to any command. For testing purposes you can use cmd or bash or zsh or any other command.
  5. Run Instance.
    Now it should crash. After this, relaunch MultiMC and disable Custom commands. Run the instance once and close it. Then enable them and it should work fine. If you restart MultiMC or use another instance the issue should occur again.

Suspected cause

No response

This issue is unique

  • I have searched the issue tracker and did not find an issue describing my bug.
@MenacingPerson MenacingPerson added the bug Something isn't working label Oct 22, 2021
@Neptune650
Copy link
Collaborator

Hm, this maybe also happens on upstream? Unsure though.

@MenacingPerson
Copy link
Author

I'll check if it happens in the new one.

@MenacingPerson
Copy link
Author

still happens on newest

@MenacingPerson
Copy link
Author

Update: attached backtrace

@Neptune650
Copy link
Collaborator

According to the backtrace, it's likely that it also happens on the upstream launcher

@MenacingPerson
Copy link
Author

I don't think it does, asked a few people.

@Neptune650
Copy link
Collaborator

Ok can replicate.

@Neptune650
Copy link
Collaborator

Not sure what caused it, but it's fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants