Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Server Crash with Compound Operator

See original GitHub issue

Issue type:

  • 🐛 Bug

Short description:

I was hoping this issue would be fixed with the latest version, but it seems it is not yet.

In an attempt to create an operator that binds two values and then waits for an operator to apply to it, I’m able to create an operator that reliably crashes the server.

This issue may be related to #751.

Steps to reproduce the problem:

Due to the complex nature of the operator, I’ll use some pseudo-code to describe how I built the offending operator.

Notes on the pseudo-code:

  • Any place you see a var is where a variable card was bound in the Logic Programmer.
  • The string in the back-ticks is the name I gave the variable card using a Labeller.
  • The type that I think the variable card should evaluate to follows the colon; generic-types are used to aid clarity.
  • Operator application is Haskell-style.
  • Operators applied via the Logic Programmer are in camelCase.
// Creating the offending `Op@Bind2` operator.

var `Op@Apply2`: (A -> B -> C) -> A -> B -> C
  = operatorByName "Operator Apply 2";

var `Op@Flip`: (A -> B -> C) -> (B -> A -> C)
  = operatorByName "Operator Flip";

var `Op@Apply2 Flipped`: A -> (A -> B -> C) -> B -> C
  = flip `Op@Apply2`;

var `Op@Bind2`: A -> B -> (A -> B -> C) -> C
  = pipe `Op@Apply2 Flipped` `Op@Flip`;

// Attempting to use the `Op@Bind2` operator.

var `Int@4`: Integer
  = integer 4;

var `Int@8`: Integer
  = integer 8;

var `Op@Bound<4, 8>`: (Integer -> Integer -> C) -> C
  = apply2 `Op@Bind2` `Int@4` `Int@8`;

var `Op@Addition`: Number -> Number -> Number
  = operatorByName "Arithmetic Addition";

var `Integer@Addition Result`: Integer
  = apply `Op@Bound<4, 8>` `Op@Addition`;

When the Integer@Addition Result variable card is placed into a Displayer, Proxy, or Materializer, the server crashes.

The server can be restarted and the variable card removed by breaking the object that contains it. The network may need to be reinitialized by breaking a logic cable and replacing it before it will begin evaluating a program again.

Expected behaviour:

At best, I expect the Integer@Addition Result variable card to evaluate to 12.

At worst, I expect that it does not crash the server, and catches and displays an error to the user in the GUI of the device the Integer@Addition Result variable card is placed into.

This is probably related to a lack of proper eta-conversion, and it would be fine if this particular program fails for that reason, but it certainly should not crash the server.


  • This mod: 1.0.16
  • Minecraft: 1.12.2
  • Forge:
  • Mod pack: Enigmatica 2: Expert, version 1.65d

Log file:

The crash-log produced by this crash is available on PasteBin.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

JHawkleycommented, Jul 10, 2019

Oh, don’t worry. I do understand what is happening to the operator signatures under-the-hood.

The use of Haskell-style type annotations for operators makes me really wanna believe that we’re dealing with operator :: A -> B -> C, functions with single arguments which return other functions, and not operator (A, B): C, functions that have a C-style parameter-list and require multiple arguments to be supplied before returning any kind of value.

I think how the operators present their types right now is confusing and misleading, and I’m more or less trying to hammer that point home by ignoring the actual reality. 😛

Honestly, I’m really wanting to dig into this code-base and add in generics (to get stronger type checking in the Logic Programmer), eta-conversions, guards (or type-tags as I’m currently calling them in my head), tuples, patterns and pattern-matching, and a lot of other features that I think would benefit the player and make the creation of programs easier and more intuitive.

I’ve been slowly familiarizing myself with the code-base, more or less in preparation for contributing. Maybe I should get on the Discord and see if I can coordinate.

Anyways, regardless of what is happening with the types of the operators produced by my shenanigans, this particular sequence still shouldn’t crash the server. 😛

JHawkleycommented, Jul 11, 2019

Wowie~ Just noticed and looked through the commit. It sure does! This is gonna really make things so much smoother. Thanks for putting in the effort for the best result. 😊

Read more comments on GitHub >

github_iconTop Results From Across the Web

[SOLVED] Compound Report in Developer Studio not working
I'm running Dev Studio 8104 and I'm running a large compound report ... of reporting server agent [Crashed or extreme operator kill)" ...
Read more >
top reasons why an app server crashes - Stack Overflow
All sorts of things can cause a server to crash, ranging from busted hardware (e.g. disk failures) to faulty code (memory leak resulting...
Read more >
Compound Operators (Transact-SQL) - Microsoft Learn
Compound operators execute some operation and set an original value to the result of the operation. For example, if a variable @x equals...
Read more >
Perform simple and compound queries in Cloud Firestore
Perform simple and compound queries in Cloud Firestore · On this page · Example data · Simple queries. Execute a query · Query...
Read more >
package-server pod keeps crashing #598 - GitHub
package-server panics regularly: k -n olm logs -f ... fail []: Expected ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found