Comments (11)
I installed a Pop!_OS VM and tracked down the issue. This is a Boron bug which I have just pushed a fix for. The Makefile was also broken on Pop! and a shared library (the default) got installed into the wrong directory. Thanks for your report.
I have also asked @SiegeLord to update the PPA for Ubuntu 21.10.
from u4.
from u4.
The compiler is gcc version 11.2.0 (Ubuntu 11.2.0-7ubuntu2)
No configure options.
The binary from .net does not crash with the same error, but complains:
u4: error: Unable to initialize Allegro
from u4.
from u4.
These are the liballegro packages installed:
liballegro-acodec5-dev/impish,now 2:5.2.6.0-3 amd64 [installed,automatic]
liballegro-acodec5.2/impish,now 2:5.2.6.0-3 amd64 [installed]
liballegro-audio5-dev/impish,now 2:5.2.6.0-3 amd64 [installed,automatic]
liballegro-audio5.2/impish,now 2:5.2.6.0-3 amd64 [installed,automatic]
liballegro-dialog5-dev/impish,now 2:5.2.6.0-3 amd64 [installed,automatic]
liballegro-dialog5.2/impish,now 2:5.2.6.0-3 amd64 [installed,automatic]
liballegro-image5-dev/impish,now 2:5.2.6.0-3 amd64 [installed,automatic]
liballegro-image5.2/impish,now 2:5.2.6.0-3 amd64 [installed,automatic]
liballegro-physfs5-dev/impish,now 2:5.2.6.0-3 amd64 [installed,automatic]
liballegro-physfs5.2/impish,now 2:5.2.6.0-3 amd64 [installed,automatic]
liballegro-ttf5-dev/impish,now 2:5.2.6.0-3 amd64 [installed,automatic]
liballegro-ttf5.2/impish,now 2:5.2.6.0-3 amd64 [installed,automatic]
liballegro-video5-dev/impish,now 2:5.2.6.0-3 amd64 [installed,automatic]
liballegro-video5.2/impish,now 2:5.2.6.0-3 amd64 [installed,automatic]
liballegro4-dev/impish 2:4.4.3.1-2 amd64
liballegro4.4/impish 2:4.4.3.1-2 amd64
liballegro5-dev/impish,now 2:5.2.6.0-3 amd64 [installed]
liballegro5.2/impish,now 2:5.2.6.0-3 amd64 [installed]
$xu4 -h provides normal output (from both my repo build and the downloaded version), but the other options still core:
xu4: Ultima IV Recreated
v1.1svn (Dec 16 2021)
Options:
--filter <string> Specify display filtering options.
-f, --fullscreen Run in fullscreen mode.
-h, --help Print this message and quit.
-i, --skip-intro Skip the intro. and load the last saved game.
-p, --profile <string> Use another set of settings and save files.
-q, --quiet Disable audio.
-s, --scale <int> Specify scaling factor (1-5).
-v, --verbose Enable verbose console output.
Filters: point, 2xBi, 2xSaI, Scale2x
Homepage: http://xu4.sourceforge.com
$ ./xu4
*** stack smashing detected ***: terminated
Aborted (core dumped)
xu4 -v finds/opens it's dependencies before crashing, fwiw.
Thanks for walking me through this.
from u4.
from u4.
I'll try building Allegro 5.2.7 from source, the base repo doesn't have that build yet, and the PPA from Allegro doesn't have impish builds.
The -v output is:
$ ./xu4 -v
u4upgrad.zip successfully found
trying to open ././ultima4-1.01.zip
trying to open ./u4/ultima4-1.01.zip
trying to open ./ultima4/./ultima4-1.01.zip
trying to open ./ultima4/u4/ultima4-1.01.zip
trying to open /usr/lib/u4/./ultima4-1.01.zip
trying to open /usr/lib/u4/u4/ultima4-1.01.zip
trying to open /usr/local/lib/u4/./ultima4-1.01.zip
trying to open /usr/local/lib/u4/u4/ultima4-1.01.zip
ultima4-1.01.zip not found
ultima4.zip successfully found
looking for AVATAR.EXE
AVATAR.EXE found in ultima4.zip
looking for u4vga.pal
u4vga.pal found in u4upgrad.zip
looking for ega.drv
ega.drv found in ultima4.zip
*** stack smashing detected ***: terminated
Aborted (core dumped)
from u4.
from u4.
If you can't debug the program here's a patch to narrow down the point of failure. Based upon the verbose log, configInit() is probably failing.
diff --git a/src/xu4.cpp b/src/xu4.cpp
index 89d2decc..ed3e5242 100644
--- a/src/xu4.cpp
+++ b/src/xu4.cpp
@@ -194,13 +194,19 @@ void servicesInit(XU4GameServices* gs, Options* opt) {
Debug::initGlobal("debug/global.txt");
+ if (verbose) printf("service: config\n");
gs->config = configInit();
+
+ if (verbose) printf("service: screen\n");
screenInit();
Tile::initSymbols(gs->config);
- if (! (opt->flags & OPT_NO_AUDIO))
+ if (! (opt->flags & OPT_NO_AUDIO)) {
+ if (verbose) printf("service: sound\n");
soundInit();
+ }
+ if (verbose) printf("service: EventHandler\n");
gs->eventHandler = new EventHandler(1000/gs->settings->gameCyclesPerSecond,
1000/gs->settings->screenAnimationFramesPerSecond);
from u4.
Confirmed your suspicion about configInit():
$ ./xu4 -v
u4upgrad.zip successfully found
trying to open ././ultima4-1.01.zip
trying to open ./u4/ultima4-1.01.zip
trying to open ./ultima4/./ultima4-1.01.zip
trying to open ./ultima4/u4/ultima4-1.01.zip
trying to open /usr/lib/u4/./ultima4-1.01.zip
trying to open /usr/lib/u4/u4/ultima4-1.01.zip
trying to open /usr/local/lib/u4/./ultima4-1.01.zip
trying to open /usr/local/lib/u4/u4/ultima4-1.01.zip
ultima4-1.01.zip not found
ultima4.zip successfully found
looking for AVATAR.EXE
AVATAR.EXE found in ultima4.zip
looking for u4vga.pal
u4vga.pal found in u4upgrad.zip
looking for ega.drv
ega.drv found in ultima4.zip
service: config
*** stack smashing detected ***: terminated
Aborted (core dumped)
I have made some progress (of a sort). Muddling my way around gdb (in over my head, in case it wasn't obvious) it looked like init was stepping through some libboron "stuff". I had also seen in the makefiles that some of that was avoided if I used the ./configure --xml
flag, so I gave that a shot against a clean clone from github. There was a build failure with line 5 of src/xu4.h
looking for a "notify.h" file that appeared to be in the support directory, so I changed it to #include "support/notify.h"
and the build succeeded. The resulting build succeeded and runs, but crashes out after character generation with an xml validation error several pages of (probably expected?) "No declaration for " messages :
$ ./src/xu4
xu4: warning: xml validation error:
No declaration for element armors
No declaration for element armor
...<SNIP>...
No declaration for attribute damage of element weapon
No declaration for attribute magic of element weapon
party.cpp:tileForClass:488: assertion `klass < 8' failed. invalid class 255 in tileForClass
Stack trace:
./src/xu4(_ZN11PartyMember12tileForClassEi+0xb8) [0x5562ab3293f6]
./src/xu4(_ZN11PartyMemberC1EP5PartyP20SaveGamePlayerRecord+0x43) [0x5562ab327e45]
./src/xu4(_ZN5PartyC1EP8SaveGame+0x121) [0x5562ab32963b]
./src/xu4(_ZN14GameController11initContextEv+0x311) [0x5562ab2e9935]
./src/xu4(_ZN14GameController7presentEv+0x70) [0x5562ab2e9510]
./src/xu4(_ZN12EventHandler13runControllerEP10Controller+0x2b) [0x5562ab2e2979]
./src/xu4(main+0x1db) [0x5562ab35654e]
/lib/x86_64-linux-gnu/libc.so.6(+0x2dfd0) [0x7fea124c2fd0]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x7d) [0x7fea124c307d]
Aborted (core dumped)
That seems to be a detour from the original issue, but thought it might help narrow things down at least to know that cutting out boron changes things significantly. Happy to provide more specific gdb
output (or the core file) if that's helpful.
from u4.
Thanks for your guidance and for tracking the bug down. I look forward to some classic Ultima nostalgia!
from u4.
Related Issues (16)
- Todo list? HOT 1
- Building xu4 on aarch64 devuan HOT 2
- can't build on macos HOT 15
- "Master is unstable" HOT 1
- Building binaries directly in github HOT 3
- Sounds HOT 2
- xu4: error: Unable to initialize Allegro HOT 2
- Tag for 1.1 ? HOT 5
- Cannot get Xu4 1.1 to run "Cannot find module" HOT 5
- Sanity Check: OpenGL requirement. HOT 5
- Cheat menu not working with cheats and enchancements on HOT 8
- companions' names not visible in party window HOT 3
- SDL support HOT 2
- [Feature request] Let us select multiple music modules HOT 6
- Move glv to github? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from u4.