简体   繁体   中英

Corrupted double-linked list

When running the Java application, after some times, here comes that error:

*** Error in `/usr/lib/jvm/java-1.7.0-openjdk-amd64/bin/java': corrupted double-linked list: 0x00007fd77c2cf640 ***

The correct instruction must set a variable and restart the application.

More information:

Immediately next, the Run-log print out:

Process finished with exit code 134

I found that the error occurs at this point:

private Game game;
private void backToMenu ()
{
    // switch to menu screen
    game.setScreen(new MenuScreen(game));
}

exactly at:

game.setScreen(new MenuScreen(game));

Some imports are:

import com.badlogic.gdx.Game;
import com.packtpub.libgdx.canyonbunny.screens.MenuScreen;

The libgdx version is 1.6.0, the guide says the libgdx version used in the book is 0.1.2 (Learning LibGDX Game Development Second Edition).

I run the desktop version (desktop module) of the application under Ubuntu 15.04.

Judging from the Google search results for "corrupted double-linked list", the message is a result of an internal assertion error detected in "malloc". That is the native heap allocation function which is used by native (C / C++) library code. The error is most likely a consequence of something (in native code) corrupting memory.

This kind of thing should never happen in a "pure Java" application. Possible causes include:

  • A bug in one of your own native libraries.
  • A bug in a 3rd-party native library.
  • A consequence of corruption cause by using the Unsafe class incorrectly.
  • A JVM bug.

But the minimal information you have provided does not allow us to diagnose your problem. (Hint!!)

The correct instruction must set a variable and restart the application.

It is unlikely that you can fix the problem that way.


UPDATE - There is still not enough information diagnose this, but when I Googled libgdx "corrupted double-linked list" , I got hits where the problem turned out to be due to methods being called on objects after dispose had been called.

It is possibly your code doing something like that, or the 3rd-party MenuScreen code doing it.

In short, it looks like something is using the libgdx wrappers incorrectly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM