Jump to content

CountChildren in wine


Mumbles
 Share

Recommended Posts

Resolved: (and it's rather embarrassing)

 

Finally, with a lot of help from Lumooja, I got LE working in linux. But before long, I'd expanded the small test app to process the Hydro scene that comes with the loading a scene tutorial. (The boring unmodified version, rather than Marley's much better version). However the app kept crashing. So I started placing a lot of std::cout calls all over the place, to try and track the problematic code (Code is compiled on XP in VS2008, then transferred over to a linux machine).

 

Eventually I tracked the code down to the ProcessScene function. So I started littering that with couts too. Finally, I'd got it.

 

std::cout << "Preparing to count entities\n";
child_count = CountChildren(scene);
std::cout << "Scene has " << child_count << " entities\n";

 

what was actually output was:

 

Preparing to count entities

wine: Unhandled page fault on read access to 0x00000000 at address 0x100d9fa8 (thread 0009), starting debugger...

Unhandled exception: page fault on read access to 0x00000000 in 32-bit code (0x100d9fa8).

 

when run on actual windows, there is no error. As linux isn't officially supported (at least not) This can't go down as a bug report, but it would be nice if someone (perhaps our resident linux expert ..ahem.. Lumooja) might know what's going on, and if there's any way to get around that. Well, I can see what it's telling me, there's a null pointer being read, I'm hoping there's a way to resolve that.

 

...Thanks in advance to anyone who can help with this

 

I've put this in General Programming because I would guess the same error is likely to occur with BlitzMax exes if run in wine.

 

(My wine version is 1.1.32 - and yes, I'm sure Lumooja's not the only linux expert here)

LE Version: 2.50 (Eventually)

Link to comment
Share on other sites

I hope you're not using Ubuntu, since it has lots of problem with wine and other computer programs.

Under openSUSE and Debian LE works fine, I've tested it many times even with gamelib, which does a lot of ProcessScene.

It might be that the ProcessScene in the tutorials has some bugs too, as I've rewritten it also.

What would be really good at this point, would be an uptodate C++ game demo using LE 2.3. I don't have any at the moment :)

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

No, I'm not using Ubuntu... Debian lenny (It's in my sig). I've not really looked at gamelib yet. I keep meaning to and then think: ooh, I'll check out, (function name). Might be worth a try

 

Edit: Can't help you out on the 2.3 game demo... Well, not yet at least. Trying to buy only essentials like chocolate.

LE Version: 2.50 (Eventually)

Link to comment
Share on other sites

Problem resolved. The real problem is that I have a cabbage inside my head, as I announced on my status message in my head.

 

The error was not with CountChildren(), it was caused by LoadScene(), but how?

 

When it wasn't working, my terminal would look like this:

mumbles@twonk.mobile:/home/mumbles$ wine /mnt/disk_1500_seagate/p1l5/Leadwerks/Projects/linux_test/linux_test-Release.exe

 

Now, let's play 'spot the diffference' when I had the following, it worked.

mumbles@twonk.mobile:/mnt/disk_1500_seagate/p1l5/Leadwerks/Projects/linux_test$ wine ./linux_test-Release.exe

 

Normally, out of laziness I can't be bothered to change directories to execute files. If they need it, I'll just fully qualify their paths. That's going to be a hard habit to break, but oh well... So, yep, LoadScene() turned out to be DontLoadScene() because it couldn't find the scene. (even though the abstract path used was an absolute path). On reflection, the null pointer should have been a tip-off.

 

It also works fine by right-clicking the exe in konqueror and selecting "open with -> wine"

 

So why not use the graphical explorer in the first place? Well, I originally was, but didn't have the C-Runtime files in the app's directory, so it didn't load. I started to execute from the command line so my cout calls would remain visible even after the program finished. Once I received the files from Lumooja, I carried on using the same terminal way

 

To my shame here's the lesson to anyone else:

IF you're going to use LE in linux, open from apps directly from your file browser (hopefully that's Konqueror because KDE is better than the default, gnome, or at least that's what I'll tell you). or if you really want to use the terminal go into the directory first.

 

So I don't need to starve after all (I just edited my status accordingly)

LE Version: 2.50 (Eventually)

Link to comment
Share on other sites

am please to see you got it working which means you do not have cabbage in your head :P

 

I have to say wine was always a pain but the last time i played with that was over 4 years ago

 

anyway keep it up

Asus ROG STRIX B350-F GAMMING

AMD Ryzen 7 1700x

32 gb ddr4

15 TB raid 5 HD

Nvidia EVGA 1060GTX

Win10 64bit

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...