Resolved: KantanMapper error messages, and gives lag

Hi,
KantanMapper is giving me a hard time, and I wonder if anybody else have met the same problem.
When I start a preset with KantanMapper inside I get a long list of errors and warnings. I do thereafter have output to projector, but the program lags, and I get a delay of about a second from touching a control until I get a reaction on the screen.
I have added an example .toe with just the default startup file and a KantanMapper, and a text file with the error messages.
I run Windows 10 Home (updated - ver 1809, OS-bulid 17763.437) on an Acer Predator laptop, prosessor: i7-7700HQ, RAM: 32 GB, screencard: GeForce GTX 1080 Ti (Updated driver - ver 425.31), TouchDesigner ver 2018.27910
Any help would be appreciated.
Regards,
Gjert
Error_messages.txt (28.2 KB)
KantanMapper_test.toe (293 KB)

Hi Gjert,

I tried to replicate your issues on my machine with your file and the same build but so far no luck.

The Messages you are getting on startup are a combination of Messages, Warnings and Errors. You can look for Errors specifically by ticking off the Messages box in the Startup Errors Dialog:

To track this down further, could you check the performance monitor and see what is causing the long cook times? Go to Dialogs->Performance Monitor and enter a number like 100 into the Frame Trigger field. Now click analyze and then try to use a control. Please then share the output of the performance monitor and I’ll be able to track that a bit better,

Best
Markus

Hi, thanks Marcus!
I had to go down to 11 to get something in Performance monitor. I have added the save.
And I’m afraid was not very precise. The lag appears when I add Kantan mapper to my performance setup, which is a basic 8 channel video-mixer. Visually I can see no lag when changing parameters in the .toe I uploaded above.
But as the warnings and messages (nothing under error messages) are the same when I start both presets, I was hoping to solve it from here, without starting a major debugging operation.
Regards,
Gjert
stat.txt (24.8 KB)

For reference, this is my video-mixer .toe, with a dump from the performance monitor. Its kind of a clumsy setup, and has for years been on the why-fix-something-that-works list. What can I say, life has been interesting…
Anyway, the warnings on startup are the same, so I hope this can help.
Regards,
Gjert
Performance analysis.txt (188 KB)
Videomixer.1.toe (324 KB)

Hey Gjert,

hm, the 1.1 sec for Flushing GPU Commands and Changing Graphics Context is extreme. It could point to an issue with perhaps the optimus graphics.

Have you tried forcing Windows to use the Nvidia card in the Nvidia Control Panel?
Also does this happen when you have you videomixer window open as well as the Kantan Mapper window or even if you would try to control kantanmapper out of the container node itself?

Best
Markus

Ok, thanks again!
I may be wrong about this but I believe the Acer Predator (pt715-51) has no secondary Intel screen card. At least I can find none in the system. I’m not quite sure if/ how that would affect the optimus.
I tried seting TD to use the NVIDIA card, under 3D-configuration in the NVIDIA control panel, but I still have the same lag. In the list there are a lot of windows programs that can be set to use NVIDIA, but it does not seem right. Is there any particular part of Windows I should change?
The lag appears when I work in performance mode, which does make KantanMapper draw an image on top of my original performance secondary output, but also when I work in designer mode with output from KantanMapper, and I use the controls from the containers. The lag appears when I add output from Kantan. I’m not quite sure it that covers your question? I set KantanMapper to output, and then I leave its controls alone.
Regards, Gjert

Recommend trying to turn off vsync in Nvidia driver setting as the multiple windows could be fighting over vsync. This started happening last year after a Windows update, but is usually more common on Optimus laptops, can still happen on others.

Worth a shot.

Thanks. I turned vsync of globally in nvidia control panel, but that does not make any difference.

I have made a more exact description of when the problem appears, step by step. I have used my video-mixer.toe for this, as the problem is more obvious here:

  1. The warnings and messages appears immediately after I add KantanMapper to the project, save, close and reopen it. At this point I have no visual lag when switching banks and using the sliders in the Elek comp window.
  2. I then make a rectangle in KantanMapper (save and reopen.) Same messages, and no visual lag.
  3. I then apply a texture (/Elek/null1) to the rectangle, without yet making the texture active. I immediately have lag.
  4. I save and reopen. The lag persists, but immediately disappears when I delete the text from the texture-field in KantanMapper.

During the steps above I did not at any time enter perform mode, and I have not asked KantanMapper to write anything. I did not have a secondary output connected to the laptop. It seems to be when KantanMapper receives a texture the lag appears.

Regards,
Gjert
(This is is so Saturn conjunct Pluto, btw :smiley: )

Hi Gjert,

that is rather puzzling.
I’m imagining the resolution specified in Kantan is default or something regular like 1920x1080?

Two further things to try out: after adding the texture, could you click on the below “Edit Texture” button and in the texture edit window change the Filter setting from Mipmap to Linear?

As another test, since I can’t reproduce the issue here, could you try installing the latest experimental and test your setup there? You can install a version in parallel by following these instructions: docs.derivative.ca/Install_Touc … er#Windows

Best
Markus

Thanks again for your help and suggestions, I do very much appreciate it!

In the video-mixer and in most of the tests I’ve been using 1920x1080, while in some of the tests I’ve been using the default resolution.

I’ve had some help from a more qualified friend today, who also finds this puzzling. And peculiar, and strange.
Here’s what we’ve tried:

  • Set filter in KantanMapper/Edit texture to linear. No change.
  • Removed nvidia drivers and remnants thereof with DDU, and reinstalled newest driver. No change.
  • Removed TD and reinstalled. No change.
  • Removed TD and reinstalled latest experimental build. Same lag, but new warnings and messages on startup. My video-mixer also has some errors now. I’ve split them between errors, warnings and messages, and uploaded the text from startup of both the default file with KantanMapper, and the video-mixer. I’ve also uploaded a save from Performance Monitor in the Video-mixer.
  • We’ve also installed TD on his laptop, and opened the video-mixer .toe there. The problem does not reproduce.

So it seems the problem is local to my pc. I’ll try a clean reinstall of windows, as a last option, before I sit down under a tree and aspire towards a more detached relation to this pc…
Regards,
Gjert
Default file_Messages.txt (32.7 KB)
Videomixer_Warnings.txt (4.23 KB)
Videomixer_Stat.txt (99.2 KB)
Videomixer_Errors.txt (1.94 KB)
Default file_Warnings.txt (6.08 KB)

Ok,
With a freshly installed windows, and last stable version of TD, the error messages on startup were gone, but I still had lag immediately after dropping a texture to a shape in KantanMapper.
I uninstalled the stable version and installed the last experimental vesion of TD, and the lag had also dissapeared.
This is good luck! I have the first show this Sunday, starting a two week tour, so I’m very happy about it! Thank you so much for taking the time, even now in the middle of easter, and thank you for all your help!
Gjert