Opened 2 years ago

Last modified 2 years ago

#13090 closed defect

Build failure due ItemLocation array declaration — at Version 5

Reported by: fedor4ever Owned by: sev-
Priority: normal Component: Engine: Ultima
Version: Keywords: Symbian, build error
Cc: Game: Ultima IV: Quest of the Avatar

Description (last modified by fedor4ever)

I look for initialization pointer to member and found nothing. This is bad code that violate C++ standart if there no initialization - https://isocpp.org/wiki/faq/pointers-to-members

I got error while building 2.5.0 release for Symbian:

elf2e32 : Error: E1066: Image failed validation
line 427
make[1]: *** [\Symbian\S60_5th_Edition_SDK_v1.0\epoc32\release\gcce\urel\Neverhoode.exe] Error 1
make: *** [TARGET] Error 2

I dig more deeper and found in scummvm\engines\ultima\ultima4\game\item.cpp struct array declaration ItemLocation Items::ITEMS[N_ITEMS]. Commentin it's body solve error.

After commented body I inserting several zero initialazers:

{ nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, 0, 0 }

Build success.
Uncomment one initialazer - build success.
Uncomment another initialazer - build error.
Inserting function pointer in several zero initialazers trigger build error too.

scummvm/engines/ultima/nuvie/usecode/u6_object_types.h has similar struct array which cause same error.

scummvm/engines/ultima/nuvie/keybinding/keys.cpp - has Action NuvieActions[] with normal functions pointers - ScummVM builds and runs.

Change History (5)

comment:1 by sev-, 2 years ago

Owner: set to sev-
Resolution: invalid
Status: newclosed

You are breaking the engine by commenting out the initalizer list. It is not like the true solution.

Moreover, you do not even provide the actual error message in your bugreport. What is "line 427"? What is the validation? What is Neverhoode.exe? You clearly screwed up your building environment.

Closing this as invalid.

comment:2 by fedor4ever, 2 years ago

Resolution: invalid
Status: closednew

I encounter a problem year ago - ScummVM can't start if Ultima engine built-in. I first encounter that while building release ScummVM 2.2.0. It was very hard to track down source error. So I cut down Ultima 4&6 support from Ultima engine in 2.2.0 release.

At this summer while building ScummVM I encounter such error. I reduce Ultima 4 subengine to it's detection table and entry point. Build comes flawless. I start enable warious parts while build was successful. After error happen scummvm\engines\ultima\ultima4\game\item.cpp was changed and error gone. I continue engine integration while all file compiled. Errors no more.

Then I reset my build environment except that change in scummvm\engines\ultima\ultima4\game\item.cpp. Build was successful and I saw Ultima 4 intro with music. I understand in that state game unplayable. I hope engine author plannig rewrite some engine parts.

About error message. I provide it. It's impossible to install several ScummVM.exe on one Symbian device. So Neverhoode comes. elf2e32 - tool for converting elf file to E32 aka EPOC32 aka Symbian binary. What means "line 427"? These idiots use that nonsense instead normal error print. I don't know what it means. That tool checks generated Symbian binary for correctness and print such nonsence.

Last edited 2 years ago by fedor4ever (previous) (diff)

comment:3 by sev-, 2 years ago

Resolution: invalid
Status: newclosed

comment:4 by fedor4ever, 2 years ago

Description: modified (diff)
Resolution: invalid
Status: closednew

comment:5 by fedor4ever, 2 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.