|
Re: Porting to AmigaOS4 thread |
Posted on: 2019/9/22 22:17
#81 |
---|---|---|
Home away from home
![]() ![]() Joined:
2006/11/26 21:45 From a dying planet
Posts: 3972
|
@all
Ok, so here i am again b*tching about shared objects...and i am right! I switched scummvm from a static build to shared (wonder why i switched to static...oh yes, because it was cr*p from the beginning) So far so good, app runs (after struggling with the insane need to gather all the stupid shared objects in one place to make the stupid thing run - this is 2019, come on...) But, using opengl now is like watching a snail race, where the leader dozes off every second, so 20 points off of Gryffindor. After that i got adventurous and even switched scummvm to compile it's engines as "plugins" (shared objects in disguise) and what do you know, it runs too...with one engine, yes, with one!!! Adding more engines makes it become more and more sluggish until that dreaded thing will ***crash*** on starting ANY game, what the flying hill??? Another 100 points off of Gryffindor...does anyone still read this? No? OK, Harry Potter is so overrated that i mostly skipped issues 2-6 and the movies sucked a pile of garbage, though it was fun watching a mediocre kid actor grow up to become even worse...or as others put it, let's watch stupid people get rich following orders and getting filmed...fantasy p*rn, that's what it is... Did i mention i HATE shared objects? Stupid sh*t's not doing what it's supposed to do...just like Potter Since noone will fix the cr*p shared objects anytime (i wanted to write "soon", but i leave it) i'm going back to static builds and stop providing scummvm binaries once i hit the memory barrier crash(tm by hyperion). I could really need my stress ball back...too bad i sliced it over that stupid memory barrier bug the other day |
|
_________________
People are dying. Entire ecosystems are collapsing. We are in the beginning of a mass extinction. And all you can talk about is money and fairytales of eternal economic growth. How dare you! – Greta Thunberg |
||
|
Re: Porting to AmigaOS4 thread |
Posted on: 2019/9/23 10:57
#82 |
---|---|---|
Home away from home
![]() ![]() Joined:
2006/11/26 21:45 From a dying planet
Posts: 3972
|
@all
Why would this (1. first stracktrace entry, 2. second stacktrace entry)
AmigaOSFilesystemNode::AmigaOSFilesystemNode(const Common::String &p) {
crash when using shared objects, but work perfectly fine when using a static build?
Crash log for task "scummvm"
Does it really has to do with not finding a path/directory? Because that wouldn't be logical since the program accesses said path beforehand and does not crash. |
|
_________________
People are dying. Entire ecosystems are collapsing. We are in the beginning of a mass extinction. And all you can talk about is money and fairytales of eternal economic growth. How dare you! – Greta Thunberg |
||
|
Re: Porting to AmigaOS4 thread |
Posted on: 2019/9/23 13:11
#83 |
---|---|---|
Just can't stay away
![]() ![]() Joined:
2006/11/30 11:30 From Finland
Posts: 1799
|
@Raziel
Looks you might have a NULL IDOS pointer. If you add the following code to your main() function it could give a hint as to what is going wrong:
extern struct DOSIFace *IDOS;
|
|
|
Re: Porting to AmigaOS4 thread |
Posted on: 2019/9/23 15:12
#84 |
---|---|---|
Home away from home
![]() ![]() Joined:
2006/11/26 21:45 From a dying planet
Posts: 3972
|
@salass00
Thank you for chiming in
C++ backends/platform/sdl/amigaos/amigaos-main.o
Sorry if the error is obvious, it's not for me. Thank you |
|
_________________
People are dying. Entire ecosystems are collapsing. We are in the beginning of a mass extinction. And all you can talk about is money and fairytales of eternal economic growth. How dare you! – Greta Thunberg |
||
|
Re: Porting to AmigaOS4 thread |
Posted on: 2019/9/23 16:34
#85 |
---|---|---|
Just can't stay away
![]() ![]() Joined:
2006/11/30 11:30 From Finland
Posts: 1799
|
@Raziel
Since it is C++ code you need to add 'extern "C" { }' around the extern variable definitions. Also you might want to make them outside of the main() function. |
|
|
Re: Porting to AmigaOS4 thread |
Posted on: 2019/9/23 17:58
#86 |
---|---|---|
Just can't stay away
![]() ![]() Joined:
2007/7/14 21:30 From Lothric
Posts: 1239
|
@Raziel
If I remember correctly, ScummVM doesn't allow usage of many standard lib functions. So you may need to replace printf with "warning" or whatever can print to console. |
|
|
Re: Porting to AmigaOS4 thread |
Posted on: 2019/9/23 18:36
#87 |
---|---|---|
Home away from home
![]() ![]() Joined:
2006/11/26 21:45 From a dying planet
Posts: 3972
|
@Capehill
@salass00 Thank you both, this combination compiles:
extern "C" {
but there is no output, it simply crashes without printing anything, probbaly another mistake by me or the part of code i put it in is yet to be called/used? |
|
_________________
People are dying. Entire ecosystems are collapsing. We are in the beginning of a mass extinction. And all you can talk about is money and fairytales of eternal economic growth. How dare you! – Greta Thunberg |
||
|
Re: Porting to AmigaOS4 thread |
Posted on: 2019/9/23 19:20
#88 |
---|---|---|
Just can't stay away
![]() ![]() Joined:
2006/11/30 11:30 From Finland
Posts: 1799
|
@Raziel
I can't help with ScummVM specific functions, but IExec->DebugPrintF() should at least be usable (if you can include <proto/exec.h>).
IExec->DebugPrintF("IDOS: %p\n", IDOS);
It prints to the serial so you will have to use sashimi or dumpdebugbuffer to catch the output (or have another computer connected with a null modem cable). You could also try std::cout to print to the console:
std::cout << "IDOS: " << IDOS << "\n";
But maybe it's disabled, same as printf(). |
|
|
Re: Porting to AmigaOS4 thread |
Posted on: 2019/9/23 20:56
#89 |
---|---|---|
Home away from home
![]() ![]() Joined:
2006/11/26 21:45 From a dying planet
Posts: 3972
|
@salass00
I stole some code from the android part, but it gives me an error Quote:
#ifdef __amigaos4__
|
|
_________________
People are dying. Entire ecosystems are collapsing. We are in the beginning of a mass extinction. And all you can talk about is money and fairytales of eternal economic growth. How dare you! – Greta Thunberg |
||
|
Re: Porting to AmigaOS4 thread |
Posted on: 2019/9/24 18:50
#90 |
---|---|---|
Just can't stay away
![]() ![]() Joined:
2007/7/14 21:30 From Lothric
Posts: 1239
|
@Raziel
Make sure you define new function(s) outside this updateScreen() function, and only call this checkGlError() with appropriate params within updateScreen(). If it fails, show us the code, please. |
|
|
Re: Porting to AmigaOS4 thread |
Posted on: 2019/9/24 23:18
#91 |
---|---|---|
Home away from home
![]() ![]() Joined:
2006/11/26 21:45 From a dying planet
Posts: 3972
|
@Capehill
Wait a second, i think i f*cked up...why do i need some GLerror code to debug IDOS? That can't work...i think i'm on the wrong thread... |
|
_________________
People are dying. Entire ecosystems are collapsing. We are in the beginning of a mass extinction. And all you can talk about is money and fairytales of eternal economic growth. How dare you! – Greta Thunberg |
||
|
Re: Porting to AmigaOS4 thread |
Posted on: 2019/9/24 23:53
#92 |
---|---|---|
Home away from home
![]() ![]() Joined:
2006/11/26 21:45 From a dying planet
Posts: 3972
|
@salass00
@Capehill Ok, so i added this:
extern "C" {
to https://github.com/scummvm/scummvm/blo ... /amigaos/amigaos-main.cpp line 32 and following. I don't get any output, neither console nor serial. As soon as i start *any* game it immediately crashes edit: This "immediate" is determined by logging the serial which immediately starts printing the crashlog after i hit enter on a game entry, so it does not even try to load code or datat from the game, it bombs right on accessing either the shared objects engine file (which i doubt, since it is already accessed when i hit the "About" dialogue, which lists all built engines and which would NOT list them if they weren't installed, i tried), or the directory/path where the game data is located (which is, of course correctly set in the options, i checked as well)
Crash log for task "scummvm"
I guess this doesn't work (at all) or just not where i put it? Help? I really want to tackle this bug, so i can provide future builds of ScummVM |
|
_________________
People are dying. Entire ecosystems are collapsing. We are in the beginning of a mass extinction. And all you can talk about is money and fairytales of eternal economic growth. How dare you! – Greta Thunberg |
||
|
Re: Porting to AmigaOS4 thread |
Posted on: 2019/9/25 0:18
#93 |
---|---|---|
Home away from home
![]() ![]() Joined:
2006/11/26 21:45 From a dying planet
Posts: 3972
|
@Capehill
I need to keep the threads within threads handled... At least i can spam my own thread as much as i want ![]() Regarding residualvm: When the white videos appear i get lots and lots of thos Quote:
Which means INVALID_OPERATION if i got that right from the web search |
|
_________________
People are dying. Entire ecosystems are collapsing. We are in the beginning of a mass extinction. And all you can talk about is money and fairytales of eternal economic growth. How dare you! – Greta Thunberg |
||
|
Re: Porting to AmigaOS4 thread |
Posted on: 2019/9/25 17:46
#94 |
---|---|---|
Just can't stay away
![]() ![]() Joined:
2007/7/14 21:30 From Lothric
Posts: 1239
|
@Raziel
Crash: did you try IExec's DebugPrintF()? Maybe warning() buffers output somewhere and crash happens before flush. GL_INVALID_PARAM: what are the problematic texture formats? |
|
|
Re: Porting to AmigaOS4 thread |
Posted on: 2019/9/25 18:35
#95 |
---|---|---|
Home away from home
![]() ![]() Joined:
2006/11/26 21:45 From a dying planet
Posts: 3972
|
@Capehill
ScummVM: DebugPrintF was not declared in this scope edit1: sigh...not to self...#include<inline4/exec.h> edit2: This comes up on serial when i start the launcher, nothing comes up, apart from the crashlog, when starting a game Quote:
Does that help? ResidualVM: i have absolutely no idea how i could read out the used formats, its nunfortunately not as easy as in scummvm. The only stuff i was able to read out is a long number 1308... etc, but i hvae no idea what to make of it, neither do i know if that is the correct thing to debug. Edited by Raziel on 2019/9/25 18:53:05
Edited by Raziel on 2019/9/25 19:01:52 |
|
_________________
People are dying. Entire ecosystems are collapsing. We are in the beginning of a mass extinction. And all you can talk about is money and fairytales of eternal economic growth. How dare you! – Greta Thunberg |
||
|
Re: Porting to AmigaOS4 thread |
Posted on: 2019/9/25 19:17
#96 |
---|---|---|
Just can't stay away
![]() ![]() Joined:
2007/7/14 21:30 From Lothric
Posts: 1239
|
@Raziel
Include proto/exec.h if you want to call IExec functions, rather. You could now try to add more DebugPrintFs near to the crash site. The last trace had r9 == 0 (NULL), for example, so there is an invalid read attempt. ResidualVM: there are only a handful of glTexImage2D calls: https://github.com/residualvm/residual ... d&unscoped_q=glteximage2d I guess it's possible to debug them all but it would be genereally faster to discuss with devs who wrote the code. One idea you could do, is to fork the engine, create a git branch, add your debug patches over and then show us what you have got. You can delete the branch later. |
|
|
Re: Porting to AmigaOS4 thread |
Posted on: 2019/9/25 19:21
#97 |
---|---|---|
Home away from home
![]() ![]() Joined:
2006/11/26 21:45 From a dying planet
Posts: 3972
|
@Capehill
ScummVM: If i include proto/exec.h i get Quote:
thus i used inline4/exec.h ResidualVM: Yeah, i did, the answer was: Quote:
|
|
_________________
People are dying. Entire ecosystems are collapsing. We are in the beginning of a mass extinction. And all you can talk about is money and fairytales of eternal economic growth. How dare you! – Greta Thunberg |
||
|
Re: Porting to AmigaOS4 thread |
Posted on: 2019/9/25 19:37
#98 |
---|---|---|
Home away from home
![]() ![]() Joined:
2006/11/26 21:45 From a dying planet
Posts: 3972
|
@Capehill
I already got a branch, i added the debug print fs now https://github.com/raziel-/scummvm/blo ... gaos/amigaos-main.cpp#L31 |
|
_________________
People are dying. Entire ecosystems are collapsing. We are in the beginning of a mass extinction. And all you can talk about is money and fairytales of eternal economic growth. How dare you! – Greta Thunberg |
||
|
Re: Porting to AmigaOS4 thread |
Posted on: 2019/9/25 21:07
#99 |
---|---|---|
Just can't stay away
![]() ![]() Joined:
2006/11/30 11:30 From Finland
Posts: 1799
|
@Raziel
Quote:
There is a problem with older newlibs if the requested minimum version is >= 52.39** that leads to DOSBase and IDOS not being properly initialised. It does not appear to be the reason for your problem though judging from the above output. If the crash was in a shared object it could be that it is unable to access the IDOS symbol from the main executable and this is leading to the NULL pointer access, but that does not look to be the case judging from the stack backtrace... ** For static newlib builds this only happens if one of the more recent newlib functions is used. I'm not sure how it works for builds using libc.so. |
|
|
Re: Porting to AmigaOS4 thread |
Posted on: 2019/9/25 21:25
#100 |
---|---|---|
Home away from home
![]() ![]() Joined:
2006/11/26 21:45 From a dying planet
Posts: 3972
|
@salass00
Sooo, libc.so is involved? On my other thread (perl), with the help of broadblues, i discovered i had an outdated libc.so installed (53.28 compared to newlib being 53.30) resulting in problems in my perl installation. This was cured after i reinstalled libc.so from the FE install disc. I guess a simple new linked executable won't do it? I have to build the whole thing again, because even with the correct libc.so in place and a new linked exe i still get that crash. |
|
_________________
People are dying. Entire ecosystems are collapsing. We are in the beginning of a mass extinction. And all you can talk about is money and fairytales of eternal economic growth. How dare you! – Greta Thunberg |
||